aboutsummaryrefslogtreecommitdiffstats
path: root/src/routes
diff options
context:
space:
mode:
Diffstat (limited to 'src/routes')
-rw-r--r--src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte9
1 files changed, 8 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 7b42a42d..5f64edd1 100644
--- a/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte
+++ b/src/routes/(app)/send/lightning/[payreq]/[...memo]/+page.svelte
@@ -39,7 +39,10 @@
);
$effect(() => (maxfee = quoted ? fee : fallback));
- let total = $derived((amount || 0) + (maxfee || 0) + (ourfee || 0));
+ // maxfee comes back from the input as whatever was typed: as a number
+ // here, so the total adds it rather than gluing the digits on ("1" made
+ // a 10,000-sat send read as ten million)
+ let total = $derived((Number(amount) || 0) + (Number(maxfee) || 0) + (Number(ourfee) || 0));
// Server-side messages worth showing verbatim: a balance shortfall, or the
// pre-flight check that the max fee is below what routing now costs.
@@ -162,6 +165,10 @@
<input
id="maxfee"
name="fee"
+ type="number"
+ min="0"
+ step="1"
+ inputmode="numeric"
bind:value={maxfee}
class="clean !grow"
/>