diff --git a/packages/background/src/backend/core.ts b/packages/background/src/backend/core.ts index 45bc19340..e43b58de2 100644 --- a/packages/background/src/backend/core.ts +++ b/packages/background/src/backend/core.ts @@ -89,7 +89,12 @@ import type { EthereumConnectionBackend } from "./ethereum-connection"; import { KeyringStore } from "./keyring"; import type { SolanaConnectionBackend } from "./solana-connection"; import type { Nav, User } from "./store"; -import { getNav , getWalletDataForUser, setUser, setWalletDataForUser } from "./store"; +import { + getNav, + getWalletDataForUser, + setUser, + setWalletDataForUser, +} from "./store"; import * as store from "./store"; const { base58: bs58 } = ethers.utils; @@ -206,11 +211,11 @@ export class Backend { const signersOrConf = "message" in tx ? ({ - accounts: { - encoding: "base64", - addresses, - }, - } as SimulateTransactionConfig) + accounts: { + encoding: "base64", + addresses, + }, + } as SimulateTransactionConfig) : undefined; return await this.solanaConnectionBackend.simulateTransaction( tx, @@ -462,7 +467,7 @@ export class Backend { return data.ethereum && data.ethereum.chainId ? data.ethereum.chainId : // Default to mainnet - "0x1"; + "0x1"; } async ethereumChainIdUpdate(chainId: string): Promise { @@ -866,9 +871,9 @@ export class Backend { * @param blockchain - Blockchain to add the wallet for */ async keyringImportWallet( - blockchain: Blockchain, signedWalletDescriptor: SignedWalletDescriptor ): Promise { + const { blockchain } = signedWalletDescriptor; const { publicKey, name } = await this.keyringStore.addDerivationPath( blockchain, signedWalletDescriptor.derivationPath @@ -1291,8 +1296,6 @@ export class Backend { this.events.emit(BACKEND_EVENT, { name: NOTIFICATION_KEYRING_SET_MNEMONIC, }); - - } async previewPubkeys( diff --git a/packages/background/src/frontend/server-ui.ts b/packages/background/src/frontend/server-ui.ts index 717c607d4..f91cd385a 100644 --- a/packages/background/src/frontend/server-ui.ts +++ b/packages/background/src/frontend/server-ui.ts @@ -50,12 +50,12 @@ import { UI_RPC_METHOD_KEYRING_EXPORT_MNEMONIC, UI_RPC_METHOD_KEYRING_EXPORT_SECRET_KEY, UI_RPC_METHOD_KEYRING_HAS_MNEMONIC, - UI_RPC_METHOD_KEYRING_SET_MNEMONIC, UI_RPC_METHOD_KEYRING_IMPORT_SECRET_KEY, UI_RPC_METHOD_KEYRING_IMPORT_WALLET, UI_RPC_METHOD_KEYRING_KEY_DELETE, UI_RPC_METHOD_KEYRING_READ_NEXT_DERIVATION_PATH, UI_RPC_METHOD_KEYRING_RESET, + UI_RPC_METHOD_KEYRING_SET_MNEMONIC, UI_RPC_METHOD_KEYRING_STORE_CHECK_PASSWORD, UI_RPC_METHOD_KEYRING_STORE_CREATE, UI_RPC_METHOD_KEYRING_STORE_KEEP_ALIVE, @@ -718,7 +718,10 @@ function handleKeyringHasMnemonic(ctx: Context): RpcResponse { return [resp]; } -function handleKeyringSetMnemonic(ctx: Context, mnemonic: string): RpcResponse { +function handleKeyringSetMnemonic( + ctx: Context, + mnemonic: string +): RpcResponse { const resp = ctx.backend.keyringSetMnemonic(mnemonic); return [resp]; }