mirror of
https://github.com/bitwarden/browser
synced 2025-12-28 14:13:22 +00:00
[PM-7535] Remove Uses of getUserId (#10837)
* Remove Uses of `getUserId` * Fix Test
This commit is contained in:
@@ -235,7 +235,8 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
this.modalService.closeAll();
|
||||
if (
|
||||
message.userId == null ||
|
||||
message.userId === (await this.stateService.getUserId())
|
||||
message.userId ===
|
||||
(await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id))))
|
||||
) {
|
||||
await this.router.navigate(["lock"]);
|
||||
}
|
||||
@@ -274,9 +275,11 @@ export class AppComponent implements OnInit, OnDestroy {
|
||||
await this.openModal<PremiumComponent>(PremiumComponent, this.premiumRef);
|
||||
break;
|
||||
case "showFingerprintPhrase": {
|
||||
const fingerprint = await this.cryptoService.getFingerprint(
|
||||
await this.stateService.getUserId(),
|
||||
const activeUserId = await firstValueFrom(
|
||||
this.accountService.activeAccount$.pipe(map((a) => a?.id)),
|
||||
);
|
||||
const publicKey = await firstValueFrom(this.cryptoService.userPublicKey$(activeUserId));
|
||||
const fingerprint = await this.cryptoService.getFingerprint(activeUserId, publicKey);
|
||||
const dialogRef = FingerprintDialogComponent.open(this.dialogService, { fingerprint });
|
||||
await firstValueFrom(dialogRef.closed);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user