If the user switches networks in Metamask wallet, almost everything works as expected.
Dev tools output for reference:
The following happens immediately:
(New Network) connected
A new multicall address is used.
1 call updated (get Eth balacne now using the multicall address).
But NO state is updated... Only when a new block is found does the eth balance state update.
I'm not sure if this is a bug or an implementation detail, but I'd like to see an immediate update of any state based on chain reads as soon as either account or network changes.
Consider the following simple example where I am reading the user's balance:
If the user switches networks in Metamask wallet, almost everything works as expected.
Dev tools output for reference:
The following happens immediately:
But NO state is updated... Only when a new block is found does the eth balance state update.
I'm not sure if this is a bug or an implementation detail, but I'd like to see an immediate update of any state based on chain reads as soon as either account or network changes.