aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-26 20:30:23 +0000
committerAdam Soltys <[email protected]>2025-02-26 20:30:25 +0000
commit5baaa3345572f74b0d70416d1bd45ab4f3d3068c (patch)
tree26d55c40ba753ea77ed782868ec74307cd48db2d
parent9783a207f7788e66233127c58eab254cdfb01f10 (diff)
downloadcoinos-server-5baaa3345572f74b0d70416d1bd45ab4f3d3068c.tar.gz
coinos-server-5baaa3345572f74b0d70416d1bd45ab4f3d3068c.zip
strip spaces from lnurl
-rw-r--r--routes/lnurl.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/routes/lnurl.ts b/routes/lnurl.ts
index 294e6d7c..c1270dd4 100644
--- a/routes/lnurl.ts
+++ b/routes/lnurl.ts
@@ -20,7 +20,7 @@ export default {
query: { address },
} = req;
const [name, domain] = address.split("@");
- const url = `https://${domain}/.well-known/lnurlp/${name}`;
+ const url = `https://${domain}/.well-known/lnurlp/${name.toLowerCase().replace(/\s/g,"")}`;
try {
const r = await got(url).json();
@@ -59,7 +59,7 @@ export default {
const user = await getUser(
username
.replace("lightning:", "")
- .replace(/\s/, "")
+ .replace(/\s/g, "")
.replace("=", "")
.toLowerCase(),
);