1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-16 08:13:42 +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

@@ -23,7 +23,6 @@ import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/pl
import { StateService } from "@bitwarden/common/platform/abstractions/state.service";
import { StateEventRunnerService } from "@bitwarden/common/platform/state";
import { SyncService } from "@bitwarden/common/platform/sync";
import { UserId } from "@bitwarden/common/types/guid";
import { CipherService } from "@bitwarden/common/vault/abstractions/cipher.service";
import { CollectionService } from "@bitwarden/common/vault/abstractions/collection.service";
import { InternalFolderService } from "@bitwarden/common/vault/abstractions/folder/folder.service.abstraction";
@@ -277,7 +276,7 @@ export class AppComponent implements OnDestroy, OnInit {
await this.displayLogoutReason(logoutReason);
await this.eventUploadService.uploadEvents();
const userId = (await this.stateService.getUserId()) as UserId;
const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));
const logoutPromise = firstValueFrom(
this.authService.authStatusFor$(userId).pipe(