aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/invoices.js4
-rw-r--r--routes/lnurl.js6
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/invoices.js b/lib/invoices.js
index de29e74b..55223674 100644
--- a/lib/invoices.js
+++ b/lib/invoices.js
@@ -1,3 +1,4 @@
+import crypto from "crypto";
import store from "$lib/store";
import { l } from "$lib/logging";
import { emit } from "$lib/sockets";
@@ -10,7 +11,7 @@ import lq from "$lib/liquid";
import bc from "$lib/bitcoin";
import ln from "$lib/ln";
-export let generate = async ({ invoice, user, sender, }) => {
+export let generate = async ({ invoice, user, sender }) => {
let {
currency,
expiry,
@@ -28,7 +29,6 @@ export let generate = async ({ invoice, user, sender, }) => {
secret,
} = invoice;
-
amount = parseInt(amount || 0);
tip = parseInt(tip) || null;
diff --git a/routes/lnurl.js b/routes/lnurl.js
index ea99d488..daab5e0b 100644
--- a/routes/lnurl.js
+++ b/routes/lnurl.js
@@ -49,7 +49,7 @@ export default {
async lnurlp(
{
params: { username },
- query: { minSendable = 1000, maxSendable = 100000000000 },
+ query: { minSendable = 1000, maxSendable = 100000000000 },
},
res,
) {
@@ -90,8 +90,8 @@ export default {
username = username.replace(/\s/g, "").toLowerCase();
let metadata = JSON.stringify([
- ["text/plain", `Paying ${username}@${host}`],
["text/identifier", `${username}@${host}`],
+ ["text/plain", `Paying ${username}@${host}`],
]);
if (nostr) {
@@ -108,9 +108,9 @@ export default {
let { text: pr } = await generate({
invoice: {
amount: Math.round(amount / 1000),
+ memo: metadata,
type: types.lightning,
},
- memo: metadata,
user,
});