From 712e6dbeee799191102e4fb27bc43c72f19db1ed Mon Sep 17 00:00:00 2001 From: Leandro Date: Fri, 1 Mar 2024 11:21:15 +0000 Subject: [PATCH] fix(explorer): do not show tokens table on gchain (#3948) --- apps/explorer/src/explorer/pages/Home/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/explorer/src/explorer/pages/Home/index.tsx b/apps/explorer/src/explorer/pages/Home/index.tsx index 0e78da4445..77389569bc 100644 --- a/apps/explorer/src/explorer/pages/Home/index.tsx +++ b/apps/explorer/src/explorer/pages/Home/index.tsx @@ -9,6 +9,7 @@ import { TokensTableWidget } from '../../components/TokensTableWidget' import { Helmet } from 'react-helmet' import { APP_TITLE } from '../../const' import { SUBGRAPH_URLS } from '../../../consts/subgraphUrls' +import { SupportedChainId } from '@cowprotocol/cow-sdk' const Wrapper = styled(WrapperMod)` max-width: 140rem; @@ -47,10 +48,17 @@ const SummaryWrapper = styled.section` } ` +const SHOW_TOKENS_TABLE: Record = { + [SupportedChainId.MAINNET]: true, + [SupportedChainId.GNOSIS_CHAIN]: false, // Gchain data is not reliable + [SupportedChainId.SEPOLIA]: false, // No data for Sepolia +} + export const Home: React.FC = () => { const networkId = useNetworkId() || undefined const showCharts = !!networkId && SUBGRAPH_URLS[networkId] !== null + const showTokensTable = !!networkId && SHOW_TOKENS_TABLE[networkId] return ( @@ -63,7 +71,7 @@ export const Home: React.FC = () => { {showCharts && ( <> - + {showTokensTable && } )}