status-desktop
status-desktop copied to clipboard
Wallet -> Keycard: can't create accounts if the main account was restored in using an existing keycard account
Steps to reproduce
Follow the onboarding process and restore an existing keycard account
- I already use Status
- Login with Keycard
- Enable Wallet
- Click Add Account, fill in the data and authenticate using card
- Click Add Account
Expected behaviour
- The new generated account is added to the list of wallet accounts
Actual behavior
- Nothing happens, card is
Additional Information
- Status desktop version:
de2c421b5e7e1a88fe08953ac2ab7a68197beb4a
- Operating System: MacOS
@saledjenic followin the discussion and investigations in https://github.com/status-im/status-desktop/issues/7715 here are my findings
We are missing call to storeAccount
in the login phase. Therefore creating a wallet account only works with setting up a new keycard and fails when logging in for the first time with an existing account
However, I can't tell quickly from all the ~ 9 possibilities in which case we are when login in the onboarding process
- biometric_state.nim -> executePrimaryCommand
- flowType == FlowType.FirstRunNewUserNewKeycardKeys
- self.flowType == FlowType.FirstRunNewUserImportSeedPhraseIntoKeycard
- self.flowType == FlowType.FirstRunOldUserKeycardImport
- biometric_state.nim -> executeSecondaryCommand
- self.flowType == FlowType.FirstRunNewUserNewKeycardKeys
- self.flowType == FlowType.FirstRunNewUserImportSeedPhraseIntoKeycard
- self.flowType == FlowType.FirstRunOldUserKeycardImport
- user_profile_chat_key.nim -> executePrimaryCommand
- self.flowType == FlowType.FirstRunNewUserNewKeycardKeys
- self.flowType == FlowType.FirstRunNewUserImportSeedPhraseIntoKeycard
- user_profile_confirm_password_state.nim
- self.flowType == FlowType.FirstRunNewUserNewKeycardKeys
@stefandunca it should be FlowType.FirstRunOldUserKeycardImport
, you will run into that, after running the app, if you follow the steps I already use Status
-> Login with Keycard
, that flow is the same one as if you follow I already use Status
-> Enter a seed phrase
, and that is here from the beginning, from the very first start. Initially that flow (not the keycard one, cause it came later and relay on what we had in that moment) was wrongly implemented, also that flow requires synchronization in order to work correctly. I was warning few times about it.
All in all we can not easily fix that, that requires a lot of additional things to be sync correctly, but lot of them are not ready/developed yet.