diff options
| author | Adam Soltys <[email protected]> | 2022-11-21 15:34:11 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2022-11-21 15:34:11 -0800 |
| commit | 203884179a23c8261e52fd813a99193b7f1eec64 (patch) | |
| tree | 01b913b2de6a92d23d70e51c5a83f0c5ebdd2d29 /src | |
| parent | eebbc62b126728029d89346cbc40230fc1665f18 (diff) | |
| download | coinos-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.js | 4 |
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 |
