fix(@desktop/keycard): cleaning last received data from the keycard service after ui flow is done
This commit is contained in:
parent
6ca9da5e84
commit
0a04e1a67c
|
@ -406,6 +406,11 @@ proc getLastReceivedKeycardData*(self: Controller): tuple[flowType: string, flow
|
|||
return
|
||||
return self.keycardService.getLastReceivedKeycardData()
|
||||
|
||||
proc cleanReceivedKeycardData*(self: Controller) =
|
||||
if not serviceApplicable(self.keycardService):
|
||||
return
|
||||
self.keycardService.cleanReceivedKeycardData()
|
||||
|
||||
proc getMetadataFromKeycard*(self: Controller): CardMetadata =
|
||||
return self.tmpCardMetadata
|
||||
|
||||
|
|
|
@ -61,6 +61,7 @@ method delete*[T](self: Module[T]) =
|
|||
proc init[T](self: Module[T], fullConnect = true) =
|
||||
if not self.initialized:
|
||||
self.initialized = true
|
||||
self.controller.cleanReceivedKeycardData()
|
||||
self.controller.init(fullConnect)
|
||||
|
||||
method getModuleAsVariant*[T](self: Module[T]): QVariant =
|
||||
|
|
|
@ -112,6 +112,9 @@ QtObject:
|
|||
proc getLastReceivedKeycardData*(self: Service): tuple[flowType: string, flowEvent: KeycardEvent] =
|
||||
return self.lastReceivedKeycardData
|
||||
|
||||
proc cleanReceivedKeycardData*(self: Service) =
|
||||
self.lastReceivedKeycardData = ("", KeycardEvent())
|
||||
|
||||
proc buildSeedPhrasesFromIndexes*(self: Service, seedPhraseIndexes: seq[int]): seq[string] =
|
||||
var seedPhrase: seq[string]
|
||||
for ind in seedPhraseIndexes:
|
||||
|
|
Loading…
Reference in New Issue