1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-11 22:13:32 +00:00

Fix type warnings

This commit is contained in:
Bernd Schoolmann
2025-01-13 18:31:44 +01:00
parent 1a6d519ddc
commit e141a1a438

View File

@@ -80,7 +80,7 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
}
}
async unlockWithBiometricsForUser(userId: UserId): Promise<UserKey | null> {
async unlockWithBiometricsForUser(userId: UserId): Promise<UserKey | null | undefined> {
try {
await this.ensureConnected();
@@ -92,7 +92,7 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
if (response.response == "unlocked") {
const decodedUserkey = Utils.fromB64ToArray(response.userKeyB64);
const userKey = new SymmetricCryptoKey(decodedUserkey) as UserKey;
if (this.keyService.validateUserKey(userKey, userId)) {
if (await this.keyService.validateUserKey(userKey, userId)) {
await this.biometricStateService.setBiometricUnlockEnabled(true);
await this.biometricStateService.setFingerprintValidated(true);
this.keyService.setUserKey(userKey, userId);
@@ -109,7 +109,7 @@ export class BackgroundBrowserBiometricsService extends BiometricsService {
if (response.response) {
const decodedUserkey = Utils.fromB64ToArray(response.userKeyB64);
const userKey = new SymmetricCryptoKey(decodedUserkey) as UserKey;
if (this.keyService.validateUserKey(userKey, userId)) {
if (await this.keyService.validateUserKey(userKey, userId)) {
await this.biometricStateService.setBiometricUnlockEnabled(true);
await this.biometricStateService.setFingerprintValidated(true);
this.keyService.setUserKey(userKey, userId);