import { findDefaultToken, getChainById } from '@lifi/sdk' import { useWeb3React } from '@web3-react/core' import { Button, Typography } from 'antd' import { readWalletConnectInfo } from '../services/localStorage' interface Props { chainId: number okHandler: Function } export function WalletConnectChainSwitchModal({ chainId, okHandler }: Props) { const { library } = useWeb3React() const chain = getChainById(chainId) const walletConnectInfo = readWalletConnectInfo() return ( <> Please Switch To {chain.name} Please switch the chain in your connected wallet. You can use the following information to manually add it to your wallet, if it's not configured already. Network Name: {chain.name}
RPC Url: {chain.metamask.rpcUrls[0]}
ChainId: {chain.id}
Symbol: {findDefaultToken(chain.coin, chain.id)?.symbol}
Block Explorer URL: {chain.metamask.blockExplorerUrls[0]}
For more information, please visit{' '} your wallet provider's website ) }