diff options
| author | Adam Soltys <[email protected]> | 2024-05-02 14:06:44 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-05-02 14:06:44 -0700 |
| commit | 57fa1382102eda6bab845c020d1a6458e4f02122 (patch) | |
| tree | 78c2f30f0b6ec64b581b754bf2e415bc5b968e87 | |
| parent | 1c184f2af7c6a11c779b64b936f45f3d4902c199 (diff) | |
| download | coinos-server-57fa1382102eda6bab845c020d1a6458e4f02122.tar.gz coinos-server-57fa1382102eda6bab845c020d1a6458e4f02122.zip | |
move memo field
| -rw-r--r-- | lib/invoices.js | 4 | ||||
| -rw-r--r-- | routes/lnurl.js | 6 |
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, }); |
