-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix issue with legacy ledger account list #14508
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Hey @seaona : can you plz test this fix. |
Builds ready [4b70010]Page Load Metrics (1252 ± 36 ms)
|
I am not sure why we are saving |
Builds ready [4a17dc8]Page Load Metrics (1335 ± 53 ms)
|
New Observations: at the moment,when you import some Hardware Wallet accounts, and later on import some more, the first ones disappear from the Metamask wallet. This happens with both Trezor and Ledger. Steps:
Result: the first imported accounts have disappeared from Metamask wallet. trezor-accounts-disappear.mp4Maybe that was the reason for keeping the "state" @jpuri ? |
Adding to @seaona's most recent comment, I think the default path in state aimed to ensure that if changing the path, the new selection would be the selection upon later returning to the flow Using ledger I am able to generate at least 4 different account lists. I want to understand exactly what inputs are producing those |
@danjm: I see in that case when we return to connect hardware flow we should try to get accounts for saved default path. Yep not sure what can cause the 4 different lists of accounts, I tried it again and I could not get 4 different set of account. I got only 3 for ledger corresponding to :
|
Builds ready [8386dd4]Page Load Metrics (1386 ± 48 ms)
|
@jpuri from what I've seen, on develop branch the behaviour is different: the accounts are not removed, when I add new ones. See below: trezor-accounts-not-disappearing.mp4All this process is without disconnecting the device. Just importing 2 accounts and then importing 2 more:
|
resolved here MetaMask/eth-ledger-bridge-keyring#146 |
Issue has been fixed with PR here: MetaMask/eth-ledger-bridge-keyring#146 I will create a separate PR in extension repo to update eth-ledger-bridge-keyring. |
Fixes: #6012
For ledger legacy the account list can get out of sync:
User can thus end up sending funds to wrong account.
I found that the reason was that we save the selected ledger type in app state:
Thus though the account list was for
Ledger Live
the dropdown was showingLedger (Mew / MyCrypto)
. PR fixes the issue by resetting state when connect hardware component un-mounts.