xmtp / example-chat-react

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.
MIT License
74 stars 52 forks source link

Disable ENS lookups on non-Ethereum Chains #81

Closed neekolas closed 2 years ago

neekolas commented 2 years ago

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

cloudflare-workers-and-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6298b20
Status: ✅  Deploy successful!
Preview URL: https://8647f430.chat-3hb.pages.dev
Branch Preview URL: https://disable-ens-on-non-eth-chain.chat-3hb.pages.dev

View logs