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
improvement/handle provider updates #2196
Conversation
app/core/Engine.js
Outdated
/** | ||
* Refreshes all controllers that depend on the network | ||
*/ | ||
refreshNetwork = () => { |
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.
this was here because the refresh was called many times ... now configureControllersOnNetworkChange
is called once when the chainId
changes
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.
LGTM! 👍
By the way, I think this also fixes #2113
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.
This PR fixes the original issue
In regards to #2113 only Uniswap is working with this fix now, but I still have to reload for metamask.github.io/test-dapp
switching to Uniswap = https://recordit.co/h212ROp6Yf
switching on test-dapp = https://recordit.co/q4SIm97aVp
Nonetheless, passing since original issue is fixed 👍🏽
* fix * chinid * engine * removerefresh * test * fix
Description
Some issues were present when switching networks
getBalance
calls per 500 ms (about 7)Checklist
Issue
Resolves #2186