From 45ed645ceace08210fd8d9e7036c3a9aa3f5bdcf Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Fri, 11 Feb 2022 03:44:35 -0600 Subject: [PATCH] Skip unlocking unless locked, not only biometric locked (#2350) --- src/background/main.background.ts | 3 ++- src/background/nativeMessaging.background.ts | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/background/main.background.ts b/src/background/main.background.ts index 38c01cf5d1d..70a12adbbfd 100644 --- a/src/background/main.background.ts +++ b/src/background/main.background.ts @@ -416,7 +416,8 @@ export default class MainBackground { this.appIdService, this.platformUtilsService, this.stateService, - this.logService + this.logService, + this.vaultTimeoutService ); this.commandsBackground = new CommandsBackground( this, diff --git a/src/background/nativeMessaging.background.ts b/src/background/nativeMessaging.background.ts index f231c152092..01e3b4f59ec 100644 --- a/src/background/nativeMessaging.background.ts +++ b/src/background/nativeMessaging.background.ts @@ -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; }