maybe MetaMask is connected to ETH network? I tested now few networks and it looks like it works fine.
getChainId() works for all networks besides avalanche. Please kindly take a look at the other usersβ messages, too. We all have the same issue. getChainId() returns 1 for avalanche. thank you
We will notify when we will find a solution for this and add it to the library
It really depends from which chain are you switching to avalanche
from which chain are you switching?
you can try to use id = await web3.eth.getChainId()
for now