Skip unlocking unless locked, not only biometric locked (#2350)

(cherry picked from commit 45ed645cea)
This commit is contained in:
Matt Gibson 2022-02-11 03:44:35 -06:00
parent 9c2efe9f7f
commit d4ff3ceb3b
2 changed files with 6 additions and 3 deletions

View File

@ -411,7 +411,8 @@ export default class MainBackground {
this.appIdService,
this.platformUtilsService,
this.stateService,
this.logService
this.logService,
this.vaultTimeoutService
);
this.commandsBackground = new CommandsBackground(
this,

View File

@ -6,6 +6,7 @@ import { LogService } from "jslib-common/abstractions/log.service";
import { MessagingService } from "jslib-common/abstractions/messaging.service";
import { PlatformUtilsService } from "jslib-common/abstractions/platformUtils.service";
import { StateService } from "jslib-common/abstractions/state.service";
import { VaultTimeoutService } from "jslib-common/abstractions/vaultTimeout.service";
import { Utils } from "jslib-common/misc/utils";
@ -74,7 +75,8 @@ export class NativeMessagingBackground {
private appIdService: AppIdService,
private platformUtilsService: PlatformUtilsService,
private stateService: StateService,
private logService: LogService
private logService: LogService,
private vaultTimeoutService: VaultTimeoutService
) {
this.stateService.setBiometricFingerprintValidated(false);
@ -307,7 +309,7 @@ export class NativeMessagingBackground {
}
// Ignore unlock if already unlocked
if (!(await this.stateService.getBiometricLocked())) {
if (!(await this.vaultTimeoutService.isLocked())) {
break;
}