From 78c201d8d9d2f3ec07f6ea36201977846e29ccd9 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 4 Feb 2026 12:42:42 -0800 Subject: homepage design and currency toggling --- src/routes/(app)/+layout.svelte | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/routes/(app)/+layout.svelte') 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`, { -- cgit v1.2.3