1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-17 00:33:44 +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

@@ -1,6 +1,6 @@
import { Component, NgZone, OnDestroy, OnInit } from "@angular/core";
import { ActivatedRoute, Router } from "@angular/router";
import { firstValueFrom, switchMap } from "rxjs";
import { firstValueFrom, map, switchMap } from "rxjs";
import { LockComponent as BaseLockComponent } from "@bitwarden/angular/auth/components/lock.component";
import { PinServiceAbstraction } from "@bitwarden/auth/common";
@@ -182,7 +182,7 @@ export class LockComponent extends BaseLockComponent implements OnInit, OnDestro
}
private async canUseBiometric() {
const userId = await this.stateService.getUserId();
const userId = await firstValueFrom(this.accountService.activeAccount$.pipe(map((a) => a?.id)));
return await ipc.keyManagement.biometric.enabled(userId);
}