aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/nwc.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/nwc.ts b/lib/nwc.ts
index 96be559a..7e3ff437 100644
--- a/lib/nwc.ts
+++ b/lib/nwc.ts
@@ -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;