aboutsummaryrefslogtreecommitdiffstats
path: root/routes/lnurl.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-12-19 14:37:18 -0800
committerAdam Soltys <[email protected]>2023-12-20 14:39:08 -0800
commitb67ca07bac3a0cb78f9b3c19a783c3253f06c29f (patch)
tree1664d33bd1c514d016a7a1983af257197d4e5ac7 /routes/lnurl.js
parent337ca8c555f188d64c9f065972d443377adf042f (diff)
downloadcoinos-server-b67ca07bac3a0cb78f9b3c19a783c3253f06c29f.tar.gz
coinos-server-b67ca07bac3a0cb78f9b3c19a783c3253f06c29f.zip
biome
Diffstat (limited to 'routes/lnurl.js')
-rw-r--r--routes/lnurl.js14
1 files changed, 7 insertions, 7 deletions
diff --git a/routes/lnurl.js b/routes/lnurl.js
index 011db286..a1e7dde8 100644
--- a/routes/lnurl.js
+++ b/routes/lnurl.js
@@ -36,7 +36,7 @@ export default {
async decode({ query: { text } }, res) {
try {
let url = Buffer.from(
- bech32.fromWords(bech32.decode(text, 20000).words)
+ bech32.fromWords(bech32.decode(text, 20000).words),
).toString();
res.send(await got(url).json());
@@ -51,7 +51,7 @@ export default {
let metadata = JSON.stringify([
["text/plain", `Paying ${username}@${host}`],
- ["text/identifier", `${username}@${host}`]
+ ["text/identifier", `${username}@${host}`],
]);
let id = v4();
@@ -64,7 +64,7 @@ export default {
metadata,
nostrPubkey,
callback: `${URL}/api/lnurl/${id}`,
- tag: "payRequest"
+ tag: "payRequest",
});
} catch (e) {
warn("problem generating lnurlp request", e.message);
@@ -82,7 +82,7 @@ export default {
let metadata = JSON.stringify([
["text/plain", `Paying ${username}@${host}`],
- ["text/identifier", `${username}@${host}`]
+ ["text/identifier", `${username}@${host}`],
]);
if (nostr) {
@@ -99,12 +99,12 @@ export default {
let { text: pr } = await generate({
invoice: {
amount: Math.round(amount / 1000),
- type: types.lightning
+ type: types.lightning,
},
memo: metadata,
- user
+ user,
});
res.send({ pr, routes: [] });
- }
+ },
};