aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2022-11-21 15:34:11 -0800
committerAdam Soltys <[email protected]>2022-11-21 15:34:11 -0800
commit203884179a23c8261e52fd813a99193b7f1eec64 (patch)
tree01b913b2de6a92d23d70e51c5a83f0c5ebdd2d29 /src
parenteebbc62b126728029d89346cbc40230fc1665f18 (diff)
downloadcoinos-ui-203884179a23c8261e52fd813a99193b7f1eec64.tar.gz
coinos-ui-203884179a23c8261e52fd813a99193b7f1eec64.zip
lowercase input before parsing
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/send/[...text]/+page.server.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/routes/(app)/send/[...text]/+page.server.js b/src/routes/(app)/send/[...text]/+page.server.js
index a99e9c59..fcfb33a3 100644
--- a/src/routes/(app)/send/[...text]/+page.server.js
+++ b/src/routes/(app)/send/[...text]/+page.server.js
@@ -8,6 +8,8 @@ let parse = async (t, host) => {
let amount, user, uuid;
+ t = t.toLowerCase();
+
t.startsWith('bitcoin:') &&
({
address: t,
@@ -27,7 +29,7 @@ let parse = async (t, host) => {
if (t.includes('/voucher')) throw redirect(307, t.substring(t.indexOf('/voucher')));
- if (t.toLowerCase().startsWith('lnurl')) throw redirect(307, `/ln/${t}`);
+ if (t.startsWith('lnurl')) throw redirect(307, `/ln/${t}`);
if (t.includes(':')) t = t.split(':')[1];
// lightning