aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-01-10 15:15:14 -0800
committerAdam Soltys <[email protected]>2025-01-10 15:15:14 -0800
commit978d287e2f20e218288070583be21ccc5062d639 (patch)
treee2f92621927860534ccd396392671de2c579f6ee
parente29a0d2ae7b5eab26e366cecc95ce426e36c3c24 (diff)
downloadcoinos-ui-978d287e2f20e218288070583be21ccc5062d639.tar.gz
coinos-ui-978d287e2f20e218288070583be21ccc5062d639.zip
show error message for zero-amount invoices
-rw-r--r--src/routes/(app)/send/lightning/[payreq]/+page.svelte19
-rw-r--r--src/routes/(static)/register/+page.svelte2
2 files changed, 13 insertions, 8 deletions
diff --git a/src/routes/(app)/send/lightning/[payreq]/+page.svelte b/src/routes/(app)/send/lightning/[payreq]/+page.svelte
index a35286b2..b8caaecc 100644
--- a/src/routes/(app)/send/lightning/[payreq]/+page.svelte
+++ b/src/routes/(app)/send/lightning/[payreq]/+page.svelte
@@ -31,13 +31,12 @@
</script>
<div class="container px-4 max-w-xl mx-auto text-center space-y-2">
+ {#if form?.message}
+ <div class="text-red-600 text-center">
+ {$t(form.message)}
+ </div>
+ {/if}
{#if amount}
- {#if form?.message}
- <div class="text-red-600 text-center">
- {$t(form.message)}
- </div>
- {/if}
-
<div>
<h1 class="text-lg text-secondary">
{$t("payments.send")}
@@ -126,7 +125,13 @@
<input type="hidden" value={a} name="amount" />
<input name="rate" value={$rate} type="hidden" />
- <Numpad bind:amount={a} {currency} {locale} bind:rate={$rate} submit={next} />
+ <Numpad
+ bind:amount={a}
+ {currency}
+ {locale}
+ bind:rate={$rate}
+ submit={next}
+ />
<button type="submit" class="btn" bind:this={next}
>{$t("payments.next")}</button
>
diff --git a/src/routes/(static)/register/+page.svelte b/src/routes/(static)/register/+page.svelte
index c82c0ef7..468b322a 100644
--- a/src/routes/(static)/register/+page.svelte
+++ b/src/routes/(static)/register/+page.svelte
@@ -13,7 +13,7 @@
import PasswordInput from "$comp/PasswordInput.svelte";
import { focus, fail } from "$lib/utils";
- import { avatar, signer, password, loginRedirect } from "$lib/store";
+ import { avatar, signer, password, pin, loginRedirect } from "$lib/store";
import { t } from "$lib/translations";
import { page } from "$app/stores";
import {