From b83b9bf7cd49548c2cd2a15184254816ea8b4003 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 30 Dec 2024 16:41:12 -0800 Subject: fix setmax for take funds --- src/components/Lnurlw.svelte | 49 +++++++++++++++++++----- src/components/Numpad.svelte | 11 +++++- src/routes/(app)/fund/[id]/withdraw/+page.svelte | 9 +++-- 3 files changed, 53 insertions(+), 16 deletions(-) (limited to 'src') diff --git a/src/components/Lnurlw.svelte b/src/components/Lnurlw.svelte index 8793d3b4..932a6c04 100644 --- a/src/components/Lnurlw.svelte +++ b/src/components/Lnurlw.svelte @@ -1,10 +1,12 @@
@@ -55,7 +65,13 @@ {/if} -
+ @@ -64,12 +80,25 @@ -
- + +
diff --git a/src/components/Numpad.svelte b/src/components/Numpad.svelte index f79f749a..e69caf87 100644 --- a/src/components/Numpad.svelte +++ b/src/components/Numpad.svelte @@ -53,6 +53,7 @@ let update = (a, f) => { if ($fiat) { amount = f ? Math.round(strip(f) / (rate / sats)) : 0; + console.log("settung amount", amount, f); } else { amountFiat = a ? ((a * rate) / sats).toFixed(2) : 0; } @@ -203,7 +204,10 @@ {symbol} {/if} {:else} - {/if}
@@ -228,7 +232,10 @@ on:click|preventDefault|stopPropagation={swap} > {#if $fiat} - {s(amount, locale)} {:else} diff --git a/src/routes/(app)/fund/[id]/withdraw/+page.svelte b/src/routes/(app)/fund/[id]/withdraw/+page.svelte index f6f12b1a..78f9b16c 100644 --- a/src/routes/(app)/fund/[id]/withdraw/+page.svelte +++ b/src/routes/(app)/fund/[id]/withdraw/+page.svelte @@ -1,4 +1,5 @@ -- cgit v1.2.3