From 2e98fba55d572186f39d00235db1024791ba1561 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 21 Sep 2026 19:41:37 -0700 Subject: send: stop the Max buttons from cancelling their own submit, show LNURL action errors Choosing Max on the LNURL-pay page left the button spinning forever. Two things combined: The Max buttons set `loading` from their click handler. Svelte flushes `disabled={loading}` to the DOM before the browser runs the button's submit activation, and a disabled button submits nothing. Set loading from the form's onsubmit instead, the way the Send button always did. The /ln page never passed `form` into the Lnurlp and Lnurlw components, so any action failure (pay, max or withdraw) rendered nothing and never reset the spinner. Pass it through, and reset loading when a result arrives. Verified in headless Chrome against the dev stack: the bolt11 Max lands on the fee view, and the LNURL Max surfaces the server's error and re-enables the buttons. Co-Authored-By: Claude Fable 5.1 --- src/routes/(app)/ln/[lnurl]/+page.svelte | 8 +++++--- .../(app)/send/lightning/[payreq]/[...memo]/+page.svelte | 11 +++++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'src/routes') diff --git a/src/routes/(app)/ln/[lnurl]/+page.svelte b/src/routes/(app)/ln/[lnurl]/+page.svelte index 386df9d2..0f1b030f 100644 --- a/src/routes/(app)/ln/[lnurl]/+page.svelte +++ b/src/routes/(app)/ln/[lnurl]/+page.svelte @@ -1,12 +1,14 @@ + {#if tag === "payRequest"} - + {:else if tag === "withdrawRequest"} - + {/if} diff --git a/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte b/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte index c84e5d53..d3d9f757 100644 --- a/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte +++ b/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte @@ -174,7 +174,13 @@ {/if} {:else} -
+ @@ -187,12 +193,13 @@ />
+