mirror of
https://github.com/bitwarden/browser
synced 2026-01-31 00:33:33 +00:00
Clean up migration
This commit is contained in:
@@ -27,6 +27,8 @@ describe("RemoveUserEncryptedPrivateKey", () => {
|
||||
user_user2_CRYPTO_DISK_userSigningKey: "sign2",
|
||||
user_user1_CRYPTO_DISK_userSignedPublicKey: "pub1",
|
||||
user_user2_CRYPTO_DISK_userSignedPublicKey: "pub2",
|
||||
user_user1_CRYPTO_DISK_accountSecurityState: "security1",
|
||||
user_user2_CRYPTO_DISK_accountSecurityState: "security2",
|
||||
});
|
||||
|
||||
expect(output).toEqual({
|
||||
|
||||
@@ -1,9 +1,3 @@
|
||||
export const accountSecurityState: KeyDefinitionLike = {
|
||||
key: "accountSecurityState",
|
||||
stateDefinition: {
|
||||
name: "CRYPTO_DISK",
|
||||
},
|
||||
};
|
||||
import { KeyDefinitionLike, MigrationHelper } from "../migration-helper";
|
||||
import { IRREVERSIBLE, Migrator } from "../migrator";
|
||||
|
||||
@@ -30,6 +24,13 @@ export const userSignedPublicKey: KeyDefinitionLike = {
|
||||
},
|
||||
};
|
||||
|
||||
export const accountSecurityState: KeyDefinitionLike = {
|
||||
key: "accountSecurityState",
|
||||
stateDefinition: {
|
||||
name: "CRYPTO_DISK",
|
||||
},
|
||||
};
|
||||
|
||||
export class RemoveUserEncryptedPrivateKey extends Migrator<74, 75> {
|
||||
async migrate(helper: MigrationHelper): Promise<void> {
|
||||
const accounts = await helper.getAccounts<ExpectedAccountType>();
|
||||
|
||||
Reference in New Issue
Block a user