1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-11 05:43:41 +00:00

[PM-7535] Remove Uses of getUserId (#10837)

* Remove Uses of `getUserId`

* Fix Test
This commit is contained in:
Justin Baur
2024-10-03 10:33:24 -04:00
committed by GitHub
parent 229b712c05
commit 3f8f5bc1fa
13 changed files with 63 additions and 46 deletions

View File

@@ -58,6 +58,14 @@ export abstract class StateService<T extends Account = Account> {
setCryptoMasterKeyAuto: (value: string, options?: StorageOptions) => Promise<void>;
getDuckDuckGoSharedKey: (options?: StorageOptions) => Promise<string>;
setDuckDuckGoSharedKey: (value: string, options?: StorageOptions) => Promise<void>;
/**
* @deprecated Use `TokenService.hasAccessToken$()` or `AuthService.authStatusFor$` instead.
*/
getIsAuthenticated: (options?: StorageOptions) => Promise<boolean>;
/**
* @deprecated Use `AccountService.activeAccount$` instead.
*/
getUserId: (options?: StorageOptions) => Promise<string>;
}

View File

@@ -138,8 +138,6 @@ describe("VaultTimeoutService", () => {
return new BehaviorSubject<VaultTimeout>(accounts[userId]?.vaultTimeout);
});
stateService.getUserId.mockResolvedValue(globalSetups?.userId);
// Set desired user active and known users on accounts service : note the only thing that matters here is that the ID are set
if (globalSetups?.userId) {
accountService.activeAccountSubject.next({