Skip to content

Commit

Permalink
refactor: hide zkSync Era on Elastic analytics (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
hungdoansy authored Jun 20, 2023
1 parent 2557bb8 commit 276d56b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/NetworkModal/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { useOnClickOutside } from '../../hooks'
import { useNetworksInfo } from '../../contexts/NetworkInfo'
import { Link, useHistory, useParams } from 'react-router-dom'
import Kyber from '../Icons/Kyber'
import { ChainId, NETWORKS_INFO_LIST } from '../../constants/networks'
import { ChainId, NOT_SUPPORT_ELASTIC_NETWORKS, NETWORKS_INFO_LIST } from '../../constants/networks'

const ModalContentWrapper = styled.div`
display: flex;
Expand Down Expand Up @@ -184,7 +184,7 @@ export default function NetworkModal() {
</Link>
)
} else {
if (network.chainId === ChainId.AURORA) return undefined
if (NOT_SUPPORT_ELASTIC_NETWORKS.includes(network.chainId)) return undefined
return (
<a href={'/elastic' + linkTo} key={network.name}>
<SelectNetworkButton
Expand Down
1 change: 1 addition & 0 deletions src/constants/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,3 +359,4 @@ export const NETWORKS_INFO: { [key in ChainId]: NETWORK_INFO } = {

export const NETWORKS_INFO_LIST: NETWORK_INFO[] = Object.values(NETWORKS_INFO)
export const SUPPORTED_NETWORKS: ChainId[] = Object.keys(NETWORKS_INFO).map(Number)
export const NOT_SUPPORT_ELASTIC_NETWORKS: ChainId[] = [ChainId.AURORA, ChainId.ZKSYNC]

0 comments on commit 276d56b

Please sign in to comment.