From 5baaa3345572f74b0d70416d1bd45ab4f3d3068c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 26 Feb 2025 20:30:23 +0000 Subject: strip spaces from lnurl --- routes/lnurl.ts | 4 ++-- 1 file 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(), ); -- cgit v1.2.3