diff --git a/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx b/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx index cba177b909..e087beeabc 100644 --- a/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx +++ b/packages/synapse-interface/components/StateManagedBridge/BridgeTransactionButton.tsx @@ -11,7 +11,6 @@ import { useConnectModal } from '@rainbow-me/rainbowkit' import { stringToBigInt } from '@/utils/bigint/format' import { useBridgeDisplayState, useBridgeState } from '@/slices/bridge/hooks' import { usePortfolioBalances } from '@/slices/portfolio/hooks' -import { PAUSED_FROM_CHAIN_IDS, PAUSED_TO_CHAIN_IDS } from '@/constants/chains' import { useAppDispatch } from '@/store/hooks' import { setIsDestinationWarningAccepted, @@ -74,8 +73,6 @@ export const BridgeTransactionButton = ({ bridgeQuote === EMPTY_BRIDGE_QUOTE || (destinationAddress && !isAddress(destinationAddress)) || (isConnected && !sufficientBalance) || - PAUSED_FROM_CHAIN_IDS.includes(fromChainId) || - PAUSED_TO_CHAIN_IDS.includes(toChainId) || isBridgePaused let buttonProperties @@ -102,14 +99,6 @@ export const BridgeTransactionButton = ({ label: 'Please select Destination network', onClick: null, } - } else if ( - PAUSED_FROM_CHAIN_IDS.includes(fromChainId) || - PAUSED_TO_CHAIN_IDS.includes(toChainId) - ) { - buttonProperties = { - label: `Bridge unavailable`, - onClick: null, - } } else if (!fromToken) { buttonProperties = { label: `Please select an Origin token`, diff --git a/packages/synapse-interface/components/StateManagedBridge/hooks/useFromChainListArray.ts b/packages/synapse-interface/components/StateManagedBridge/hooks/useFromChainListArray.ts index d3ee43dc37..8d9d423306 100644 --- a/packages/synapse-interface/components/StateManagedBridge/hooks/useFromChainListArray.ts +++ b/packages/synapse-interface/components/StateManagedBridge/hooks/useFromChainListArray.ts @@ -2,11 +2,7 @@ import _ from 'lodash' import Fuse from 'fuse.js' import * as ALL_CHAINS from '@/constants/chains/master' -import { - CHAINS_BY_ID, - sortChains, - PAUSED_FROM_CHAIN_IDS, -} from '@/constants/chains' +import { CHAINS_BY_ID, sortChains } from '@/constants/chains' import { useBridgeState } from '@/slices/bridge/hooks' export const useFromChainListArray = (searchStr: string = '') => { @@ -16,7 +12,6 @@ export const useFromChainListArray = (searchStr: string = '') => { .pickBy((value) => _.includes(fromChainIds, value.id)) .values() .value() - .filter((chain) => !PAUSED_FROM_CHAIN_IDS.includes(chain.id)) possibleChains = sortChains(possibleChains) @@ -25,7 +20,7 @@ export const useFromChainListArray = (searchStr: string = '') => { Object.keys(CHAINS_BY_ID).map((id) => CHAINS_BY_ID[id]), fromChainIds?.map((id) => CHAINS_BY_ID[id]) ) - ).filter((chain) => !PAUSED_FROM_CHAIN_IDS.includes(chain.id)) + ) const possibleChainsWithSource = possibleChains.map((chain) => ({ ...chain, diff --git a/packages/synapse-interface/components/StateManagedBridge/hooks/useToChainListArray.ts b/packages/synapse-interface/components/StateManagedBridge/hooks/useToChainListArray.ts index 0eb2bc1084..faaa0a69cb 100644 --- a/packages/synapse-interface/components/StateManagedBridge/hooks/useToChainListArray.ts +++ b/packages/synapse-interface/components/StateManagedBridge/hooks/useToChainListArray.ts @@ -2,11 +2,7 @@ import _ from 'lodash' import Fuse from 'fuse.js' import * as ALL_CHAINS from '@/constants/chains/master' -import { - CHAINS_BY_ID, - sortChains, - PAUSED_TO_CHAIN_IDS, -} from '@/constants/chains' +import { CHAINS_BY_ID, sortChains } from '@/constants/chains' import { useBridgeState } from '@/slices/bridge/hooks' export const useToChainListArray = (searchStr: string = '') => { @@ -16,7 +12,6 @@ export const useToChainListArray = (searchStr: string = '') => { .pickBy((value) => _.includes(toChainIds, value.id)) .values() .value() - .filter((chain) => !PAUSED_TO_CHAIN_IDS.includes(chain.id)) possibleChains = sortChains(possibleChains) @@ -25,7 +20,7 @@ export const useToChainListArray = (searchStr: string = '') => { Object.keys(CHAINS_BY_ID).map((id) => CHAINS_BY_ID[id]), toChainIds?.map((id) => CHAINS_BY_ID[id]) ) - ).filter((chain) => !PAUSED_TO_CHAIN_IDS.includes(chain.id)) + ) const possibleChainsWithSource = possibleChains.map((chain) => ({ ...chain, diff --git a/packages/synapse-interface/constants/chains/index.tsx b/packages/synapse-interface/constants/chains/index.tsx index 836c8a0f95..3f830c9d7b 100644 --- a/packages/synapse-interface/constants/chains/index.tsx +++ b/packages/synapse-interface/constants/chains/index.tsx @@ -39,10 +39,6 @@ export const CHAIN_IDS = getids() // used to be ids export const CHAINS_BY_ID = getChainsByID() export const ORDERED_CHAINS_BY_ID = CHAINS_ARR.map((chain) => String(chain.id)) -export const PAUSED_FROM_CHAIN_IDS = [] -// export const PAUSED_TO_CHAIN_IDS = [all.DOGE.id] -export const PAUSED_TO_CHAIN_IDS = [] - export const ChainId = { ETH: 1, ROPSTEN: 3, diff --git a/packages/synapse-interface/utils/routeMaker/generateRoutePossibilities.ts b/packages/synapse-interface/utils/routeMaker/generateRoutePossibilities.ts index bf40ad3eb3..1bea2b6153 100644 --- a/packages/synapse-interface/utils/routeMaker/generateRoutePossibilities.ts +++ b/packages/synapse-interface/utils/routeMaker/generateRoutePossibilities.ts @@ -6,7 +6,6 @@ import { getToChainIds } from './getToChainIds' import { getFromChainIds } from './getFromChainIds' import { getFromTokens } from './getFromTokens' import { getToTokens } from './getToTokens' -import { PAUSED_TO_CHAIN_IDS } from '@/constants/chains' import { findTokenByRouteSymbol } from '../findTokenByRouteSymbol' export interface RouteQueryFields { @@ -57,9 +56,7 @@ export const getRoutePossibilities = ({ fromTokenRouteSymbol, toChainId, toTokenRouteSymbol, - }) - ?.filter((chainId) => !PAUSED_TO_CHAIN_IDS.includes(chainId)) - .filter((chainId) => chainId !== fromChainId) + }).filter((chainId) => chainId !== fromChainId) const toTokens: Token[] = _( getToTokens({ @@ -70,9 +67,6 @@ export const getRoutePossibilities = ({ }) ) .difference(flattenPausedTokens()) - .filter((token) => { - return !PAUSED_TO_CHAIN_IDS.some((value) => token.endsWith(`-${value}`)) - }) .map(getSymbol) .uniq() .map((symbol) => findTokenByRouteSymbol(symbol)) diff --git a/packages/synapse-interface/utils/swapFinder/generateSwapPossibilities.ts b/packages/synapse-interface/utils/swapFinder/generateSwapPossibilities.ts index 0c80ee0c7c..2637e23285 100644 --- a/packages/synapse-interface/utils/swapFinder/generateSwapPossibilities.ts +++ b/packages/synapse-interface/utils/swapFinder/generateSwapPossibilities.ts @@ -5,7 +5,6 @@ import { Token } from '../types' import { getSwapFromChainIds } from './getSwapFromChainIds' import { getSwapFromTokens } from './getSwapFromTokens' import { getSwapToTokens } from './getSwapToTokens' -import { PAUSED_TO_CHAIN_IDS } from '@/constants/chains' import { findTokenByRouteSymbol } from '../findTokenByRouteSymbol' import { getSymbol } from '@/utils/getSymbol' @@ -61,9 +60,6 @@ export const getSwapPossibilities = ({ }) ) .difference(flattenPausedTokens()) - .filter((token) => { - return !PAUSED_TO_CHAIN_IDS.some((value) => token.endsWith(`-${value}`)) - }) .map(getSymbol) .uniq() .map((symbol) => findTokenByRouteSymbol(symbol))