aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Account.svelte
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-02-13 21:08:25 -0800
committerAdam Soltys <[email protected]>2026-02-13 21:08:25 -0800
commit8eb6cfb222c6c438374421b4e3918372a66e28b5 (patch)
tree10c88e5fc2ef0a729e607feba83b9c42a566b6ea /src/components/Account.svelte
parentb4c9562ffb5de676cc6c4bf711c517f524d1e946 (diff)
downloadcoinos-ui-8eb6cfb222c6c438374421b4e3918372a66e28b5.tar.gz
coinos-ui-8eb6cfb222c6c438374421b4e3918372a66e28b5.zip
get currency from account
Diffstat (limited to 'src/components/Account.svelte')
-rw-r--r--src/components/Account.svelte8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte
index df2c51ea..d588932a 100644
--- a/src/components/Account.svelte
+++ b/src/components/Account.svelte
@@ -12,7 +12,9 @@
import { arkkey } from "$lib/ark";
import { getRememberedWalletPassword, forgetWalletPassword } from "$lib/passwordCache";
- let { user, rate, account }: any = $props();
+ let { user, rates, account }: any = $props();
+ let currency = $derived(account.currency || user.currency);
+ let rate = $derived(rates[currency]);
let { name, seed, fingerprint, balance, pending, id, type: accountType, arkAddress } = $derived(account);
let arkBalance = $state(0);
@@ -135,10 +137,10 @@
<div class="flex items-start justify-between gap-4">
<div>
<div class="text-lg text-gray-400">{displayName}</div>
- <Balance {balance} {user} {rate} {id} />
+ <Balance {balance} {user} {rate} {id} {currency} />
{#if pending}
<div class="text-lg text-gray-600">
- +{$fiat && rate ? f(toFiat(pending, rate), user.currency, loc(user)) : s(pending)} pending
+ +{$fiat && rate ? f(toFiat(pending, rate), currency, loc(user)) : s(pending)} pending
</div>
{/if}
</div>