From f6dea47907016a8ec820cf1b9b4a95e9f8e15be5 Mon Sep 17 00:00:00 2001 From: Noah Zinsmeister Date: Wed, 7 Jul 2021 09:38:29 -0400 Subject: [PATCH] fix l2 routing bug --- src/constants/chains.ts | 7 ++++++- src/pages/App.tsx | 18 +++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/constants/chains.ts b/src/constants/chains.ts index 1c7d432f1..1c61ac9c5 100644 --- a/src/constants/chains.ts +++ b/src/constants/chains.ts @@ -13,7 +13,12 @@ export enum SupportedChainId { OPTIMISTIC_KOVAN = 69, } -export const L2_CHAIN_IDS = [SupportedChainId.ARBITRUM_ONE, SupportedChainId.OPTIMISM] +export const L2_CHAIN_IDS = [ + SupportedChainId.ARBITRUM_ONE, + SupportedChainId.ARBITRUM_RINKEBY, + SupportedChainId.OPTIMISM, + SupportedChainId.OPTIMISTIC_KOVAN, +] export const L2_INFO: Record = { [SupportedChainId.OPTIMISM]: { diff --git a/src/pages/App.tsx b/src/pages/App.tsx index 962173ae8..d441d71e0 100644 --- a/src/pages/App.tsx +++ b/src/pages/App.tsx @@ -74,36 +74,36 @@ function TopLevelModals() { const Routes = () => { const { chainId } = useActiveWeb3React() - const HIDE_ON_L2 = Boolean(chainId && L2_CHAIN_IDS.includes(chainId)) + const ON_L2 = Boolean(chainId && L2_CHAIN_IDS.includes(chainId)) return ( - {HIDE_ON_L2 && } - {HIDE_ON_L2 && } + {!ON_L2 && } + {!ON_L2 && } - {HIDE_ON_L2 && } - {HIDE_ON_L2 && } + {!ON_L2 && } + {!ON_L2 && } - {HIDE_ON_L2 && ( + {!ON_L2 && ( )} - {HIDE_ON_L2 && } + {!ON_L2 && } - {HIDE_ON_L2 && } - {HIDE_ON_L2 && } + {!ON_L2 && } + {!ON_L2 && }