From 7026a8b292aa44c1ed05f3a37c161461b15a53fd Mon Sep 17 00:00:00 2001 From: First-Terraner Date: Sun, 10 Sep 2023 00:29:28 +0200 Subject: [PATCH] fix scan invoice check and process with +1 mint --- src/screens/Payment/SelectMint.tsx | 3 ++- src/screens/QRScan/index.tsx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/screens/Payment/SelectMint.tsx b/src/screens/Payment/SelectMint.tsx index 0e3c8c39..68182c2a 100644 --- a/src/screens/Payment/SelectMint.tsx +++ b/src/screens/Payment/SelectMint.tsx @@ -64,7 +64,8 @@ export default function SelectMintScreen({ navigation, route }: TSelectMintPageP balance: mint.amount, amount: invoiceAmount, estFee, - isMelt: true + isMelt: true, + recipient: invoice }) return } diff --git a/src/screens/QRScan/index.tsx b/src/screens/QRScan/index.tsx index d8758cc1..4aeb5e0a 100644 --- a/src/screens/QRScan/index.tsx +++ b/src/screens/QRScan/index.tsx @@ -125,7 +125,7 @@ export default function QRScanPage({ navigation, route }: TQRScanPageProps) { } // handle LN invoice try { - const invoice = data.split(':')[1] + const invoice = data.includes(':') ? data.split(':')[1] : data const decoded: IDecodedLNInvoice = getDecodedLnInvoice(invoice) // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access const amount = decoded.sections[2].value / 1000