From 85f49f3344a82e62d6fcccb93e8a5a8dd1e13ca3 Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Fri, 19 Dec 2025 15:10:38 +0300 Subject: [PATCH 1/6] feat: monkey patch flags off --- .env | 4 ++-- .env.development | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.env b/.env index b6a42045fc8..2c590e37c06 100644 --- a/.env +++ b/.env @@ -289,11 +289,11 @@ VITE_SWAPS_SERVER_URL=https://shapeshiftswap-service-production.up.railway.app VITE_USER_SERVER_URL=https://shapeshiftuser-service-production.up.railway.app VITE_NOTIFICATIONS_SERVER_URL=https://shapeshiftnotifications-service-production.up.railway.app -VITE_FEATURE_TRON=true +VITE_FEATURE_TRON=false VITE_SUI_NODE_URL=https://fullnode.mainnet.sui.io:443 VITE_FEATURE_CETUS_SWAP=false VITE_FEATURE_SUNIO_SWAP=false -VITE_FEATURE_MONAD=true +VITE_FEATURE_MONAD=false VITE_FEATURE_PLASMA=false VITE_HYPEREVM_NODE_URL=https://rpc.hyperliquid.xyz/evm VITE_FEATURE_HYPEREVM=false diff --git a/.env.development b/.env.development index cb30d967dff..1504c829bcd 100644 --- a/.env.development +++ b/.env.development @@ -81,7 +81,7 @@ VITE_FEATURE_MIXPANEL=true VITE_FEATURE_TX_HISTORY_BYE_BYE=true VITE_FEATURE_SWAPPER_FIAT_RAMPS=true -VITE_FEATURE_SUI=true +VITE_FEATURE_SUI=false VITE_FEATURE_NOTIFICATIONS_WEBSERVICES=true # Turn those on if you use local development instead of our railway instance @@ -90,7 +90,7 @@ VITE_FEATURE_NOTIFICATIONS_WEBSERVICES=true # VITE_NOTIFICATIONS_SERVER_URL=/notifications-api VITE_FEATURE_WC_DIRECT_CONNECTION=true -VITE_FEATURE_PLASMA=true +VITE_FEATURE_PLASMA=false VITE_FEATURE_CETUS_SWAP=true VITE_FEATURE_SUNIO_SWAP=true -VITE_FEATURE_HYPEREVM=true +VITE_FEATURE_HYPEREVM=false From af55bf5ffedf52eacb7cef4417022648e002561e Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Thu, 18 Dec 2025 15:20:35 +0300 Subject: [PATCH 2/6] fix: add ?url to SVG import to fix MIME type error MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The update-icon.svg import was causing a MIME type error in dev build: "Expected a JavaScript-or-Wasm module script but the server responded with a MIME type of 'image/svg+xml'." Adding ?url tells Vite to import the SVG as a static asset URL instead of trying to process it as a module script. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .../Header/ActionCenter/components/AppUpdateActionCard.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Layout/Header/ActionCenter/components/AppUpdateActionCard.tsx b/src/components/Layout/Header/ActionCenter/components/AppUpdateActionCard.tsx index 35d4726414a..ae19c30f29d 100644 --- a/src/components/Layout/Header/ActionCenter/components/AppUpdateActionCard.tsx +++ b/src/components/Layout/Header/ActionCenter/components/AppUpdateActionCard.tsx @@ -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' From 136c41f0aec51caa4d4450435441359e782f79ea Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Fri, 19 Dec 2025 15:19:50 +0300 Subject: [PATCH 3/6] fix: prevent ghost rows in markets chain dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Mirror production second-class chain flags in .env.development (SUI, PLASMA, HYPEREVM disabled) - Fix MarketsRow to use knownChainIds constant instead of manually filtering KnownChainIds - This prevents disabled chains from appearing as empty rows in the chain dropdown 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .env | 4 ++-- .env.development | 4 ++-- src/pages/Markets/components/MarketsRow.tsx | 13 +++---------- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/.env b/.env index 2c590e37c06..b6a42045fc8 100644 --- a/.env +++ b/.env @@ -289,11 +289,11 @@ VITE_SWAPS_SERVER_URL=https://shapeshiftswap-service-production.up.railway.app VITE_USER_SERVER_URL=https://shapeshiftuser-service-production.up.railway.app VITE_NOTIFICATIONS_SERVER_URL=https://shapeshiftnotifications-service-production.up.railway.app -VITE_FEATURE_TRON=false +VITE_FEATURE_TRON=true VITE_SUI_NODE_URL=https://fullnode.mainnet.sui.io:443 VITE_FEATURE_CETUS_SWAP=false VITE_FEATURE_SUNIO_SWAP=false -VITE_FEATURE_MONAD=false +VITE_FEATURE_MONAD=true VITE_FEATURE_PLASMA=false VITE_HYPEREVM_NODE_URL=https://rpc.hyperliquid.xyz/evm VITE_FEATURE_HYPEREVM=false diff --git a/.env.development b/.env.development index 1504c829bcd..dc1889a0692 100644 --- a/.env.development +++ b/.env.development @@ -91,6 +91,6 @@ VITE_FEATURE_NOTIFICATIONS_WEBSERVICES=true VITE_FEATURE_WC_DIRECT_CONNECTION=true VITE_FEATURE_PLASMA=false -VITE_FEATURE_CETUS_SWAP=true -VITE_FEATURE_SUNIO_SWAP=true +VITE_FEATURE_CETUS_SWAP=false +VITE_FEATURE_SUNIO_SWAP=false VITE_FEATURE_HYPEREVM=false diff --git a/src/pages/Markets/components/MarketsRow.tsx b/src/pages/Markets/components/MarketsRow.tsx index c8bb5a6c7e8..8a7fc5fac96 100644 --- a/src/pages/Markets/components/MarketsRow.tsx +++ b/src/pages/Markets/components/MarketsRow.tsx @@ -13,7 +13,6 @@ import { useMediaQuery, } from '@chakra-ui/react' import type { ChainId } from '@shapeshiftoss/caip' -import { KnownChainIds } from '@shapeshiftoss/types' import { useCallback, useMemo, useState } from 'react' import { useTranslate } from 'react-polyglot' import { Link, useNavigate, useParams } from 'react-router-dom' @@ -23,12 +22,11 @@ import { sortOptionsByCategory } from '../constants' import type { RowProps } from '../hooks/useRows' import { ChainDropdown } from '@/components/ChainDropdown/ChainDropdown' +import { knownChainIds } from '@/constants/chains' import { OrderDropdown } from '@/components/OrderDropdown/OrderDropdown' import { OrderDirection } from '@/components/OrderDropdown/types' import { SortDropdown } from '@/components/SortDropdown/SortDropdown' import { SortOptionsKeys } from '@/components/SortDropdown/types' -import { selectFeatureFlag } from '@/state/slices/selectors' -import { useAppSelector } from '@/state/store' import { breakpoints } from '@/theme/theme' const chevronDownIcon = @@ -79,18 +77,13 @@ export const MarketsRow: React.FC = ({ const [selectedSort, setSelectedSort] = useState( (params.category && sortOptionsByCategory[params.category]?.[0]) ?? SortOptionsKeys.Volume, ) - const isArbitrumNovaEnabled = useAppSelector(state => selectFeatureFlag(state, 'ArbitrumNova')) 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 - }) + if (!supportedChainIds) return knownChainIds return supportedChainIds - }, [isArbitrumNovaEnabled, supportedChainIds]) + }, [supportedChainIds]) const Title = useMemo(() => { if (!title) return null From 172c00c37f395c6ac8f09e7f0decdaaeecf40093 Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Fri, 19 Dec 2025 15:23:32 +0300 Subject: [PATCH 4/6] chore: apply lint fixes to MarketsRow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/pages/Markets/components/MarketsRow.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Markets/components/MarketsRow.tsx b/src/pages/Markets/components/MarketsRow.tsx index 8a7fc5fac96..f1c759ff3e1 100644 --- a/src/pages/Markets/components/MarketsRow.tsx +++ b/src/pages/Markets/components/MarketsRow.tsx @@ -22,11 +22,11 @@ import { sortOptionsByCategory } from '../constants' import type { RowProps } from '../hooks/useRows' import { ChainDropdown } from '@/components/ChainDropdown/ChainDropdown' -import { knownChainIds } from '@/constants/chains' import { OrderDropdown } from '@/components/OrderDropdown/OrderDropdown' import { OrderDirection } from '@/components/OrderDropdown/types' import { SortDropdown } from '@/components/SortDropdown/SortDropdown' import { SortOptionsKeys } from '@/components/SortDropdown/types' +import { knownChainIds } from '@/constants/chains' import { breakpoints } from '@/theme/theme' const chevronDownIcon = From 64022736558a0c7830576c31d0b948c0a004c8f1 Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Fri, 19 Dec 2025 15:29:24 +0300 Subject: [PATCH 5/6] fix: filter disabled second-class chains from markets dropdown MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extend ArbitrumNova filtering pattern to also filter SUI, PLASMA, and HYPEREVM chains when their feature flags are disabled. This prevents ghost rows in the chain dropdown when chains are in coingeckoSupportedChainIds but have disabled flags. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- src/pages/Markets/components/MarketsRow.tsx | 22 ++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/pages/Markets/components/MarketsRow.tsx b/src/pages/Markets/components/MarketsRow.tsx index f1c759ff3e1..b51e58040ff 100644 --- a/src/pages/Markets/components/MarketsRow.tsx +++ b/src/pages/Markets/components/MarketsRow.tsx @@ -13,6 +13,7 @@ import { useMediaQuery, } from '@chakra-ui/react' import type { ChainId } from '@shapeshiftoss/caip' +import { KnownChainIds } from '@shapeshiftoss/types' import { useCallback, useMemo, useState } from 'react' import { useTranslate } from 'react-polyglot' import { Link, useNavigate, useParams } from 'react-router-dom' @@ -26,7 +27,8 @@ import { OrderDropdown } from '@/components/OrderDropdown/OrderDropdown' import { OrderDirection } from '@/components/OrderDropdown/types' import { SortDropdown } from '@/components/SortDropdown/SortDropdown' import { SortOptionsKeys } from '@/components/SortDropdown/types' -import { knownChainIds } from '@/constants/chains' +import { selectFeatureFlag } from '@/state/slices/selectors' +import { useAppSelector } from '@/state/store' import { breakpoints } from '@/theme/theme' const chevronDownIcon = @@ -77,13 +79,23 @@ export const MarketsRow: React.FC = ({ const [selectedSort, setSelectedSort] = useState( (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 knownChainIds - - return supportedChainIds - }, [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 From a5e012dce2cbef34184e844feb1c7170dca87f4d Mon Sep 17 00:00:00 2001 From: gomes <17035424+gomesalexandre@users.noreply.github.com> Date: Fri, 19 Dec 2025 15:35:14 +0300 Subject: [PATCH 6/6] feat: revert flags monkey patch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- .env.development | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index dc1889a0692..cb30d967dff 100644 --- a/.env.development +++ b/.env.development @@ -81,7 +81,7 @@ VITE_FEATURE_MIXPANEL=true VITE_FEATURE_TX_HISTORY_BYE_BYE=true VITE_FEATURE_SWAPPER_FIAT_RAMPS=true -VITE_FEATURE_SUI=false +VITE_FEATURE_SUI=true VITE_FEATURE_NOTIFICATIONS_WEBSERVICES=true # Turn those on if you use local development instead of our railway instance @@ -90,7 +90,7 @@ VITE_FEATURE_NOTIFICATIONS_WEBSERVICES=true # VITE_NOTIFICATIONS_SERVER_URL=/notifications-api VITE_FEATURE_WC_DIRECT_CONNECTION=true -VITE_FEATURE_PLASMA=false -VITE_FEATURE_CETUS_SWAP=false -VITE_FEATURE_SUNIO_SWAP=false -VITE_FEATURE_HYPEREVM=false +VITE_FEATURE_PLASMA=true +VITE_FEATURE_CETUS_SWAP=true +VITE_FEATURE_SUNIO_SWAP=true +VITE_FEATURE_HYPEREVM=true