Skip to content
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

Only account 1 out of 4 primary wallets restored with 24 word code after finding that my brave wallet disappeared! #22256

Open
Bitcoin-Saver opened this issue Apr 12, 2022 · 12 comments

Comments

@Bitcoin-Saver
Copy link

Description

  1. Brave wallet disappeared from my browser on computer A!
  2. Fearing that computer A was compromised, I successfully recovered using the 24 word code I wrote down on computer B.
  3. However, only Account 1 was recovered Accounts 2-4 that I had created in the Brave walled on computer A did not restore.

Steps to Reproduce

  1. Wallet mysteriously disappears on Brave browser on computer A
  2. Restore on computer B
  3. Only Account 1 of 4 (primary accounts) is restored.

Actual result:

Only Account 1/4 primary accounts recovered.

Expected result:

All 4 primary accounts recovered.

Reproduces how often:

Unknown. but I found one other person with a similar issue.

Brave version (brave://version info)

[Version 1.37.109 Chromium: 100.0.4896.60 (Official Build) (arm64)]

Version/Channel Information:

  • Can you reproduce this issue with the current release?
  • Can you reproduce this issue with the beta channel?
  • Can you reproduce this issue with the nightly channel?

I don't know.

Other Additional Information:

  • Does the issue resolve itself when disabling Brave Shields?
  • Does the issue resolve itself when disabling Brave Rewards?
  • Is the issue reproducible on the latest version of Chrome?

I don't know.

Miscellaneous Information:

I'd also like to know why the wallet disappeared in the first place!?

@Bitcoin-Saver
Copy link
Author

I managed to recover my Account 4 (the one with some money) by selecting the legacy wallet in settings on computer A. My brave wallet had not disappeared it had just been hidden. I have lost a lot from errors and scammers in the past, so I am happy I could solve this problem.

@kdenhartog
Copy link
Member

On the second computer you should just need to "generate" another account. Since the accounts are based on the BIP-32 HD key scheme once you've added the BIP39 seed to the wallet the exact same accounts should be regenerated when you create the "new accounts" (it's actually the same ones just being regenerated the same way) on the new computer.

To generate a new account you'll want to go to the accounts tab in the brave wallet and select "create account".

Screen Shot 2022-04-14 at 1 20 53 AM

For more details about what's happening here check out this wiki page.

@diracdeltas
Copy link
Member

also we are not actively supporting the 24-word legacy option these days so i recommend you create a new wallet with the standard 12-word phrase and migrate your funds over there.

@urbenlegend
Copy link

Is there a reason why the other primary accounts aren't automatically "regenerated" on Restore? It's definitely very confusing from a UX perspective when restoring doesn't automatically bring back the rest of the primary accounts.

@kdenhartog
Copy link
Member

kdenhartog commented Jul 7, 2022

It's possible but the two simplest ways I can think of doing this requires either managing state of which nodes in particular paths are associated with accounts that have been used Alternatively, it requires exhaustively checking a large number of accounts. Both of these options have tradeoffs.

For the first option (managing state of which accounts have been used) you run into problems when the user is importing their accounts from a different wallet because wallets haven't defined a way to make this interoperable.

For the second option, it's unclear how to deterministically set the number of accounts to check. For example, a user could generate 100 accounts and use the 100th account as their main account to conduct transactions which means we need to exhaustively check 100 accounts to see if any of them have been used.

There's other methods we could do to make this a bit simpler which would avoid those edge cases, but what do you have in mind for it?

@urbenlegend
Copy link

For the first option (managing state of which accounts have been used) you run into problems when the user is importing their accounts from a different wallet because wallets haven't defined a way to make this interoperable.

So do other wallets also have this same issue?

If it is a difficult technical issue that's shared with other wallets, perhaps it's more of a UI/UX issue on Brave's side than anything else. As a person who hasn't interacted much with wallets in general and is trying to get into it, I ran into lots of confusion when I didn't see all of my primary accounts upon restore, even though the backup function explicitly says all primary accounts are backed up by the recovery phrase. Before I discovered this GitHub issue, I didn't even know about BIP-32 or the fact that the generated account addresses are deterministic.

For me, it was clearly a knowledge and discoverability issue, so here's what I propose:

  1. Add a text link underneath the Create account button that says "Can't find all of your accounts after a restore?"
  2. Upon hover or click, popup a longer explanation about BIP-32 and how you should try "creating" new accounts to get your old ones back.
  3. Add similar info during the backup process.

@kdenhartog
Copy link
Member

kdenhartog commented Jul 7, 2022

They (other wallets) would likely run into the same potential options here, but each of them could solve it in different ways because it's a tradeoff consideration. I alerted our product team to this thread as something for them to take a look at as a potential easy features to add which may not have a perfect solution but could be something good enough to make the new user experience like yours a bit better. Thank you for the feedback, it's definitely useful for us as we consider different options!

@darkdh
Copy link
Member

darkdh commented Jul 7, 2022

We have account discovery mechanism now but it seems like it was not available yet when you opened this issue.
Could you try it again?

@urbenlegend
Copy link

@darkdh I am not the original opener of this issue, but I did try this recently on 1.40.113 and the accounts after the first account did not come back upon restore. Do they need a > 0 balance or something? I only created the accounts during testing and haven't yet added any crypto.

@darkdh
Copy link
Member

darkdh commented Jul 7, 2022

We will look for accounts that have transaction history so it doesn't have to be non zero balance.

@urbenlegend
Copy link

Okay, I just tested it and the account discovery seems to work after doing some transactions. Thanks!

@kdenhartog
Copy link
Member

Thanks @darkdh for jumping in and point out that PR and how it works. I hadn't encountered that because I almost exclusively use the first account for everything I'm doing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants