Commit 1283199d authored by Jordan Frankfurt's avatar Jordan Frankfurt Committed by GitHub

fix: remove mainnet from optional chains list (#6725)

* fix: remove mainnet from optional chains list

* simplify imports
parent c1fff5ea
import { sendAnalyticsEvent } from '@uniswap/analytics'
import { WalletConnect, WalletConnectConstructorArgs } from '@web3-react/walletconnect-v2'
import { SupportedChainId } from 'constants/chains'
import { L1_CHAIN_IDS, L2_CHAIN_IDS, SupportedChainId } from 'constants/chains'
import { Z_INDEX } from 'theme/zIndex'
import { RPC_URLS } from '../constants/networks'
......@@ -14,6 +14,7 @@ const RPC_URLS_WITHOUT_FALLBACKS = Object.entries(RPC_URLS).reduce(
}),
{}
)
const optionalChains = [...L1_CHAIN_IDS, ...L2_CHAIN_IDS].filter((x) => x !== SupportedChainId.MAINNET)
export class WalletConnectV2Popup extends WalletConnect {
ANALYTICS_EVENT = 'Wallet Connect QR Scan'
......@@ -27,7 +28,7 @@ export class WalletConnectV2Popup extends WalletConnect {
actions,
options: {
projectId: process.env.REACT_APP_WALLET_CONNECT_PROJECT_ID as string,
optionalChains: Object.keys(RPC_URLS_WITHOUT_FALLBACKS).map((key) => Number(key)),
optionalChains,
chains: [SupportedChainId.MAINNET],
showQrModal: qrcode,
rpcMap: RPC_URLS_WITHOUT_FALLBACKS,
......
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