aboutsummaryrefslogtreecommitdiffstats
path: root/lib/invoices.js
diff options
context:
space:
mode:
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();