mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
remove dependency on cipher decryption keys (#14408)
- It was not being used in the observable pipeline and causing multiple decryptions
This commit is contained in:
@@ -124,12 +124,8 @@ export class CipherService implements CipherServiceAbstraction {
|
|||||||
* decryption is in progress. The latest decrypted ciphers will be emitted once decryption is complete.
|
* decryption is in progress. The latest decrypted ciphers will be emitted once decryption is complete.
|
||||||
*/
|
*/
|
||||||
cipherViews$ = perUserCache$((userId: UserId): Observable<CipherView[] | null> => {
|
cipherViews$ = perUserCache$((userId: UserId): Observable<CipherView[] | null> => {
|
||||||
return combineLatest([
|
return combineLatest([this.encryptedCiphersState(userId).state$, this.localData$(userId)]).pipe(
|
||||||
this.encryptedCiphersState(userId).state$,
|
filter(([ciphers]) => ciphers != null), // Skip if ciphers haven't been loaded yor synced yet
|
||||||
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)),
|
switchMap(() => this.getAllDecrypted(userId)),
|
||||||
);
|
);
|
||||||
}, this.clearCipherViewsForUser$);
|
}, this.clearCipherViewsForUser$);
|
||||||
|
|||||||
Reference in New Issue
Block a user