diff options
| author | Adam Soltys <[email protected]> | 2025-09-20 04:05:44 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-09-20 04:05:44 +0000 |
| commit | 77f6dcea1148f33737f5c772e42bc1c5a12b5be1 (patch) | |
| tree | 4c740af266a4e77cbd69a95a43e40d21106f8220 /lib | |
| parent | f9c8a7694e11b48f92ba423a571861839f54d8d4 (diff) | |
| download | coinos-server-77f6dcea1148f33737f5c772e42bc1c5a12b5be1.tar.gz coinos-server-77f6dcea1148f33737f5c772e42bc1c5a12b5be1.zip | |
fix bolt12 issue
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/payments.ts | 8 |
1 files changed, 3 insertions, 5 deletions
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]); |
