mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-23 20:18:47 +00:00
fix(@desktop/onboarding): keycard is not shown in settings after first launch
Fixes: #11314
This commit is contained in:
parent
7849d03707
commit
f55123ddf1
@ -18,7 +18,7 @@ proc buildKeypairAndAddToMigratedKeypairs(self: CopyingKeycardState, controller:
|
||||
keycardLocked: false,
|
||||
keyUid: controller.getKeyPairForProcessing().getKeyUid(),
|
||||
accountsAddresses: addresses)
|
||||
controller.addKeycardOrAccounts(keycardDto)
|
||||
controller.addKeycardOrAccounts(keycardDto, accountsComingFromKeycard = true)
|
||||
|
||||
proc runStoreMetadataFlow(self: CopyingKeycardState, controller: Controller) =
|
||||
let cardMetadata = controller.getMetadataForKeycardCopy()
|
||||
@ -32,7 +32,7 @@ method executePrePrimaryStateCommand*(self: CopyingKeycardState, controller: Con
|
||||
self.buildKeypairAndAddToMigratedKeypairs(controller)
|
||||
|
||||
method executePreSecondaryStateCommand*(self: CopyingKeycardState, controller: Controller) =
|
||||
## Secondary action is called after each async action during migration process.
|
||||
## Secondary action is called after each async action during migration process.
|
||||
if self.flowType == FlowType.CreateCopyOfAKeycard:
|
||||
if controller.getAddingMigratedKeypairSuccess():
|
||||
self.runStoreMetadataFlow(controller)
|
||||
@ -42,12 +42,12 @@ method getNextSecondaryState*(self: CopyingKeycardState, controller: Controller)
|
||||
if not controller.getAddingMigratedKeypairSuccess():
|
||||
return createState(StateType.CopyingKeycardFailure, self.flowType, nil)
|
||||
|
||||
method resolveKeycardNextState*(self: CopyingKeycardState, keycardFlowType: string, keycardEvent: KeycardEvent,
|
||||
method resolveKeycardNextState*(self: CopyingKeycardState, keycardFlowType: string, keycardEvent: KeycardEvent,
|
||||
controller: Controller): State =
|
||||
let state = ensureReaderAndCardPresenceAndResolveNextState(self, keycardFlowType, keycardEvent, controller)
|
||||
if not state.isNil:
|
||||
return state
|
||||
if self.flowType == FlowType.CreateCopyOfAKeycard:
|
||||
if keycardFlowType == ResponseTypeValueKeycardFlowResult and
|
||||
if keycardFlowType == ResponseTypeValueKeycardFlowResult and
|
||||
keycardEvent.error.len == 0:
|
||||
return createState(StateType.CopyingKeycardSuccess, self.flowType, nil)
|
@ -74,7 +74,8 @@ const FlowsWeShouldNotTryAKeycardSyncFor* = @[
|
||||
FlowType.SetupNewKeycardNewSeedPhrase,
|
||||
FlowType.SetupNewKeycardOldSeedPhrase,
|
||||
FlowType.ImportFromKeycard,
|
||||
FlowType.Authentication
|
||||
FlowType.Authentication,
|
||||
FlowType.CreateCopyOfAKeycard
|
||||
]
|
||||
|
||||
type
|
||||
|
@ -269,7 +269,7 @@ proc handleKeycardSyncing[T](self: Module[T]) =
|
||||
if accountsToRemove.len > 0:
|
||||
self.controller.removeMigratedAccountsForKeycard(kpDto.keyUid, kpDto.keycardUid, accountsToRemove)
|
||||
if kpDto.accountsAddresses.len > 0:
|
||||
self.controller.addKeycardOrAccounts(kpDto)
|
||||
self.controller.addKeycardOrAccounts(kpDto, accountsComingFromKeycard = true)
|
||||
# if all accounts are removed from the app, there is no point in storing empty accounts list to a keycard, cause in that case
|
||||
# keypair which is on that keycard won't be known to the app, that means keypair was removed from the app
|
||||
if activeValidPathsToStoreToAKeycard.len > 0:
|
||||
|
Loading…
x
Reference in New Issue
Block a user