diff --git a/src/utils/fee.js b/src/utils/fee.js index 3a778fec..ca314f85 100644 --- a/src/utils/fee.js +++ b/src/utils/fee.js @@ -26,8 +26,7 @@ const getMigrationFees = (_from, _to) => { } const getSwapFees = async (_from, _to) => { - if (_from.id === ETHPNT_ON_ETH_MAINNET && _to.id === 'PNT') - return { basisPoints: 25, networkFee: 0, minProtocolFee: 0 } + if (_to.id === ETHPNT_ON_ETH_MAINNET) return { basisPoints: 25, networkFee: 0, minProtocolFee: 0 } if (_from.id === ETHPNT_ON_ETH_MAINNET) return { basisPoints: 10, networkFee: 0, minProtocolFee: 0 } try { const fromAsset = await createAsset(_from) diff --git a/src/utils/swap-valildator.js b/src/utils/swap-valildator.js index 21f2a3c1..4822bc16 100644 --- a/src/utils/swap-valildator.js +++ b/src/utils/swap-valildator.js @@ -4,6 +4,7 @@ export const isValidSwap = (from, to, assets) => { if (_.isNil(from) || _.isNil(to)) return false if (to.id === from.id) return false if (from.nativeSymbol === 'ethPNT' && to.nativeSymbol === 'PNT' && !to.isNative) return true + if (from.nativeSymbol === 'PNT' && to.nativeSymbol === 'ethPNT' && !from.isNative) return true if (!assets.find(({ id }) => from.id === id) && !assets.find(({ id }) => to.id === id)) return false if (to.isHidden) return false if (to.nativeSymbol.toLowerCase() !== from.nativeSymbol.toLowerCase()) return false