-
Notifications
You must be signed in to change notification settings - Fork 887
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
Various reset wallet fixes #11669
Various reset wallet fixes #11669
Conversation
4b69a0f
to
3820bc8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
chromium_src
change LGTM
|
||
auto* rpc_controller = | ||
brave_wallet::RpcControllerFactory::GetControllerForContext(context); | ||
rpc_controller->Reset(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it ok that this call will fire FireNetworkChanged
at same time when service and keyring controller will be dropped ? maybe make a single entry point and subscribe to KeyringResetFired instead of consecutive calls call?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I want FireNetworkChanged
to be called in particular because there are some members of eth_tx_state_manager.cc
needs to have that event to reset properly.
@@ -124,6 +124,10 @@ handler.on(WalletActions.keyringRestored.getType(), async (store) => { | |||
await refreshWalletInfo(store) | |||
}) | |||
|
|||
handler.on(WalletActions.keyringReset.getType(), async (store) => { | |||
window.location.reload() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we also make getAPIProxy().braveWalletService.reset()
call inside this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No the reset is initiated by the settings page, this just listens to when it is reset so it can reload the page to show the create form again. It was easier than trying to reset all of the redux state and works fine.
Resolves brave/brave-browser#18997
Resolves brave/brave-browser#19703
Resolves brave/brave-browser#19844
Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: