aboutsummaryrefslogtreecommitdiffstats
path: root/lib/invoices.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-02-08 20:18:58 +0000
committerAdam Soltys <[email protected]>2023-02-08 12:19:15 -0800
commit4c9987e1abd7fa34439adc3cbc1d873324c05030 (patch)
tree519347186e0909305456e6ca2070bb15578aac78 /lib/invoices.js
parent7ed5c119467b7a0f515ddb4e52ec98bc47b23f0e (diff)
downloadcoinos-server-4c9987e1abd7fa34439adc3cbc1d873324c05030.tar.gz
coinos-server-4c9987e1abd7fa34439adc3cbc1d873324c05030.zip
lnurl fixes
Diffstat (limited to 'lib/invoices.js')
-rw-r--r--lib/invoices.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/invoices.js b/lib/invoices.js
index dc475a9c..25e211d1 100644
--- a/lib/invoices.js
+++ b/lib/invoices.js
@@ -9,7 +9,7 @@ import { v4 } from "uuid";
import bc from "$lib/bitcoin";
import ln from "$lib/ln";
-export let generate = async ({ invoice, user, sender }) => {
+export let generate = async ({ invoice, user, sender, memo }) => {
let { currency, tip, amount, rate, request_id, type } = invoice;
amount = parseInt(amount || 0);
@@ -31,7 +31,7 @@ export let generate = async ({ invoice, user, sender }) => {
let hash, text;
if (type === types.lightning) {
let amt = amount ? `${amount + tip}sat` : "any";
- let r = await ln.invoice(amt, new Date(), "", 3600);
+ let r = await ln.invoice(amt, new Date(), memo || "", 3600);
hash = r.payment_hash;
text = r.bolt11;