aboutsummaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2024-12-30 16:55:09 -0800
committerAdam Soltys <[email protected]>2024-12-30 16:55:09 -0800
commit39b8f61274902b2dcdc9682a1466dc3cb4b9e893 (patch)
tree1e5fff7e910c9d080ddd4b047366edbcb0f7b888 /src/components
parente2e1129501fd49cdaf1910624b0d9f2b69e41ea9 (diff)
downloadcoinos-ui-39b8f61274902b2dcdc9682a1466dc3cb4b9e893.tar.gz
coinos-ui-39b8f61274902b2dcdc9682a1466dc3cb4b9e893.zip
hide max button if max = min
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Lnurlw.svelte16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/components/Lnurlw.svelte b/src/components/Lnurlw.svelte
index f46c1b4f..bf9fd593 100644
--- a/src/components/Lnurlw.svelte
+++ b/src/components/Lnurlw.svelte
@@ -81,13 +81,15 @@
<input name="k1" value={k1} type="hidden" />
<div class="flex gap-2">
- <button
- type="button"
- class="btn !w-auto grow"
- onclick={setMax}
- disabled={submitting}
- onkeydown={setMax}>Max ⚡️{s(maxWithdrawable)}</button
- >
+ {#if maxWithdrawable > minWithdrawable}
+ <button
+ type="button"
+ class="btn !w-auto grow"
+ onclick={setMax}
+ disabled={submitting}
+ onkeydown={setMax}>Max ⚡️{s(maxWithdrawable)}</button
+ >
+ {/if}
<button
use:focus