diff --git a/packages/asset-swapper/CHANGELOG.json b/packages/asset-swapper/CHANGELOG.json index c1ce889348..c13387b1af 100644 --- a/packages/asset-swapper/CHANGELOG.json +++ b/packages/asset-swapper/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "6.6.1", + "changes": [ + { + "note": "Fixing Positive Slippage logic to not force the EP route", + "pr": 209 + } + ] + }, { "version": "6.6.0", "changes": [ diff --git a/packages/asset-swapper/src/quote_consumers/quote_consumer_utils.ts b/packages/asset-swapper/src/quote_consumers/quote_consumer_utils.ts index cf8165f6ae..d099f4ea60 100644 --- a/packages/asset-swapper/src/quote_consumers/quote_consumer_utils.ts +++ b/packages/asset-swapper/src/quote_consumers/quote_consumer_utils.ts @@ -1,6 +1,6 @@ import { FillQuoteTransformerData, FillQuoteTransformerOrderType } from '@0x/protocol-utils'; -import { AffiliateFeeType, ExchangeProxyContractOpts, MarketBuySwapQuote, MarketOperation, SwapQuote } from '../types'; +import { ExchangeProxyContractOpts, MarketBuySwapQuote, MarketOperation, SwapQuote } from '../types'; import { createBridgeDataForBridgeOrder, getErc20BridgeSourceToBridgeSource, @@ -70,6 +70,7 @@ export function isMultiplexMultiHopFillCompatible(quote: SwapQuote, opts: Exchan /** * Returns true iff a quote can be filled via a VIP feature. */ + export function isDirectSwapCompatible( quote: SwapQuote, opts: ExchangeProxyContractOpts, @@ -163,10 +164,6 @@ export function requiresTransformERC20(opts: ExchangeProxyContractOpts): boolean if (!opts.affiliateFee.buyTokenFeeAmount.eq(0) || !opts.affiliateFee.sellTokenFeeAmount.eq(0)) { return true; } - // Has a positive slippage fee. - if (opts.affiliateFee.feeType === AffiliateFeeType.PositiveSlippageFee) { - return true; - } // VIP does not support selling the entire balance if (opts.shouldSellEntireBalance) { return true;