From 50296ccde06dc7892b0c6bd1546030f495564b28 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Fri, 3 Jan 2025 15:24:31 -0800 Subject: nostr sign in --- src/routes/(app)/send/invoice/[id]/+page.server.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/routes/(app)/send') diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts index 9b971f2f..658629ef 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.server.ts +++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts @@ -8,7 +8,7 @@ export async function load({ cookies, params: { id }, parent }) { const invoice = await get(`/invoice/${id}`); - if (invoice.prompt && invoice.tip === null) + if (invoice.amount && invoice.prompt && invoice.tip === null) redirect(307, `/invoice/${id}/tip`); if (invoice.memoPrompt && invoice.memo === null) @@ -17,7 +17,7 @@ export async function load({ cookies, params: { id }, parent }) { if (user && invoice.aid === aid) error(500, { message: "Cannot send to self" }); else if (user && ![types.lightning, types.bolt12].includes(invoice.type)) - redirect(307, `/send/${invoice.type}/${invoice.hash}`); + redirect(307, `/send/${invoice.type === types.ecash ? "ecash" : "bitcoin"}/${invoice.hash}`); if (!user) redirect(307, `/invoice/${id}`); -- cgit v1.2.3