diff --git a/libs/common/src/platform/models/domain/account.ts b/libs/common/src/platform/models/domain/account.ts index 892686c3d1..0331e3551a 100644 --- a/libs/common/src/platform/models/domain/account.ts +++ b/libs/common/src/platform/models/domain/account.ts @@ -104,15 +104,6 @@ export class AccountKeys { userKeyMasterKey?: string; userKeyAuto?: string; userKeyBiometric?: string; - // deprecated keys - cryptoMasterKey?: SymmetricCryptoKey; - cryptoMasterKeyAuto?: string; - cryptoMasterKeyBiometric?: string; - cryptoSymmetricKey?: EncryptionPair = new EncryptionPair< - string, - SymmetricCryptoKey - >(); - // end deprecated keys deviceKey?: DeviceKey; organizationKeys?: EncryptionPair< { [orgId: string]: EncryptedOrganizationKeyData }, @@ -129,6 +120,18 @@ export class AccountKeys { publicKey?: ArrayBuffer; apiKeyClientSecret?: string; + /** @deprecated July 2023, left for migration purposes*/ + cryptoMasterKey?: SymmetricCryptoKey; + /** @deprecated July 2023, left for migration purposes*/ + cryptoMasterKeyAuto?: string; + /** @deprecated July 2023, left for migration purposes*/ + cryptoMasterKeyBiometric?: string; + /** @deprecated July 2023, left for migration purposes*/ + cryptoSymmetricKey?: EncryptionPair = new EncryptionPair< + string, + SymmetricCryptoKey + >(); + toJSON() { return Utils.merge(this, { publicKey: Utils.fromBufferToByteString(this.publicKey), @@ -235,7 +238,6 @@ export class AccountSettings { userKeyPin?: EncryptedString; userKeyPinEphemeral?: EncryptedString; protectedPin?: string; - pinProtected?: EncryptionPair = new EncryptionPair(); // Deprecated settings?: AccountSettingsSettings; // TODO: Merge whatever is going on here into the AccountSettings model properly vaultTimeout?: number; vaultTimeoutAction?: string = "lock"; @@ -246,6 +248,9 @@ export class AccountSettings { region?: string; smOnboardingTasks?: Record>; + /** @deprecated July 2023, left for migration purposes*/ + pinProtected?: EncryptionPair = new EncryptionPair(); + static fromJSON(obj: Jsonify): AccountSettings { if (obj == null) { return null;