aboutsummaryrefslogtreecommitdiffstats
path: root/lib/invoices.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-09-03 20:49:34 -0700
committerAdam Soltys <[email protected]>2023-09-03 20:49:34 -0700
commitc8043f25ff3c9fc6e17724061c0fec456b9f3c2c (patch)
tree71d27f182563394eef30d84a553676baf30db276 /lib/invoices.js
parentdd93caa76eee95ace50f05ca13a344bc3bc5ad4a (diff)
parent3aa200db295438827bfff48f80e3f4b25f44e8ea (diff)
downloadcoinos-server-c8043f25ff3c9fc6e17724061c0fec456b9f3c2c.tar.gz
coinos-server-c8043f25ff3c9fc6e17724061c0fec456b9f3c2c.zip
Merge branch 'prod'
Diffstat (limited to 'lib/invoices.js')
-rw-r--r--lib/invoices.js20
1 files changed, 8 insertions, 12 deletions
diff --git a/lib/invoices.js b/lib/invoices.js
index b4583ea1..2e5a8e64 100644
--- a/lib/invoices.js
+++ b/lib/invoices.js
@@ -38,19 +38,15 @@ export let generate = async ({ invoice, user, sender, memo }) => {
let hash, text;
if (type === types.lightning) {
- let r = await ln.invoice(
- amount ? `${amount + tip}sat` : "any",
- new Date(),
- memo || "",
- expiry || 3600,
- undefined,
- undefined,
- undefined,
- undefined,
- true
- );
+ let r = await ln.invoice({
+ amount_msat: amount ? `${amount + tip}sat` : "any",
+ label: new Date(),
+ description: memo || "",
+ expiry: expiry || 3600,
+ deschashonly: true
+ });
- hash = r.payment_hash;
+ hash = r.bolt11;
text = r.bolt11;
} else if (type === types.bitcoin) {
hash = await bc.getNewAddress();