diff --git a/packages/asset-swapper/CHANGELOG.json b/packages/asset-swapper/CHANGELOG.json index f159a80956..766375fe00 100644 --- a/packages/asset-swapper/CHANGELOG.json +++ b/packages/asset-swapper/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "5.1.1", + "changes": [ + { + "note": "Disable PLP VIP feature in EP swap quote consumer", + "pr": 36 + } + ] + }, { "version": "5.1.0", "changes": [ diff --git a/packages/asset-swapper/src/quote_consumers/exchange_proxy_swap_quote_consumer.ts b/packages/asset-swapper/src/quote_consumers/exchange_proxy_swap_quote_consumer.ts index b89b965a3f..c2c2fb4905 100644 --- a/packages/asset-swapper/src/quote_consumers/exchange_proxy_swap_quote_consumer.ts +++ b/packages/asset-swapper/src/quote_consumers/exchange_proxy_swap_quote_consumer.ts @@ -34,7 +34,7 @@ import { getSwapMinBuyAmount } from './utils'; // tslint:disable-next-line:custom-no-magic-numbers const MAX_UINT256 = new BigNumber(2).pow(256).minus(1); -const { NULL_ADDRESS, NULL_BYTES, ZERO_AMOUNT } = constants; +const { NULL_ADDRESS, ZERO_AMOUNT } = constants; export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase { public readonly provider: ZeroExProvider; @@ -131,26 +131,6 @@ export class ExchangeProxySwapQuoteConsumer implements SwapQuoteConsumerBase { }; } - if (isDirectSwapCompatible(quote, optsWithDefaults, [ERC20BridgeSource.LiquidityProvider])) { - const target = quote.orders[0].makerAddress; - return { - calldataHexString: this._exchangeProxy - .sellToLiquidityProvider( - isFromETH ? ETH_TOKEN_ADDRESS : sellToken, - isToETH ? ETH_TOKEN_ADDRESS : buyToken, - target, - NULL_ADDRESS, - sellAmount, - minBuyAmount, - NULL_BYTES, - ) - .getABIEncodedTransactionData(), - ethAmount: isFromETH ? sellAmount : ZERO_AMOUNT, - toAddress: this._exchangeProxy.address, - allowanceTarget: this.contractAddresses.exchangeProxyAllowanceTarget, - }; - } - // Build up the transforms. const transforms = []; if (isFromETH) { diff --git a/packages/asset-swapper/test/exchange_proxy_swap_quote_consumer_test.ts b/packages/asset-swapper/test/exchange_proxy_swap_quote_consumer_test.ts index 552cde57d0..d6d26fbd8e 100644 --- a/packages/asset-swapper/test/exchange_proxy_swap_quote_consumer_test.ts +++ b/packages/asset-swapper/test/exchange_proxy_swap_quote_consumer_test.ts @@ -377,7 +377,7 @@ describe('ExchangeProxySwapQuoteConsumer', () => { INTERMEDIATE_TOKEN, ]); }); - it('Uses the `LiquidityProviderFeature` if given a single LiquidityProvider order', async () => { + it.skip('Uses the `LiquidityProviderFeature` if given a single LiquidityProvider order', async () => { const quote = { ...getRandomSellQuote(), orders: [