From 77f6dcea1148f33737f5c772e42bc1c5a12b5be1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 20 Sep 2025 04:05:44 +0000 Subject: fix bolt12 issue --- lib/payments.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'lib') diff --git a/lib/payments.ts b/lib/payments.ts index 9b7c807b..07048f99 100644 --- a/lib/payments.ts +++ b/lib/payments.ts @@ -184,14 +184,12 @@ export const credit = async ({ }) => { amount = parseInt(amount) || 0; - let inv; - if (type === PaymentType.bolt12 && !hash.startsWith("lni")) { + let inv = await getInvoice(hash); + if (!inv && type === PaymentType.bolt12) { const { invoices } = await ln.listinvoices({ invstring: hash }); const { local_offer_id } = invoices[0]; inv = await getInvoice(local_offer_id); - } else { - inv = await getInvoice(hash); - } + } if (!inv) { await db.sAdd("missing", ref.split(":")[0]); -- cgit v1.2.3