diff --git a/src/hooks/use-swap.js b/src/hooks/use-swap.js index 54ce52b7..3904d37c 100644 --- a/src/hooks/use-swap.js +++ b/src/hooks/use-swap.js @@ -10,6 +10,7 @@ import { CURVE_MAX_AMOUNT, } from '../constants' import { sendEvent } from '../ga4' +import { disabledAssets } from '../settings/swap-assets' import { maybeOptInAlgoApp, maybeOptInAlgoAsset } from '../store/swap/utils/opt-in-algo' import { isValidAccountByBlockchain } from '../utils/account-validator' import { getSwapFees, computeSwapAmount } from '../utils/fee' @@ -319,29 +320,7 @@ const useSwap = ({ return } - if ( - (from.id === 'GALA' && to.id === 'GALA_ON_BSC_MAINNET') || - (from.id === '$ANRX' && to.id === '$ANRX_ON_BSC_MAINNET') || - (from.id === 'BTC' && to.id === 'PBTC_ON_ARBITRUM_MAINNET') || - (from.id === 'BTC' && to.id === 'PBTC_ON_LIBRE_MAINNET') || - (from.id === 'BTC' && to.id === 'PBTC_ON_TELOS_MAINNET') || - (from.id === 'PNT_ON_ETH_MAINNET' && to.id === 'PNT_ON_ARBITRUM_MAINNET') || - (from.id === 'ETHPNT_ON_ETH_MAINNET' && to.id === 'PNT_ON_ARBITRUM_MAINNET') || - (from.id === 'IQ' && to.id === 'IQ_ON_ETH_MAINNET') || - (from.id === 'KEYS' && to.id === 'PKEYS_ON_BSC_MAINNET') || - (from.id === 'LUXO' && to.id === 'LUXO_ON_BSC_MAINNET') || - (from.id === 'OPEN' && to.id === 'POPEN_ON_BSC_MAINNET') || - (from.id === 'OPIUM' && to.id === 'POPIUM_ON_BSC_MAINNET') || - (from.id === 'PTERIA' && to.id === 'PTERIA_ON_BSC_MAINNET') || - (from.id === 'SEEDS' && to.id === 'PSEEDS_ON_ETH_MAINNET') || - (from.id === 'TLOS' && to.id === 'TLOS_ON_ETH_MAINNET') || - (from.id === 'TLOS' && to.id === 'TLOS_ON_BSC_MAINNET') || - (from.id === 'USDT' && to.id === 'PUSDT_ON_LIBRE_MAINNET') || - (from.id === 'USDT' && to.id === 'PUSDT_ON_TELOS_MAINNET') || - (from.id === 'ETH' && to.id === 'PETH_ON_TELOS_MAINNET') || - (from.id === 'NUCO' && to.id === 'NUCO_ON_TELOS_MAINNET') || - (from.id === 'ZMT' && to.id === 'ZMT_ON_BSC_MAINNET') - ) { + if (disabledAssets.includes(to.id)) { updateSwapButton('Disabled Swap', true) return }