diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte b/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte index de508af6..e979e7c4 100644 --- a/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte +++ b/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte @@ -27,7 +27,10 @@ let next = $state(); let toggle = () => (show = !show); let amount = $derived(form?.amount || data.amount); - let maxfee = $state(Math.max(5, Math.round(untrack(() => amount) * 0.005))); + let maxfee = $state( + Math.max(5, Math.round(untrack(() => amount) * 0.005 || 0)), + ); + $effect(() => (maxfee = Math.max(5, Math.round(amount * 0.005) || 0))); </script> <div class="container px-4 max-w-xl mx-auto text-center space-y-2"> |
