diff options
| author | Adam Soltys <[email protected]> | 2026-02-16 22:05:24 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-16 22:05:24 -0800 |
| commit | d0784c34787e6d96f0131af2e12079e7915b2f57 (patch) | |
| tree | b814727de91158b9212aeddd45152c8d3bbda39c /src/components | |
| parent | 99aee9c7d9265d9963e045d418fb231813a002f2 (diff) | |
| download | coinos-ui-d0784c34787e6d96f0131af2e12079e7915b2f57.tar.gz coinos-ui-d0784c34787e6d96f0131af2e12079e7915b2f57.zip | |
seed import
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/Account.svelte | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/components/Account.svelte b/src/components/Account.svelte index 88b08978..2ea7c9c0 100644 --- a/src/components/Account.svelte +++ b/src/components/Account.svelte @@ -8,7 +8,7 @@ import Balance from "$comp/Balance.svelte"; import { t } from "$lib/translations"; import { versions, s, f, loc, toFiat } from "$lib/utils"; - import { fiat } from "$lib/store"; + import { fiat, importing } from "$lib/store"; import { arkkey, arkaid } from "$lib/ark"; import { getRememberedWalletPassword, forgetWalletPassword, getCachedPrfKey } from "$lib/passwordCache"; @@ -37,7 +37,7 @@ import("@scure/bip39"), import("@scure/bip39/wordlists/english.js"), ]); - const entropy = new Uint8Array(prfKey); + const entropy = new Uint8Array(prfKey).slice(0, 16); const mnemonic = entropyToMnemonic(entropy, wordlist); const s = await mnemonicToSeed(mnemonic); const master = HDKey.fromMasterSeed(s, versions); @@ -61,7 +61,7 @@ import("@scure/bip39"), import("@scure/bip39/wordlists/english.js"), ]); - const entropy = new Uint8Array(nostrKey); + const entropy = new Uint8Array(nostrKey).slice(0, 16); const mnemonic = entropyToMnemonic(entropy, wordlist); const s = await mnemonicToSeed(mnemonic); const master = HDKey.fromMasterSeed(s, versions); @@ -187,11 +187,15 @@ <div class="flex items-start justify-between gap-4"> <div> <div class="text-lg text-gray-400">{displayName}</div> - <Balance {balance} {user} {rate} {id} {currency} /> - {#if pending} - <div class="text-lg text-gray-600"> - +{$fiat && rate ? f(toFiat(pending, rate), currency, loc(user)) : s(pending)} {$t("accounts.pending")} - </div> + {#if $importing.has(id)} + <div class="text-lg text-gray-400">{$t("accounts.importing")}</div> + {:else} + <Balance {balance} {user} {rate} {id} {currency} /> + {#if pending} + <div class="text-lg text-gray-600"> + +{$fiat && rate ? f(toFiat(pending, rate), currency, loc(user)) : s(pending)} {$t("accounts.pending")} + </div> + {/if} {/if} </div> <div class="flex items-center gap-1 shrink-0 text-black"> |
