diff options
| author | Adam Soltys <[email protected]> | 2025-01-03 21:08:27 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2025-01-03 21:09:39 +0000 |
| commit | d04594701546fee8c66141d12e834f22493e4b12 (patch) | |
| tree | 35dec5b4bcdf2e0ef3bd635d60796d754fd1be75 | |
| parent | f41c20702481d9419ee81219f20bcb26c2d052a4 (diff) | |
| download | coinos-server-d04594701546fee8c66141d12e834f22493e4b12.tar.gz coinos-server-d04594701546fee8c66141d12e834f22493e4b12.zip | |
check memo existence
| -rw-r--r-- | lib/nwc.ts | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -98,6 +98,7 @@ const handle = (method, params, user, ev) => if (payee === id) { const invoice = await getInvoice(pr); + console.log("invoice", invoice, pr); const recipient = await g(`user:${invoice.uid}`); const { id: preimage } = await sendInternal({ @@ -107,7 +108,7 @@ const handle = (method, params, user, ev) => sender: user, }); - if (invoice.memo.includes("9734")) { + if (invoice.memo?.includes("9734")) { const { invoices } = await ln.listinvoices({ invstring: pr }); const inv = invoices[0]; inv.payment_preimage = preimage; |
