aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-12 12:31:36 -0800
committerAdam Soltys <[email protected]>2025-02-12 12:31:36 -0800
commitaf08468ed623a638718d2df533b7f023fc41baa2 (patch)
tree72e8010884114a9d452c006d8be19cb407a9affa /src
parent367f03fb8a3dbc60608564afdcd8d17253c3c454 (diff)
downloadcoinos-ui-af08468ed623a638718d2df533b7f023fc41baa2.tar.gz
coinos-ui-af08468ed623a638718d2df533b7f023fc41baa2.zip
fix maxfee
Diffstat (limited to 'src')
-rw-r--r--src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte5
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">