diff options
| author | Adam Soltys <[email protected]> | 2026-02-04 12:42:42 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 15:34:19 -0800 |
| commit | 78c201d8d9d2f3ec07f6ea36201977846e29ccd9 (patch) | |
| tree | 413d697c2cfa9d3e867c791e161183bad958ed86 /src/routes/(app)/+layout.svelte | |
| parent | 882c3bd3fd01b6001172c61e0d2227d962254c62 (diff) | |
| download | coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.tar.gz coinos-ui-78c201d8d9d2f3ec07f6ea36201977846e29ccd9.zip | |
homepage design and currency toggling
Diffstat (limited to 'src/routes/(app)/+layout.svelte')
| -rw-r--r-- | src/routes/(app)/+layout.svelte | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/routes/(app)/+layout.svelte b/src/routes/(app)/+layout.svelte index 19c0708d..3a399c3a 100644 --- a/src/routes/(app)/+layout.svelte +++ b/src/routes/(app)/+layout.svelte @@ -13,6 +13,8 @@ password, pin, theme as themeStore, + fiat, + rate as rateStore, } from "$lib/store"; import { page } from "$app/stores"; import { browser } from "$app/environment"; @@ -20,7 +22,7 @@ import AppHeader from "$comp/AppHeader.svelte"; import Nostr from "$comp/Nostr.svelte"; import Password from "$comp/Password.svelte"; - import { s, success, post, getCookie, warning } from "$lib/utils"; + import { s, f, toFiat, success, post, getCookie, warning } from "$lib/utils"; import { t, locale, loading } from "$lib/translations"; import { goto, invalidate, afterNavigate, preloadData } from "$app/navigation"; @@ -49,7 +51,11 @@ let amount = notification.newVtxos.reduce((a, b) => a + b.value, 0); if (!amount) return; - success(`Received ⚡️${s(amount)}!`); + if ($fiat && $rateStore && user?.currency) { + success(`Received ${f(toFiat(amount, $rateStore), user.currency)}!`); + } else { + success(`Received ⚡️${s(amount)}!`); + } try { let inv = await post(`/invoice`, { |
