Commit 4416a84f authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

fix: disable bnb network option on uniwallet (#6452)

* fix: disable bnb network option on uniwallet

* use supported chain set
parent eaaff81a
......@@ -4,7 +4,7 @@ import { MouseoverTooltip } from 'components/Tooltip'
import { ConnectionType } from 'connection'
import { useGetConnection } from 'connection'
import { getChainInfo } from 'constants/chainInfo'
import { SupportedChainId } from 'constants/chains'
import { SupportedChainId, UniWalletSupportedChains } from 'constants/chains'
import { useOnClickOutside } from 'hooks/useOnClickOutside'
import useSelectChain from 'hooks/useSelectChain'
import useSyncChainQuery from 'hooks/useSyncChainQuery'
......@@ -76,7 +76,7 @@ export const ChainSelector = ({ leftAlign }: ChainSelectorProps) => {
<Column paddingX="8">
{NETWORK_SELECTOR_CHAINS.map((chainId: SupportedChainId) => (
<ChainSelectorRow
disabled={isUniWallet && chainId === SupportedChainId.CELO}
disabled={isUniWallet && !UniWalletSupportedChains.includes(chainId)}
onSelectChain={onSelectChain}
targetChain={chainId}
key={chainId}
......
......@@ -25,6 +25,13 @@ export enum SupportedChainId {
BNB = 56,
}
export const UniWalletSupportedChains = [
SupportedChainId.MAINNET,
SupportedChainId.ARBITRUM_ONE,
SupportedChainId.OPTIMISM,
SupportedChainId.POLYGON,
]
export const CHAIN_IDS_TO_NAMES = {
[SupportedChainId.MAINNET]: 'mainnet',
[SupportedChainId.GOERLI]: 'goerli',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment