From 56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 11 Feb 2026 20:10:43 -0800 Subject: format --- src/routes/(app)/send/invoice/[id]/+page.server.ts | 16 +++------ src/routes/(app)/send/invoice/[id]/+page.svelte | 39 +++------------------- 2 files changed, 9 insertions(+), 46 deletions(-) (limited to 'src/routes/(app)/send/invoice') diff --git a/src/routes/(app)/send/invoice/[id]/+page.server.ts b/src/routes/(app)/send/invoice/[id]/+page.server.ts index 2e268b99..59add224 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.server.ts +++ b/src/routes/(app)/send/invoice/[id]/+page.server.ts @@ -32,21 +32,13 @@ export async function load({ cookies, depends, params: { id }, parent }) { if (p) redirect(307, `/sent/${p.id}`); } - if (invoice.amount && invoice.prompt && invoice.tip === null) - redirect(307, `/invoice/${id}/tip`); + if (invoice.amount && invoice.prompt && invoice.tip === null) redirect(307, `/invoice/${id}/tip`); - if (invoice.memoPrompt && invoice.memo === null) - redirect(307, `/invoice/${id}/memo`); + if (invoice.memoPrompt && invoice.memo === null) redirect(307, `/invoice/${id}/memo`); - if (user && invoice.aid === aid) - error(500, { message: "Cannot send to self" }); + 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 === types.ecash ? "ecash" : "bitcoin"}/${ - invoice.hash - }`, - ); + redirect(307, `/send/${invoice.type === types.ecash ? "ecash" : "bitcoin"}/${invoice.hash}`); if (!user) redirect(307, `/invoice/${id}`); diff --git a/src/routes/(app)/send/invoice/[id]/+page.svelte b/src/routes/(app)/send/invoice/[id]/+page.svelte index f3f2f618..9174cf4c 100644 --- a/src/routes/(app)/send/invoice/[id]/+page.svelte +++ b/src/routes/(app)/send/invoice/[id]/+page.svelte @@ -11,18 +11,7 @@ import Numpad from "$comp/Numpad.svelte"; import Spinner from "$comp/Spinner.svelte"; import { page } from "$app/stores"; - import { - btc, - sat, - post, - back, - f, - toFiat, - s, - sats, - focus, - loc, - } from "$lib/utils"; + import { btc, sat, post, back, f, toFiat, s, sats, focus, loc } from "$lib/utils"; let { data, form }: any = $props(); let { trusted, balance, invoice, user } = $state(data); @@ -156,14 +145,7 @@ {/each} {/if} {:else} - + {/if}
@@ -175,12 +157,7 @@
{#if amount} - {:else} - {/if}
- + {#if !trusted}