From 2a2ad2dbd1d1a52a13bfd3147886fe2fa696b5d1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 23 Oct 2024 20:35:12 -0700 Subject: expose max fee --- .../(app)/send/lightning/[payreq]/+page.svelte | 24 ++++++++-------------- 1 file changed, 9 insertions(+), 15 deletions(-) (limited to 'src/routes/(app)/send') diff --git a/src/routes/(app)/send/lightning/[payreq]/+page.svelte b/src/routes/(app)/send/lightning/[payreq]/+page.svelte index 132874a0..7324c4f1 100644 --- a/src/routes/(app)/send/lightning/[payreq]/+page.svelte +++ b/src/routes/(app)/send/lightning/[payreq]/+page.svelte @@ -32,19 +32,8 @@ }; $: amount = form?.amount || data.amount; - $: maxfee = Math.round( - amount < 100 - ? amount * 5 - : amount < 1000 - ? amount - : amount < 10000 - ? amount * 0.5 - : amount < 100000 - ? amount * 0.1 - : amount < 1000000 - ? amount * 0.05 - : amount * 0.01, - ); + $: maxfee = Math.round(amount * 0.01) || 1; + let showMax; let loading; let submit = () => (loading = true); @@ -108,12 +97,16 @@ - {#if form?.message} -
+ {#if form?.message || showMax} +
+
+ {$t("payments.maxFeeDesc")} +
+
{:else} + {/if} -- cgit v1.2.3