1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-04 10:43:47 +00:00

Fix formatting

This commit is contained in:
Nik Gilmore
2025-09-12 12:28:18 -07:00
parent 59a5b6024d
commit bf0634089c
2 changed files with 13 additions and 14 deletions

View File

@@ -29,7 +29,6 @@ import { Login } from "./login";
import { Password } from "./password";
import { SecureNote } from "./secure-note";
import { SshKey } from "./ssh-key";
import { CipherEncryptionService } from "../../abstractions/cipher-encryption.service";
export class Cipher extends Domain implements Decryptable<CipherView> {
readonly initializerKey = InitializerKey.Cipher;

View File

@@ -1127,19 +1127,19 @@ export class CipherService implements CipherServiceAbstraction {
async replace(ciphers: { [id: string]: CipherData }, userId: UserId): Promise<void> {
// use cipher from the sdk and convert to cipher data to store in the state
// uncomment to test migration
const cipherObjects = Object.values(ciphers).map((cipherData) => new Cipher(cipherData));
const migratedCiphers = await this.cipherEncryptionService.migrateCiphers(
cipherObjects,
userId,
);
const resultCiphers: Record<CipherId, CipherData> = migratedCiphers.reduce(
(acc, c) => ({ ...acc, [c.id as CipherId]: c.toCipherData() }),
{} as Record<CipherId, CipherData>,
);
await this.updateEncryptedCipherState(() => resultCiphers, userId);
// const cipherObjects = Object.values(ciphers).map((cipherData) => new Cipher(cipherData));
//
// const migratedCiphers = await this.cipherEncryptionService.migrateCiphers(
// cipherObjects,
// userId,
// );
//
// const resultCiphers: Record<CipherId, CipherData> = migratedCiphers.reduce(
// (acc, c) => ({ ...acc, [c.id as CipherId]: c.toCipherData() }),
// {} as Record<CipherId, CipherData>,
// );
//
// await this.updateEncryptedCipherState(() => resultCiphers, userId);
}
/**