aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-01-03 20:20:10 -0800
committerAdam Soltys <[email protected]>2024-01-03 20:20:10 -0800
commit2de78ad3fe44cceacec0e1f096fea38da8ac3e1d (patch)
tree133920dfc7d168dd0c72328356a7bf7b517c64c2 /src/routes/(app)/send
parent8d23c2500cdaf85bcb458c35544fe20b8830839c (diff)
downloadcoinos-ui-2de78ad3fe44cceacec0e1f096fea38da8ac3e1d.tar.gz
coinos-ui-2de78ad3fe44cceacec0e1f096fea38da8ac3e1d.zip
enable nfc
Diffstat (limited to 'src/routes/(app)/send')
-rw-r--r--src/routes/(app)/send/[...text]/+page.server.js4
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.svelte2
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();