fix(@desktop/onboarding): store to keychain after login issue fixed

This commit is contained in:
Sale Djenic 2023-04-03 12:51:36 +02:00 committed by saledjenic
parent 3f4dd40a3b
commit 3c5c52b138
2 changed files with 3 additions and 4 deletions

View File

@ -82,7 +82,7 @@ proc newController*(delegate: io_interface.AccessInterface,
result.tmpSelectedLoginAccountIsKeycardAccount = false
# Forward declaration
proc cleanTmpData*(self: Controller)
proc cleanTmpData(self: Controller)
proc storeMetadataForNewKeycardUser(self: Controller)
proc storeIdentityImage*(self: Controller): seq[Image]
proc getSelectedLoginAccount*(self: Controller): AccountDto
@ -133,6 +133,7 @@ proc init*(self: Controller) =
var handlerId = self.events.onWithUUID(SignalType.NodeLogin.event) do(e:Args):
let signal = NodeSignal(e)
self.delegate.onNodeLogin(signal.event.error)
self.cleanTmpData()
self.connectionIds.add(handlerId)
handlerId = self.events.onWithUUID(SignalType.NodeStopped.event) do(e:Args):
@ -304,7 +305,7 @@ proc setRecoverUsingSeedPhraseWhileLogin*(self: Controller, value: bool) =
proc getRecoverUsingSeedPhraseWhileLogin*(self: Controller): bool =
return self.tmpRecoverUsingSeedPhraseWhileLogin
proc cleanTmpData*(self: Controller) =
proc cleanTmpData(self: Controller) =
self.tmpSelectedLoginAccountKeyUid = ""
self.tmpSelectedLoginAccountIsKeycardAccount = false
self.tmpProfileImageDetails = ProfileImageDetails()

View File

@ -408,7 +408,6 @@ method onNodeLogin*[T](self: Module[T], error: string) =
return
if currStateObj.flowType() != FlowType.AppLogin:
discard self.controller.storeIdentityImage()
self.controller.cleanTmpData()
self.delegate.finishAppLoading()
else:
self.moveToStartupState()
@ -476,7 +475,6 @@ method onSharedKeycarModuleFlowTerminated*[T](self: Module[T], lastStepInTheCurr
self.keycardSharedModule.delete
self.keycardSharedModule = nil
if lastStepInTheCurrentFlow:
# self.controller.cleanTmpData()
let currStateObj = self.view.currentStartupStateObj()
if currStateObj.isNil:
error "cannot resolve current state for onboarding/login flow continuation"