This repo has been archived. Replacement apps include the XMTP Quickstart React and XMTP Inbox chat apps. For more details and links, see the README in this repo.
The app currently throws errors when attempting to look up ENS information when the user's wallet is connected to a non-ethereum chain.
This change disables ENS lookups when the chain is not ETH mainnet. It also detects chain changes to re-enable ENS lookups when the network is switched back to ETH mainnet.
Followups
We should really display a warning when a user attempts to enter an ENS address and their wallet is set to a non-ethereum chain. That can be handled as a subsequent PR.
Summary
The app currently throws errors when attempting to look up ENS information when the user's wallet is connected to a non-ethereum chain.
This change disables ENS lookups when the chain is not ETH mainnet. It also detects chain changes to re-enable ENS lookups when the network is switched back to ETH mainnet.
Followups