aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)/send
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-11-08 13:46:04 -0800
committerAdam Soltys <[email protected]>2023-11-11 00:04:22 -0800
commit8041f705373758940b9487ed5c4cd34bfb04ac16 (patch)
treea96ded4f227e157762d446e8d946a94cae861b0d /src/routes/(app)/send
parent84022507dd5d5a03aedb986f0ff28c81a3bcaeec (diff)
downloadcoinos-ui-8041f705373758940b9487ed5c4cd34bfb04ac16.tar.gz
coinos-ui-8041f705373758940b9487ed5c4cd34bfb04ac16.zip
rename pot to fund
Diffstat (limited to 'src/routes/(app)/send')
-rw-r--r--src/routes/(app)/send/[...text]/+page.server.js9
-rw-r--r--src/routes/(app)/send/[...text]/+page.svelte13
-rw-r--r--src/routes/(app)/send/fund/[name]/[...amount]/+page.server.js (renamed from src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js)2
-rw-r--r--src/routes/(app)/send/fund/[name]/[...amount]/+page.svelte (renamed from src/routes/(app)/send/pot/[name]/[...amount]/+page.svelte)0
4 files changed, 5 insertions, 19 deletions
diff --git a/src/routes/(app)/send/[...text]/+page.server.js b/src/routes/(app)/send/[...text]/+page.server.js
index cafce7c9..6b4b000e 100644
--- a/src/routes/(app)/send/[...text]/+page.server.js
+++ b/src/routes/(app)/send/[...text]/+page.server.js
@@ -30,7 +30,7 @@ let parse = async (t, host) => {
if (id) throw redirect(307, `/send/invoice/${id}`);
}
- if (t.includes('/pot')) throw redirect(307, t.substring(t.indexOf('/pot')));
+ if (t.includes('/fund')) throw redirect(307, t.substring(t.indexOf('/fund')));
if (t.toLowerCase().startsWith('lnurl')) throw redirect(307, `/ln/${t}`);
if (t.includes(':')) t = t.split(':')[1];
@@ -66,13 +66,12 @@ let parse = async (t, host) => {
if (user) throw redirect(307, `/send/user/${t}`);
- // pot
- let pot;
+ let fund;
try {
- pot = await get(`/pot/${t}`);
+ fund = await get(`/fund/${t}`);
} catch (e) {}
- if (pot) throw redirect(307, `/send/pot/${t}`);
+ if (fund) throw redirect(307, `/send/fund/${t}`);
// invoice
let invoice;
diff --git a/src/routes/(app)/send/[...text]/+page.svelte b/src/routes/(app)/send/[...text]/+page.svelte
index 3abc5a1a..c246f811 100644
--- a/src/routes/(app)/send/[...text]/+page.svelte
+++ b/src/routes/(app)/send/[...text]/+page.svelte
@@ -35,19 +35,6 @@
</h1>
<form method="POST" use:enhance>
- {#if form?.error}
- <div class="mb-5">
- <div class="text-secondary">
- Could not find anything with that name. Would you like to create a new pot?
- </div>
- <div class="w-full flex justify-center">
- <a href={`/send/pot/${text}`}
- ><button class="bg-black text-white border rounded-full px-6 py-2 font-bold">Yes</button
- ></a
- >
- </div>
- </div>
- {/if}
<div class="mb-2">
<input type="hidden" name="text" bind:value={text} />
diff --git a/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js b/src/routes/(app)/send/fund/[name]/[...amount]/+page.server.js
index 3f819696..2cb3c4a9 100644
--- a/src/routes/(app)/send/pot/[name]/[...amount]/+page.server.js
+++ b/src/routes/(app)/send/fund/[name]/[...amount]/+page.server.js
@@ -12,6 +12,6 @@ export const actions = {
return fail(400, { message: e.message });
}
- if (p) throw redirect(307, `/pot/${body.name}`);
+ if (p) throw redirect(307, `/fund/${body.name}`);
}
};
diff --git a/src/routes/(app)/send/pot/[name]/[...amount]/+page.svelte b/src/routes/(app)/send/fund/[name]/[...amount]/+page.svelte
index 6aecf8f3..6aecf8f3 100644
--- a/src/routes/(app)/send/pot/[name]/[...amount]/+page.svelte
+++ b/src/routes/(app)/send/fund/[name]/[...amount]/+page.svelte