mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-04 02:34:52 +00:00
fix(@desktop/onboarding): getting back to login screen doesn't check if inserted keycard match the selected user - fixed
This commit is contained in:
parent
f7db677c95
commit
b97e1fc8da
@ -35,11 +35,11 @@ method resolveKeycardNextState*(self: LoginKeycardEnterPinState, keycardFlowType
|
||||
if not state.isNil:
|
||||
return state
|
||||
if self.flowType == FlowType.AppLogin:
|
||||
if keycardFlowType == ResponseTypeValueKeycardFlowResult and
|
||||
keycardEvent.error.len == 0:
|
||||
if not controller.keyUidMatchSelectedLoginAccount(keycardEvent.keyUid):
|
||||
controller.setPin("")
|
||||
return createState(StateType.LoginKeycardWrongKeycard, self.flowType, nil)
|
||||
if keycardFlowType == ResponseTypeValueKeycardFlowResult and
|
||||
keycardEvent.error.len == 0:
|
||||
controller.setKeycardEvent(keycardEvent)
|
||||
return createState(StateType.LoginKeycardPinVerified, self.flowType, nil)
|
||||
if keycardFlowType == ResponseTypeValueEnterPIN and
|
||||
|
@ -37,6 +37,9 @@ method resolveKeycardNextState*(self: LoginKeycardWrongPinState, keycardFlowType
|
||||
if not state.isNil:
|
||||
return state
|
||||
if self.flowType == FlowType.AppLogin:
|
||||
if not controller.keyUidMatchSelectedLoginAccount(keycardEvent.keyUid):
|
||||
controller.setPin("")
|
||||
return createState(StateType.LoginKeycardWrongKeycard, self.flowType, nil)
|
||||
if keycardFlowType == ResponseTypeValueEnterPIN and
|
||||
keycardEvent.error.len > 0 and
|
||||
keycardEvent.error == RequestParamPIN:
|
||||
|
@ -27,6 +27,9 @@ proc ensureReaderAndCardPresenceAndResolveNextLoginState*(state: State, keycardF
|
||||
if state.flowType == FlowType.AppLogin:
|
||||
if keycardFlowType == ResponseTypeValueKeycardFlowResult and
|
||||
keycardEvent.error.len == 0:
|
||||
if not controller.keyUidMatchSelectedLoginAccount(keycardEvent.keyUid):
|
||||
controller.setPin("")
|
||||
return createState(StateType.LoginKeycardWrongKeycard, state.flowType, nil)
|
||||
controller.setKeycardEvent(keycardEvent)
|
||||
return createState(StateType.LoginKeycardPinVerified, state.flowType, nil)
|
||||
if keycardFlowType == ResponseTypeValueEnterPIN:
|
||||
|
Loading…
x
Reference in New Issue
Block a user