1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

[PM-24280] Remove account service from state (#15828)

* Introduce ActiveUserAccessor

* Use ActiveUserAccessor over AccountService

* Updates tests and testing utils to support ActiveUserAccessor

* Update all injection points

* Fix types test

* Use ternary instead
This commit is contained in:
Justin Baur
2025-07-31 09:09:14 -04:00
committed by GitHub
parent 9c8188875a
commit 4f9b2b618f
14 changed files with 118 additions and 104 deletions

View File

@@ -44,6 +44,7 @@ import {
} from "@bitwarden/common/auth/services/account.service";
import { AuthService } from "@bitwarden/common/auth/services/auth.service";
import { AvatarService } from "@bitwarden/common/auth/services/avatar.service";
import { DefaultActiveUserAccessor } from "@bitwarden/common/auth/services/default-active-user.accessor";
import { DevicesApiServiceImplementation } from "@bitwarden/common/auth/services/devices-api.service.implementation";
import { MasterPasswordApiService } from "@bitwarden/common/auth/services/master-password/master-password-api.service.implementation";
import { TokenService } from "@bitwarden/common/auth/services/token.service";
@@ -377,7 +378,7 @@ export class ServiceContainer {
);
this.activeUserStateProvider = new DefaultActiveUserStateProvider(
this.accountService,
new DefaultActiveUserAccessor(this.accountService),
this.singleUserStateProvider,
);