From 4a5416c78a77dd18e41feec7b08e26d23ca1f725 Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Mon, 4 Nov 2024 14:44:08 +0530 Subject: [PATCH 1/2] feat: handle msat amounts --- src/app/screens/ConfirmPayment/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/screens/ConfirmPayment/index.tsx b/src/app/screens/ConfirmPayment/index.tsx index 7481fd4dc7..c363d74915 100644 --- a/src/app/screens/ConfirmPayment/index.tsx +++ b/src/app/screens/ConfirmPayment/index.tsx @@ -150,7 +150,15 @@ function ConfirmPayment() {
From 98d8eaaa7ae1003f6b4f450cdd2fd6dd90b6f81d Mon Sep 17 00:00:00 2001 From: pavanjoshi914 Date: Mon, 4 Nov 2024 14:45:50 +0530 Subject: [PATCH 2/2] feat: handle msat in success message --- src/app/screens/ConfirmPayment/index.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/app/screens/ConfirmPayment/index.tsx b/src/app/screens/ConfirmPayment/index.tsx index c363d74915..2dc8a3e5f7 100644 --- a/src/app/screens/ConfirmPayment/index.tsx +++ b/src/app/screens/ConfirmPayment/index.tsx @@ -46,7 +46,13 @@ function ConfirmPayment() { const [fiatAmount, setFiatAmount] = useState(""); const [fiatBudgetAmount, setFiatBudgetAmount] = useState(""); - const formattedInvoiceSats = getFormattedSats(invoice.satoshis || 0); + const formattedInvoiceSats = getFormattedSats( + invoice.satoshis + ? invoice.satoshis + : invoice.millisatoshis + ? Math.floor(parseInt(invoice.millisatoshis) / 1000) + : 0 + ); useEffect(() => { (async () => {