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

Resetting your wallet doesn't reset selected chain ID until app relaunch #19844

Closed
kylehickinson opened this issue Nov 30, 2021 · 1 comment · Fixed by brave/brave-core#11669
Assignees
Labels
bug feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include

Comments

@kylehickinson
Copy link
Collaborator

Description

When you reset your wallet in settings all of your wallet prefs are erased and you no longer have any keyring, however this does not erase all local state on keyed services used throughout wallet.

In this case EthRpcController::GetChainId returns a value not read from prefs until the controller is reinstantiated in a future session which means creating or restoring a wallet after resetting will retain this value instead of resetting back to the default selected chain

Steps to Reproduce

  1. Create wallet, change selected network to Ropsten
  2. Reset wallet from settings
  3. Create a new wallet

Actual result:

Selected network will still be Ropsten

Expected result:

Selected network should be reset to Ethereum

Reproduces how often:

Always

Brave version (brave://version info)

1.34.47 Chromium: 96.0.4664.45 (Official Build) nightly (x86_64)

@kylehickinson kylehickinson added bug feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop labels Nov 30, 2021
@bbondy bbondy added the priority/P3 The next thing for us to work on. It'll ride the trains. label Dec 3, 2021
@bbondy bbondy self-assigned this Dec 20, 2021
@bbondy bbondy added this to the 1.35.x - Nightly milestone Dec 28, 2021
@srirambv
Copy link
Contributor

Brave 1.36.90 Chromium: 98.0.4758.87 (Official Build) beta (64-bit)
Revision e4cd00f135fb4d8edc64c8aa6ecbe7cc79ebb3b2-refs/branch-heads/4758@{#1002}
OS ☑️ Linux ☑️ Windows 11 Version Dev
(Build 22523.1000)
☑️ macOS Version 12.0.1
(Build 21C52)
  • Verified steps from issue description
  • Verified setting network to Ropsten and reset wallet resets the chain ID to Mainnet when a new wallet is created
  • Verified adding a custom network and setting as default and resetting wallet and creating a new wallet sets default network to Mainnet

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug feature/web3/wallet Integrating Ethereum+ wallet support OS/Desktop priority/P3 The next thing for us to work on. It'll ride the trains. QA Pass-Linux QA Pass-macOS QA Pass-Win64 QA/Yes release-notes/include
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants