Closed Serhy closed 4 years ago
@guylouis the expected result of this behavior based on relatively old requirements. Would there might be another expected result?
@Serhy do you mean that
and in this case
If yes, that's an issue since there should never be two multiaccounts with the same seed as described here https://github.com/status-im/status-react/issues/8750
@guylouis the question here is that case: 1) User create keycard multiaccount on device1 (seed1) 2) User tries to restore ordinary account with seed1 on device2
On our test cases (written by Nastya) - it is not possible, error is
I want to find out what is expected result in this case and in case if we plan to restore account from seed phrase in MetaMask for example.
It's not the case when 2 identical account are created.
For same seed phrase status-go multiAccountImportMnemonic
and keycard generateAndLoadKey
derive different keys. For instance, curtain mosquito taste relief topple valid initial plug fall there talk core
derive path m/43'/60'/1581'/0'/0
:
0x04a0a4d09cdafdca75b131d82df8a1a593efe0293573694a74ff1d99be65e39899d331b0f21201a044893e34c718276c9563803a66cb600e07559d5a5d15f2361b
0x047079b55c3a9e1bc37e45253150a515e4f1001357d957b9873940c79dd5cc005f4039dc37422dd0ae46086fc121e5a071a30010c043cef08206a13602edfa3431
I'd like to ask someone from @status-im/go to check if multiAccountImportMnemonic
works as expected.
cc @gravityblast
tested with today's nightly StatusIm-191016-025900-8e9010-nightly-universal.apk and I confirm that on the same phone if I create
Then: I get two multiaccounts on the phone with different
Whereas the intended behaviour is that
@gravityblast see the discussion above, can the issue be in go ?
I'm trying with yesterday's and today's nightly but even when I select keycard it asks for a password and the keycard is never used. Does it work for you?
no it doesn't opened an issue https://github.com/status-im/status-react/issues/9231
User create keycard multiaccount on device1 (seed1) User tries to restore ordinary account with seed1 on device2 On our test cases (written by Nastya) - it is not possible, error is
@churik are you only trying to recover a normal mnemonic phrase in a different device? Maybe I'm missing something but device 2 shouldn't know that the mnemonic has been used for a keycard. or does device 2 already have the same account with keycard as well?
@dmitryn
We tried to import your mnemonic to both keycard and status-go manually (outside status) and deriving the chat key.
They both derive the same public key 0x04a0a4d09cdafdca75b131d82df8a1a593efe0293573694a74ff1d99be65e39899d331b0f21201a044893e34c718276c9563803a66cb600e07559d5a5d15f2361b
.
So I guess maybe we are deriving something else from within status? I can't really test it because the nightly build doesn't work with the keycard. Is there anyone else that can try importing that specific mnemonic to a keycard with a nightly build?
@gravityblast nightly build is working with keycard, I suppose you download it from https://status.im/nightly/ which is not updated ~for 1 month. Please use https://ci.status.im/job/status-react/job/nightly/ to get latest develop builds.
@churik are you only trying to recover a normal mnemonic phrase in a different device? Maybe I'm missing something but device 2 shouldn't know that the mnemonic has been used for a keycard. or does device 2 already have the same account with keycard as well?
I don't know for sure. My only source of truth was testcase, created on 01/2019, where is clearly stated that should be error at attempt to recover keycard account with password.
Full reproduction of the issue. I have to use a different mnemonic than the one above because it's not possible to recover a seed on a keycard now (issue #9231 )
FIRST STEP: SET UP A KEYCARD MULTIACCOUNT
SECOND STEP: SET UP A NON-KEYCARD MULTIACCOUNT WITH SAME SEED ON THE SAME PHONE
CONCLUSION: same seed but everything is different: chat key, wallet address and three names
@guylouis I think we display the wrong public key. Try again setting up a Keycard, then re-install status and pair the card with your pairing password. The public key is different, and in this case we aren't even using the mnemonic phrase.
@churik I used the build you say but trying importing a mnemonic to a keycard instead of setting up a new account from scratch and it wasn't working
@gravityblast yes this is #9231
with regards to the public key issue, who can check where is the bug, is it @dmitryn ? Can you share here elements that leads to think issue is on react and not go ? Thanks
@guylouis first of all there's something wrong with the mnemonic. if you try to import it in any other wallet like mycrypto, you will see it's invalid. Then if I use the mnemonic with our new and old libraries in go, I see that the right address is the second one. so I guess there's something wrong when we call the keycard API maybe. yes I htink @dmitryn knows more about it
just to clarify, issues title states:
Can recover account with seedphrase created with keycard
As far as I understand, there is no problem in ability to recover keycard's account as a regular account on device. Almost likely we want that account/phrase to be compatible with any other wallet/storage, so that shouldn't be a problem at all.
But we still have two problems with keycard's mnemonic:
pairing
, at least how I understood. Probably it can be used for restoring keycards setup somehow, but you definitely can't use this passphrase at MEW or other wallet.So I would just close this issue as it is a bit misleading already and create a new one for 1. if it doesn't exist already.
@rachelhamlin @guylouis wdyt ?
There were several problems yes !
As for the original problem from this issue, it now has several subparts caused by the same root cause or not. I'll close this one and open a new one (#9393) that shows the symptoms
closing this one, since tackled in the three issues listed above
Type: Bug Account created with keycard can be recovered in Status as normal account.
Summary: Account created with keycard can be recovered in Status as normal account.
Expected behavior
Image for expected case!
Actual behavior
Account recovered as normal account
Reproduction
Precondition
Seedphrase of an account created with keycard exists (e.g.
pepper save spread chaos unable narrow couple little clog monkey voice weapon)
Reproduction:
Additional Information
develop (2019092702)