Compare commits

..

3 Commits

Author SHA1 Message Date
Github Actions
3133c509f9 Publish
- @0x/contracts-integrations@2.7.9
 - @0x/asset-swapper@5.1.1
2020-11-14 02:19:41 +00:00
Github Actions
426c15692d Updated CHANGELOGS & MD docs 2020-11-14 02:19:33 +00:00
mzhu25
8c87a77faa Remove PLP VIP path from EP swap quote consumer (#36) 2020-11-13 17:49:30 -08:00
8 changed files with 32 additions and 25 deletions

View File

@@ -1,4 +1,13 @@
[
{
"timestamp": 1605320370,
"version": "2.7.9",
"changes": [
{
"note": "Dependencies updated"
}
]
},
{
"timestamp": 1605302002,
"version": "2.7.8",

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v2.7.9 - _November 14, 2020_
* Dependencies updated
## v2.7.8 - _November 13, 2020_
* Dependencies updated

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/contracts-integrations",
"version": "2.7.8",
"version": "2.7.9",
"engines": {
"node": ">=6.12"
},
@@ -91,7 +91,7 @@
"typescript": "3.0.1"
},
"dependencies": {
"@0x/asset-swapper": "^5.1.0",
"@0x/asset-swapper": "^5.1.1",
"@0x/base-contract": "^6.2.11",
"@0x/contracts-asset-proxy": "^3.6.5",
"@0x/contracts-erc1155": "^2.1.14",

View File

@@ -1,4 +1,14 @@
[
{
"version": "5.1.1",
"changes": [
{
"note": "Disable PLP VIP feature in EP swap quote consumer",
"pr": 36
}
],
"timestamp": 1605320370
},
{
"version": "5.1.0",
"changes": [

View File

@@ -5,6 +5,10 @@ Edit the package's CHANGELOG.json file only.
CHANGELOG
## v5.1.1 - _November 14, 2020_
* Disable PLP VIP feature in EP swap quote consumer (#36)
## v5.1.0 - _November 13, 2020_
* Add support for LiquidityProvider feature in the swap quote consumer (#16)

View File

@@ -1,6 +1,6 @@
{
"name": "@0x/asset-swapper",
"version": "5.1.0",
"version": "5.1.1",
"engines": {
"node": ">=6.12"
},

View File

@@ -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) {

View File

@@ -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: [