From 2980cd41bea0e180e2983c90e94bc48a94f5239a Mon Sep 17 00:00:00 2001 From: Nick Krantz Date: Fri, 25 Apr 2025 10:21:26 -0500 Subject: [PATCH] Revert "remove dependency on cipher decryption keys (#14408)" This reverts commit 1051e6d9a419362732f0bd056b2f7c2d8bf9ef4b. --- libs/common/src/vault/services/cipher.service.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/common/src/vault/services/cipher.service.ts b/libs/common/src/vault/services/cipher.service.ts index 97acc3469b8..c192876c83e 100644 --- a/libs/common/src/vault/services/cipher.service.ts +++ b/libs/common/src/vault/services/cipher.service.ts @@ -124,8 +124,12 @@ export class CipherService implements CipherServiceAbstraction { * decryption is in progress. The latest decrypted ciphers will be emitted once decryption is complete. */ cipherViews$ = perUserCache$((userId: UserId): Observable => { - return combineLatest([this.encryptedCiphersState(userId).state$, this.localData$(userId)]).pipe( - filter(([ciphers]) => ciphers != null), // Skip if ciphers haven't been loaded yor synced yet + return combineLatest([ + this.encryptedCiphersState(userId).state$, + this.localData$(userId), + this.keyService.cipherDecryptionKeys$(userId, true), + ]).pipe( + filter(([ciphers, keys]) => ciphers != null && keys != null), // Skip if ciphers haven't been loaded yor synced yet switchMap(() => this.getAllDecrypted(userId)), ); }, this.clearCipherViewsForUser$);