aboutsummaryrefslogtreecommitdiffstats
path: root/lib/invoices.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-07-26 16:20:47 -0700
committerAdam Soltys <[email protected]>2025-07-26 16:20:47 -0700
commit25cf51c8dbb6f3cea93c10832a05b9a65743bfee (patch)
treecb5afe76c53809d9d0c9df6dc8d56b82225fc484 /lib/invoices.ts
parent4b59d73b96987b3335f9b87a1723f6f439288493 (diff)
downloadcoinos-server-25cf51c8dbb6f3cea93c10832a05b9a65743bfee.tar.gz
coinos-server-25cf51c8dbb6f3cea93c10832a05b9a65743bfee.zip
add missing make_invoice fields (fixes #78)
Diffstat (limited to 'lib/invoices.ts')
-rw-r--r--lib/invoices.ts3
1 files changed, 3 insertions, 0 deletions
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,