mirror of
https://github.com/bitwarden/browser
synced 2025-12-06 00:13:28 +00:00
Use global state for biometric prompt cancel storage (#8328)
* Fix error on close due to context differences in background Desktop background does not have active user information. Also, we want to delete _all_ prompt cancelled data, not just that for the active user. Storing this on global and manipulating observables to active achieves this without needing any user information in the background. * Remove potentially orphaned data * Throw nice error if prompt cancelled used without active user * Register migration
This commit is contained in:
@@ -70,6 +70,9 @@ export class FakeAccountService implements AccountService {
|
||||
}
|
||||
|
||||
async switchAccount(userId: UserId): Promise<void> {
|
||||
const next =
|
||||
userId == null ? null : { id: userId, ...this.accountsSubject["_buffer"]?.[0]?.[userId] };
|
||||
this.activeAccountSubject.next(next);
|
||||
await this.mock.switchAccount(userId);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user