@0x/contracts-exchange: Update CHANGELOG and run prettier.

This commit is contained in:
Lawrence Forman 2019-08-20 12:50:17 -04:00
parent 34f6facdee
commit a497ddfad2
2 changed files with 16 additions and 8 deletions

View File

@ -182,10 +182,6 @@
"note": "Introduce new `marketSellOrdersFillOrKill` and `marketBuyOrdersFillOrKill` functions.", "note": "Introduce new `marketSellOrdersFillOrKill` and `marketBuyOrdersFillOrKill` functions.",
"pr": 2075 "pr": 2075
}, },
{
"note": "Add new rich error types: `IncompleteMarketBuyError` and `IncompleteMarketSellError`.",
"pr": 2075
},
{ {
"note": "Use `abi.decode()` in `LibExchangeRichErrorDecoder` over `LibBytes`.", "note": "Use `abi.decode()` in `LibExchangeRichErrorDecoder` over `LibBytes`.",
"pr": 2075 "pr": 2075

View File

@ -880,12 +880,18 @@ blockchainTests('Exchange wrapper functions unit tests.', env => {
order.salt = ALWAYS_FAILING_SALT; order.salt = ALWAYS_FAILING_SALT;
} }
const signatures = _.times(COUNT, i => createOrderSignature(orders[i])); const signatures = _.times(COUNT, i => createOrderSignature(orders[i]));
const badOrdersAmount = _.reduce(badOrders, (total, o) => o.takerAssetAmount.plus(total), constants.ZERO_AMOUNT); const badOrdersAmount = _.reduce(
badOrders,
(total, o) => o.takerAssetAmount.plus(total),
constants.ZERO_AMOUNT,
);
const takerAssetFillAmount = _.reduce( const takerAssetFillAmount = _.reduce(
orders, orders,
(total, o) => o.takerAssetAmount.plus(total), (total, o) => o.takerAssetAmount.plus(total),
constants.ZERO_AMOUNT, constants.ZERO_AMOUNT,
).minus(badOrdersAmount).plus(1); )
.minus(badOrdersAmount)
.plus(1);
const expectedError = new ExchangeRevertErrors.IncompleteFillError( const expectedError = new ExchangeRevertErrors.IncompleteFillError(
ExchangeRevertErrors.IncompleteFillErrorCode.IncompleteMarketSellOrders, ExchangeRevertErrors.IncompleteFillErrorCode.IncompleteMarketSellOrders,
takerAssetFillAmount, takerAssetFillAmount,
@ -1230,12 +1236,18 @@ blockchainTests('Exchange wrapper functions unit tests.', env => {
order.salt = ALWAYS_FAILING_SALT; order.salt = ALWAYS_FAILING_SALT;
} }
const signatures = _.times(COUNT, i => createOrderSignature(orders[i])); const signatures = _.times(COUNT, i => createOrderSignature(orders[i]));
const badOrdersAmount = _.reduce(badOrders, (total, o) => o.makerAssetAmount.plus(total), constants.ZERO_AMOUNT); const badOrdersAmount = _.reduce(
badOrders,
(total, o) => o.makerAssetAmount.plus(total),
constants.ZERO_AMOUNT,
);
const makerAssetFillAmount = _.reduce( const makerAssetFillAmount = _.reduce(
orders, orders,
(total, o) => o.makerAssetAmount.plus(total), (total, o) => o.makerAssetAmount.plus(total),
constants.ZERO_AMOUNT, constants.ZERO_AMOUNT,
).minus(badOrdersAmount).plus(1); )
.minus(badOrdersAmount)
.plus(1);
const expectedError = new ExchangeRevertErrors.IncompleteFillError( const expectedError = new ExchangeRevertErrors.IncompleteFillError(
ExchangeRevertErrors.IncompleteFillErrorCode.IncompleteMarketBuyOrders, ExchangeRevertErrors.IncompleteFillErrorCode.IncompleteMarketBuyOrders,
makerAssetFillAmount, makerAssetFillAmount,