From 95427ee5189269e992ae4c788ce356709ed92c57 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Mon, 16 Feb 2026 16:05:56 -0800 Subject: default accounts --- src/components/Account.svelte | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/components') diff --git a/src/components/Account.svelte b/src/components/Account.svelte index 5ba1bedd..953e44ab 100644 --- a/src/components/Account.svelte +++ b/src/components/Account.svelte @@ -11,7 +11,6 @@ import { fiat } from "$lib/store"; import { arkkey, arkaid } from "$lib/ark"; import { getRememberedWalletPassword, forgetWalletPassword, getCachedPrfKey } from "$lib/passwordCache"; - import { isPrfEncrypted, prfDecrypt } from "$lib/crypto"; let { user, rates, account }: any = $props(); let currency = $derived(account.currency || user.currency); @@ -31,14 +30,14 @@ let tryUnlockArk = async () => { // Try PRF key first const prfKey = getCachedPrfKey(); - if (prfKey && user.seed && isPrfEncrypted(user.seed)) { + if (prfKey) { try { const [{ HDKey }, { entropyToMnemonic, mnemonicToSeed }, { wordlist }] = await Promise.all([ import("@scure/bip32"), import("@scure/bip39"), import("@scure/bip39/wordlists/english.js"), ]); - const entropy = await prfDecrypt(prfKey, user.seed); + const entropy = new Uint8Array(prfKey); const mnemonic = entropyToMnemonic(entropy, wordlist); const s = await mnemonicToSeed(mnemonic); const master = HDKey.fromMasterSeed(s, versions); @@ -130,7 +129,7 @@ let displayType = $derived( accountType === "ark" ? $t("accounts.ark") - : seed || (user.seed && fingerprint) + : seed || fingerprint ? $t("accounts.bitcoin") : $t("accounts.custodial"), ); @@ -174,7 +173,7 @@
{#if isArk} Ark - {:else if seed || (user.seed && fingerprint)} + {:else if seed || fingerprint} {:else} Coinos -- cgit v1.2.3