Refactor RPC Methods logic (Fix network change)#3341
Conversation
cortisiko
left a comment
There was a problem hiding this comment.
found a couple issues:
Issue 1
My eth balance does not update correctly when I switch networks.
For example:
I have eth in my wallet on main net and on ropsten. If I were to connect to uniswap dapp while on main net my eth balance looks correct.
If I were to switch my network from main net to ropsten my eth balance does not reflect what I currently have in my wallet on ropsten. Instead my balance reflects my main net balance.
See here
Notice this does not happen in prod on v3.4.1
To reproduce:
With a wallet that has eth on both main net and ropsten open the browser and go to app.uniswap.org
Connect your wallet.
Pay attention to your current ETH. Switch networks to ropsten
Wait 3-4 seconds. Notice your wallet balance does not update correctly.
Issue 2
I get a couple errors when I connect to a dapp:
(A)
ERROR: header not found.
And
(B)
{"originalError": [Object]}, "message": "undefined is not an object (evaluating '_.default.wallet_switchEthereumChain')"}
To reproduce:
With a wallet that has eth on both main net and ropsten open the browser and go to app.uniswap.org notice (A)
Connect your wallet.
Switch networks from main net to ropsten
Notice (B)
AND
Go to the test dapp: https://metamask.github.io/test-dapp/
And try tapping on “ADD XDAI CHAIN”
Notice (B)
|
@andrepimenta this ticket is mainly good but I encountered a couple of errors while testing. Not sure if they are anything to worry about so feel free to dismiss them. It is not the end of the world but time to time when I attempt to sign eth on the test dapp: https://metamask.github.io/test-dapp/ I get: It is not really consistent enough for me to record it. To reproduce: this guy is still happening: See the first instance of when this was reported here in slack. To reproduce: switch from a custom network( avalanche or polygon) to main net and vice versa. |
sethkfman
left a comment
There was a problem hiding this comment.
Not blockers but I have a number of suggestions as things progress in this area.
|
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. |
Cal-L
left a comment
There was a problem hiding this comment.
I pushed a temp fix for TS errors and left some comments.
…/metamask-mobile into fix/RPCMethods-refactor
# Conflicts: # yarn.lock
Description
@cortisiko How to test: