aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes/(app)
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-19 14:12:56 -0800
committerAdam Soltys <[email protected]>2024-12-19 14:13:32 -0800
commit5c46fe3126d40f2798ed5bb106c8a0e560b27d86 (patch)
tree4aea391a7e9c1327c513f8911f8b20dc3a9b46f4 /src/routes/(app)
parentdac37fd34b2faea3586094c0cf1d8b55b1574d7a (diff)
downloadcoinos-ui-5c46fe3126d40f2798ed5bb106c8a0e560b27d86.tar.gz
coinos-ui-5c46fe3126d40f2798ed5bb106c8a0e560b27d86.zip
bolt 12
Diffstat (limited to 'src/routes/(app)')
-rw-r--r--src/routes/(app)/invoice/+page.server.ts1
-rw-r--r--src/routes/(app)/pay/[username]/[...amount]/+page.server.ts1
-rw-r--r--src/routes/(app)/send/invoice/[id]/+page.server.ts2
3 files changed, 2 insertions, 2 deletions
diff --git a/src/routes/(app)/invoice/+page.server.ts b/src/routes/(app)/invoice/+page.server.ts
index db68740d..64c49ebc 100644
--- a/src/routes/(app)/invoice/+page.server.ts
+++ b/src/routes/(app)/invoice/+page.server.ts
@@ -6,6 +6,7 @@ import { error, redirect } from "@sveltejs/kit";
export const load = async ({ cookies, parent }) => {
const aid = cookies.get("aid");
let { subject, user } = await parent();
+
const rates = await getRates();
if (aid === user.id) redirect(307, `/${user.username}/receive`);
diff --git a/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts b/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts
index 4c112e67..65665610 100644
--- a/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts
+++ b/src/routes/(app)/pay/[username]/[...amount]/+page.server.ts
@@ -60,7 +60,6 @@ export const actions = {
auth(cookies),
));
} catch (e) {
- console.log(e);
const { message } = e as Error;
return fail(400, { message });
}
diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts
index 4047ed3d..6cacc1c6 100644
--- a/src/routes/(app)/send/invoice/[id]/+page.server.ts
+++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts
@@ -16,7 +16,7 @@ export async function load({ cookies, params: { id }, parent }) {
if (user && invoice.aid === aid)
error(500, { message: "Cannot send to self" });
- else if (user && invoice.type !== types.lightning)
+ else if (user && ![types.lightning, types.bolt12].includes(invoice.type))
redirect(307, `/send/${invoice.type}/${invoice.hash}`);
if (!user) redirect(307, `/invoice/${id}`);