From 25cf51c8dbb6f3cea93c10832a05b9a65743bfee Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sat, 26 Jul 2025 16:20:47 -0700 Subject: add missing make_invoice fields (fixes #78) --- lib/invoices.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/invoices.ts') diff --git a/lib/invoices.ts b/lib/invoices.ts index 1e08140a..b8eedbf6 100644 --- a/lib/invoices.ts +++ b/lib/invoices.ts @@ -60,6 +60,7 @@ export const generate = async ({ invoice, user }) => { let hash; let text; let path; + let paymentHash; if (account.seed) { type = "bitcoin"; @@ -90,6 +91,7 @@ export const generate = async ({ invoice, user }) => { hash = r.bolt11; text = r.bolt11; + paymentHash = r.payment_hash; } else if (type === PaymentType.bolt12) { const r = await ln.offer({ amount: amount ? `${amount + tip}sat` : "any", @@ -132,6 +134,7 @@ export const generate = async ({ invoice, user }) => { items, memo, rate, + paymentHash, pending: 0, received: 0, request_id, -- cgit v1.2.3