mirror of
https://github.com/bitwarden/browser
synced 2026-02-04 10:43:47 +00:00
Fix formatting
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user