From 56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Wed, 11 Feb 2026 20:10:43 -0800 Subject: format --- src/components/Account.svelte | 66 ++++++++++++------------------------------- 1 file changed, 18 insertions(+), 48 deletions(-) (limited to 'src/components/Account.svelte') diff --git a/src/components/Account.svelte b/src/components/Account.svelte index c88c1118..88b944b3 100644 --- a/src/components/Account.svelte +++ b/src/components/Account.svelte @@ -9,21 +9,10 @@ import { t } from "$lib/translations"; import { versions } from "$lib/utils"; import { arkkey } from "$lib/ark"; - import { - getRememberedWalletPassword, - forgetWalletPassword, - } from "$lib/passwordCache"; + import { getRememberedWalletPassword, forgetWalletPassword } from "$lib/passwordCache"; let { user, rate, account }: any = $props(); - let { - name, - seed, - fingerprint, - balance, - id, - type: accountType, - arkAddress, - } = $derived(account); + let { name, seed, fingerprint, balance, id, type: accountType, arkAddress } = $derived(account); let arkBalance = $state(0); let arkLoading = $state(false); @@ -45,12 +34,11 @@ $arkkey = hex.encode(decrypt(seed, cached) as Uint8Array); } else if (user.seed) { // Master seed: derive m/86'/0'/0'/0/0 - const [{ HDKey }, { entropyToMnemonic, mnemonicToSeed }, { wordlist }] = - await Promise.all([ - import("@scure/bip32"), - import("@scure/bip39"), - import("@scure/bip39/wordlists/english.js"), - ]); + const [{ HDKey }, { entropyToMnemonic, mnemonicToSeed }, { wordlist }] = await Promise.all([ + import("@scure/bip32"), + import("@scure/bip39"), + import("@scure/bip39/wordlists/english.js"), + ]); let entropy = await decrypt(user.seed, cached); let mnemonic = entropyToMnemonic(entropy, wordlist); let s = await mnemonicToSeed(mnemonic, cached); @@ -91,12 +79,11 @@ if (seed) { $arkkey = hex.encode(decrypt(seed, password!) as Uint8Array); } else if (user.seed) { - const [{ HDKey }, { entropyToMnemonic, mnemonicToSeed }, { wordlist }] = - await Promise.all([ - import("@scure/bip32"), - import("@scure/bip39"), - import("@scure/bip39/wordlists/english.js"), - ]); + const [{ HDKey }, { entropyToMnemonic, mnemonicToSeed }, { wordlist }] = await Promise.all([ + import("@scure/bip32"), + import("@scure/bip39"), + import("@scure/bip39/wordlists/english.js"), + ]); let entropy = await decrypt(user.seed, password!); let mnemonic = entropyToMnemonic(entropy, wordlist); let s = await mnemonicToSeed(mnemonic, password!); @@ -153,14 +140,9 @@ onclick={goSettings} > {#if isArk} - Ark + Ark {:else if seed || (user.seed && fingerprint)} - + {:else} {/if} @@ -169,20 +151,9 @@
- setAccount(e, "/invoice")} - > - -- cgit v1.2.3