fix(@desktop/onboarding): keycard is not shown in settings after first launch

Fixes: #11314
This commit is contained in:
Sale Djenic 2023-07-12 18:03:26 +02:00 committed by saledjenic
parent 7849d03707
commit f55123ddf1
3 changed files with 7 additions and 6 deletions

View File

@ -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()

View File

@ -74,7 +74,8 @@ const FlowsWeShouldNotTryAKeycardSyncFor* = @[
FlowType.SetupNewKeycardNewSeedPhrase,
FlowType.SetupNewKeycardOldSeedPhrase,
FlowType.ImportFromKeycard,
FlowType.Authentication
FlowType.Authentication,
FlowType.CreateCopyOfAKeycard
]
type

View File

@ -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: