From 803f33495940d8ee82fad360ac4dd82889a8b02d Mon Sep 17 00:00:00 2001 From: Sale Djenic Date: Wed, 27 Mar 2024 11:44:49 +0100 Subject: [PATCH] fix(general): when biometric is setup the authentication flow is not correct showing the password one instead Closes #14173 --- .../modules/shared_modules/keycard_popup/controller.nim | 1 - src/app/modules/shared_modules/keycard_popup/module.nim | 9 +++++++-- ui/app/AppLayouts/Profile/ProfileLayout.qml | 2 ++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/app/modules/shared_modules/keycard_popup/controller.nim b/src/app/modules/shared_modules/keycard_popup/controller.nim index 608cb7b23c..81136db9f1 100644 --- a/src/app/modules/shared_modules/keycard_popup/controller.nim +++ b/src/app/modules/shared_modules/keycard_popup/controller.nim @@ -180,7 +180,6 @@ proc checkKeycardAvailability*(self: Controller) = proc init*(self: Controller, fullConnect = true) = self.connectKeycardReponseSignal() - self.connectKeychainSignals() var handlerId = self.events.onWithUUID(SIGNAL_SHARED_KEYCARD_MODULE_USER_AUTHENTICATED) do(e: Args): let args = SharedKeycarModuleArgs(e) diff --git a/src/app/modules/shared_modules/keycard_popup/module.nim b/src/app/modules/shared_modules/keycard_popup/module.nim index ec07fe0143..d86e74b96b 100644 --- a/src/app/modules/shared_modules/keycard_popup/module.nim +++ b/src/app/modules/shared_modules/keycard_popup/module.nim @@ -551,8 +551,13 @@ proc proceedWithRunFlow[T](self: Module[T], flowToRun: FlowType, keyUid: string, self.controller.tryToObtainDataFromKeychain() return self.view.setCurrentState(newEnterPasswordState(flowToRun, nil)) - self.authenticationPopupIsAlreadyRunning = true - self.controller.readyToDisplayPopup() + if singletonInstance.userProfile.getUsingBiometricLogin(): + self.tmpLocalState = newReadingKeycardState(flowToRun, nil) + self.controller.connectKeychainSignals() + self.controller.tryToObtainDataFromKeychain() + else: + self.authenticationPopupIsAlreadyRunning = true + self.controller.readyToDisplayPopup() return else: self.prepareKeyPairItemForAuthentication(keyUid) diff --git a/ui/app/AppLayouts/Profile/ProfileLayout.qml b/ui/app/AppLayouts/Profile/ProfileLayout.qml index bc3180356e..48609fb322 100644 --- a/ui/app/AppLayouts/Profile/ProfileLayout.qml +++ b/ui/app/AppLayouts/Profile/ProfileLayout.qml @@ -10,6 +10,8 @@ import shared.stores 1.0 as SharedStores import shared.popups.keycard 1.0 import shared.stores.send 1.0 +import StatusQ.Core.Theme 0.1 + import AppLayouts.Wallet.controls 1.0 import AppLayouts.Wallet.stores 1.0