Rainbow wallet loosely implements expected functionality RPC endpoints, the add chain & disconnect functions in wagmi are not respected by Rainbow wallet.
Testing
To recreate the issue scenario. In Rainbow wallet, ensure you do not have Celo chain added. Ensure you are not connected to the app.
Click connect, this would previously cause a crash due to Rainbow wallet providing Eth Mainnet instead of Null in the window.ethereum
You should be presented with a modal, which has instructions on how to add Celo chain manually, clicking the retry refreshes the page.
Trying the connect process again should be successful
Notes
To achieve this, I had to put ensure chain logic as a wrapper for all components, I had to enforce accurate chain IDs manually since Rainbow wallet circumvents standard update logic to the window.ethereum object unlike all other wallets
Description
Rainbow wallet loosely implements expected functionality RPC endpoints, the add chain & disconnect functions in wagmi are not respected by Rainbow wallet.
Testing
To recreate the issue scenario. In Rainbow wallet, ensure you do not have Celo chain added. Ensure you are not connected to the app.
Click connect, this would previously cause a crash due to Rainbow wallet providing Eth Mainnet instead of Null in the
window.ethereum
You should be presented with a modal, which has instructions on how to add Celo chain manually, clicking the retry refreshes the page.
Trying the connect process again should be successful
Notes
To achieve this, I had to put ensure chain logic as a wrapper for all components, I had to enforce accurate chain IDs manually since Rainbow wallet circumvents standard update logic to the
window.ethereum
object unlike all other wallets