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
[Bug]: Balance does not update on duplicate chainId network #13690 #14245
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. |
Builds ready [fd59007]Page Load Metrics (1293 ± 34 ms)
|
Verified by QA |
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
@dragana Could you rebase this please and fix conflicts? we'll get it landed after that |
bbee415
fd59007
to
bbee415
Compare
Builds ready [bbee415]
Page Load Metrics (1633 ± 39 ms)
|
@brad-decker done |
bbee415
to
276ec39
Compare
Builds ready [276ec39]
Page Load Metrics (1904 ± 64 ms)
|
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.
Changes look good to me, this PR can be merged once it is rebased.
0884411
276ec39
to
0884411
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.
I rebased the pr for @dragana8, please reapprove when ready!
Builds ready [0884411]
Page Load Metrics (2660 ± 164 ms)
|
Explanation
Currently, the balance of an account won't update if the network selected has a chainId that is already present in Metamask. That happens because in account-tracker.js there is a check for chainId and if it belonged to known networks ( as in this case it was Ropsten network) it called the method that checked balance on Ropsten network and not localhost as it should.
In order to solve this problem, I added if statement that checks if rpcUrl is localhost and in that case the right method (updateBalance) is being called.
More information
Screenshots/Screencaps
Before
After