MetaMask produces warning with chain name mismatch
Discussed in https://github.com/rainbow-me/rainbowkit/discussions/1459
Originally posted by jcislo August 8, 2023 Please see image. Metamask doesn't seem to like that the default rainbow kit provider for Polygon sets network name to "Polygon" and not "Polygon Mainnet", throwing a warning when prompting the user to create the new network.
Everything here still works and is functional, but I am getting this complaint from a client regarding UX and how it could throw off users new to blockchain in general (those setting up a wallet for their first time).
This can be (should be) fixed by using a custom provider in your _app.tsx to set the provider name as "Polygon Mainnet", however it would be nice if the default settings from rainbowkit were fully compatible with metamask.
++
We evaluated options to resolve this, but it is inherently an issue with MetaMask's chain verification logic, and other wallets are not impacted. Chains often change names over time in Viem, and all of those chains would see similar name mismatch warnings in MetaMask.