diff --git a/extension/js/common/core/expiration-cache.ts b/extension/js/common/core/expiration-cache.ts index c114b8ddb36..17cfc61c120 100644 --- a/extension/js/common/core/expiration-cache.ts +++ b/extension/js/common/core/expiration-cache.ts @@ -84,8 +84,8 @@ export class ExpirationCache { keysToDelete.push(key); } } - for (const key of keysToDelete) { - await this.set(key); + if (keysToDelete.length) { + await storageRemove('session', keysToDelete); } }; diff --git a/extension/js/common/settings.ts b/extension/js/common/settings.ts index 2a4a5744f5d..5e726211bae 100644 --- a/extension/js/common/settings.ts +++ b/extension/js/common/settings.ts @@ -44,7 +44,7 @@ export class Settings { userInputs: PgpPwd.weakWords(), }, }; - const zxcvbn = new zxcvbnts.core.ZxcvbnFactory(options); + const zxcvbn = new zxcvbnts.core.ZxcvbnFactory(options) as { check(passphrase: string): { guesses: number } }; const guesses = zxcvbn.check(passphrase).guesses; return PgpPwd.estimateStrength(guesses, type); }