diff options
| author | Adam Soltys <[email protected]> | 2024-01-03 20:20:10 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2024-01-03 20:20:10 -0800 |
| commit | d7fe984100e4c1e5c2564d60ca92b062a06609fd (patch) | |
| tree | 133920dfc7d168dd0c72328356a7bf7b517c64c2 /src/routes/(app)/send | |
| parent | 0ba0fdd344022556603331b742b38dec251b448c (diff) | |
| download | coinos-ui-d7fe984100e4c1e5c2564d60ca92b062a06609fd.tar.gz coinos-ui-d7fe984100e4c1e5c2564d60ca92b062a06609fd.zip | |
enable nfc
Diffstat (limited to 'src/routes/(app)/send')
| -rw-r--r-- | src/routes/(app)/send/[...text]/+page.server.js | 4 | ||||
| -rw-r--r-- | src/routes/(app)/send/invoice/[id]/+page.svelte | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/routes/(app)/send/[...text]/+page.server.js b/src/routes/(app)/send/[...text]/+page.server.js index a6b0c54d..ef05be16 100644 --- a/src/routes/(app)/send/[...text]/+page.server.js +++ b/src/routes/(app)/send/[...text]/+page.server.js @@ -33,11 +33,11 @@ let parse = async (t, host) => { if (t.includes("/fund")) redirect(307, t.substring(t.indexOf("/fund"))); + // lightning + if (t.toLowerCase().startsWith("lightning:")) t = t.toLowerCase().replace("lightning:", ""); if (t.toLowerCase().startsWith("lnurl")) redirect(307, `/ln/${t}`); if (t.includes(":")) t = t.split(":")[1]; - // lightning - if (t.toLowerCase().startsWith("lightning:")) t = t.toLowerCase().replace("lightning:", ""); if (t.toLowerCase().startsWith("ln")) { try { ({ id } = await get(`/invoice/${t}`)); diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte index c2163a81..e857f717 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.svelte +++ b/src/routes/(app)/send/invoice/[id]/+page.svelte @@ -57,7 +57,7 @@ }; // onMount(async () => { - // if (browser && window.NDEFReader) { + // if (browser && window.NDEFReader && user.nfc) { // try { // let ndef = new NDEFReader(); // await ndef.scan(); |
