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

This commit is contained in:
Matt Gibson 2022-02-11 03:44:35 -06:00 committed by GitHub
parent 6ad3957500
commit 45ed645cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

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

View File

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