From f2c16f6a611e529a974512b41662f0e1410f4bd2 Mon Sep 17 00:00:00 2001 From: Frederik Bolding Date: Thu, 30 Apr 2026 10:59:19 +0200 Subject: [PATCH] fix: Make isVaultUpdated required on Encryptor --- packages/keyring-controller/src/KeyringController.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/keyring-controller/src/KeyringController.ts b/packages/keyring-controller/src/KeyringController.ts index ba5ea40a67..ddae095ab9 100644 --- a/packages/keyring-controller/src/KeyringController.ts +++ b/packages/keyring-controller/src/KeyringController.ts @@ -380,14 +380,13 @@ export type Encryptor< */ decrypt: (password: string, encryptedString: string) => Promise; /** - * Optional vault migration helper. Checks if the provided vault is up to date - * with the desired encryption algorithm. + * Checks if the provided vault is up to date with the desired encryption algorithm. * * @param vault - The encrypted string to check. * @param targetDerivationParams - The desired target derivation params. * @returns The updated encrypted string. */ - isVaultUpdated?: ( + isVaultUpdated: ( vault: string, targetDerivationParams?: encryptorUtils.KeyDerivationOptions, ) => boolean; @@ -2755,7 +2754,7 @@ export class KeyringController< #isNewEncryptionAvailable(): boolean { const { vault } = this.state; - if (!vault || !this.#encryptor.isVaultUpdated) { + if (!vault) { return false; }