diff --git a/src/components/pages/swap/Swap.jsx b/src/components/pages/swap/Swap.jsx index 99d1b4ed..710d9912 100644 --- a/src/components/pages/swap/Swap.jsx +++ b/src/components/pages/swap/Swap.jsx @@ -457,7 +457,7 @@ const Swap = ({ direct control (i.e. not a CEX deposit address). ) : null} - {from && + {/* {from && to && (from.blockchain == 'EOS' || to.blockchain == 'EOS') && !(dismissedAssets.includes(from.id) || dismissedAssets.includes(to.id)) ? ( @@ -465,19 +465,34 @@ const Swap = ({ EOS chain will soon be upgraded to pNetwork v4 and has been disabled on v2. Swaps will soon be resumed on v4. - ) : null} - {from && to && disabledAssets.includes(to.id) ? ( + ) : null} */} + {/* {from && to && (disabledAssets.includes(to.id) || to.blockchain == 'EOS')? ( {`${to.name} on ${to.blockchain} has been dismissed and pegins are disabled. Pegout the native token ASAP for a smooth redeem process.`} ) : null} - {from && to && disabledAssets.includes(from.id) ? ( + {from && to && (disabledAssets.includes(from.id) || from.blockchain == 'EOS') ? ( {`${from.name} on ${from.blockchain} has been dismissed. Proceed ASAP for a smooth redeem process.`} - ) : null} - {from && to && (dismissedAssets.includes(to.id) || dismissedAssets.includes(from.id)) ? ( + ) : null} */} + {/* {from && to && (dismissedAssets.includes(to.id) || dismissedAssets.includes(from.id) || + disabledAssets.includes(to.id) + ) ? ( { 'Token no longer supported. This token is no longer active on pNetwork and the redemption window via the official dApp has closed. For further assistance, please contact hello@p.network.' } + ) : null} */} + {from && + to && + (dismissedAssets.includes(to.id) || + dismissedAssets.includes(from.id) || + (disabledAssets.includes(to.id) && disabledAssets.includes(from.id)) || + (from.blockchain == 'EOS' && disabledAssets.includes(to.id)) || + (to.blockchain == 'EOS' && disabledAssets.includes(from.id))) ? ( + {`Token no longer supported. Please pegout towards native ${to.nativeSymbol}`} + ) : from && to && (disabledAssets.includes(from.id) || from.blockchain == 'EOS') ? ( + {`${from.name} on ${from.blockchain} has been dismissed. Proceed ASAP for a smooth redeem process.`} + ) : from && to && (disabledAssets.includes(to.id) || to.blockchain == 'EOS') ? ( + {`${to.name} on ${to.blockchain} has been dismissed and pegins are disabled. Pegout the native token ASAP for a smooth redeem process.`} ) : null} {to && (to.id === 'PUSDC_ON_ALGORAND_MAINNET' || diff --git a/src/hooks/use-swap.js b/src/hooks/use-swap.js index 850095de..3b93981e 100644 --- a/src/hooks/use-swap.js +++ b/src/hooks/use-swap.js @@ -324,7 +324,7 @@ const useSwap = ({ disabledAssets.includes(to.id) || dismissedAssets.includes(from.id) || dismissedAssets.includes(to.id) || - from.blockchain === 'EOS' || + // from.blockchain === 'EOS' || to.blockchain === 'EOS' ) { updateSwapButton('Disabled Swap', true) diff --git a/src/settings/swap-assets.js b/src/settings/swap-assets.js index 25034e9b..6b266ffc 100644 --- a/src/settings/swap-assets.js +++ b/src/settings/swap-assets.js @@ -30,15 +30,19 @@ export const disabledAssets = [ 'WSB_ON_ETH_MAINNET', 'PLTC_ON_ETH_MAINNET', 'BIST_ON_BSC_MAINNET', -] - -export const dismissedAssets = [ 'PUSDT_ON_LIBRE_MAINNET', 'PBTC_ON_LIBRE_MAINNET', 'IQ_ON_ETH_MAINNET', 'PBTC_ON_EOS_MAINNET', ] +export const dismissedAssets = [ + // 'PUSDT_ON_LIBRE_MAINNET', + // 'PBTC_ON_LIBRE_MAINNET', + // 'IQ_ON_ETH_MAINNET', + // 'PBTC_ON_EOS_MAINNET', +] + const swapAssets = [ /* ################# pTokens #################*/ {