1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-11 10:10:25 +01:00

Fix nativeMessaging background by replacing removed state service usage with account service for user id retrieval (#10501)

This commit is contained in:
Jared Snider 2024-08-13 11:12:59 -04:00 committed by GitHub
parent 5ce5f836e2
commit 43da67ee51
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -337,7 +337,8 @@ export class NativeMessagingBackground {
// Verify key is correct by attempting to decrypt a secret
try {
await this.cryptoService.getFingerprint(await this.stateService.getUserId());
const userId = (await firstValueFrom(this.accountService.activeAccount$))?.id;
await this.cryptoService.getFingerprint(userId);
} catch (e) {
this.logService.error("Unable to verify key: " + e);
await this.cryptoService.clearKeys();