mirror of
https://github.com/bitwarden/browser
synced 2025-12-16 00:03:56 +00:00
[EC-364] Expose key getters on CryptoService (#3170)
* Move resolveLegacyKey to encryptService for utf8 decryption * Deprecate account.keys.legacyEtmKey Includes migration to tidy up leftover data * Use new IEncrypted interface
This commit is contained in:
@@ -127,4 +127,20 @@ describe("State Migration Service", () => {
|
||||
expect(migratedAccount).toEqual(expectedAccount);
|
||||
});
|
||||
});
|
||||
|
||||
describe("StateVersion 5 to 6 migration", () => {
|
||||
it("deletes account.keys.legacyEtmKey value", async () => {
|
||||
const accountVersion5 = new Account({
|
||||
keys: {
|
||||
legacyEtmKey: "legacy key",
|
||||
},
|
||||
} as any);
|
||||
|
||||
const migratedAccount = await (stateMigrationService as any).migrateAccountFrom5To6(
|
||||
accountVersion5
|
||||
);
|
||||
|
||||
expect(migratedAccount.keys.legacyEtmKey).toBeUndefined();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user