Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useTranslate } from 'react-polyglot'

import { ActionCard } from './ActionCard'

import UpdateIcon from '@/assets/update-icon.svg'
import UpdateIcon from '@/assets/update-icon.svg?url'
import { Text } from '@/components/Text/Text'
import { formatSmartDate } from '@/lib/utils/time'
import type { AppUpdateAction } from '@/state/slices/actionSlice/types'
Expand Down
21 changes: 13 additions & 8 deletions src/pages/Markets/components/MarketsRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,17 +80,22 @@ export const MarketsRow: React.FC<MarketsRowProps> = ({
(params.category && sortOptionsByCategory[params.category]?.[0]) ?? SortOptionsKeys.Volume,
)
const isArbitrumNovaEnabled = useAppSelector(state => selectFeatureFlag(state, 'ArbitrumNova'))
const isSuiEnabled = useAppSelector(state => selectFeatureFlag(state, 'Sui'))
const isPlasmaEnabled = useAppSelector(state => selectFeatureFlag(state, 'Plasma'))
const isHyperEvmEnabled = useAppSelector(state => selectFeatureFlag(state, 'HyperEvm'))
const [isSmallerThanLg] = useMediaQuery(`(max-width: ${breakpoints.lg})`)

const chainIds = useMemo(() => {
if (!supportedChainIds)
return Object.values(KnownChainIds).filter(chainId => {
if (!isArbitrumNovaEnabled && chainId === KnownChainIds.ArbitrumNovaMainnet) return false
return true
})

return supportedChainIds
}, [isArbitrumNovaEnabled, supportedChainIds])
const baseChainIds = supportedChainIds ?? Object.values(KnownChainIds)

return baseChainIds.filter(chainId => {
if (!isArbitrumNovaEnabled && chainId === KnownChainIds.ArbitrumNovaMainnet) return false
if (!isSuiEnabled && chainId === KnownChainIds.SuiMainnet) return false
if (!isPlasmaEnabled && chainId === KnownChainIds.PlasmaMainnet) return false
if (!isHyperEvmEnabled && chainId === KnownChainIds.HyperEvmMainnet) return false
return true
})
}, [supportedChainIds, isArbitrumNovaEnabled, isSuiEnabled, isPlasmaEnabled, isHyperEvmEnabled])

const Title = useMemo(() => {
if (!title) return null
Expand Down