From c3afc13dd660348e99b727c2dd01930eec8d99c3 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 14 Jan 2019 15:50:32 +0100 Subject: Upgrade bignumber.js version --- packages/order-utils/src/exchange_transfer_simulator.ts | 4 ++-- packages/order-utils/src/market_utils.ts | 4 ++-- packages/order-utils/src/order_state_utils.ts | 12 ++++++------ packages/order-utils/src/order_validation_utils.ts | 8 ++++---- packages/order-utils/src/rate_utils.ts | 6 +++--- packages/order-utils/src/remaining_fillable_calculator.ts | 6 +++--- packages/order-utils/src/salt.ts | 2 +- packages/order-utils/src/utils.ts | 6 +++--- .../order-utils/test/remaining_fillable_calculator_test.ts | 2 +- packages/order-utils/test/signature_utils_test.ts | 4 ++-- 10 files changed, 27 insertions(+), 27 deletions(-) (limited to 'packages/order-utils') diff --git a/packages/order-utils/src/exchange_transfer_simulator.ts b/packages/order-utils/src/exchange_transfer_simulator.ts index 06621fd9e..922ae8e17 100644 --- a/packages/order-utils/src/exchange_transfer_simulator.ts +++ b/packages/order-utils/src/exchange_transfer_simulator.ts @@ -88,14 +88,14 @@ export class ExchangeTransferSimulator { } const balance = await this._store.getBalanceAsync(assetData, from); const proxyAllowance = await this._store.getProxyAllowanceAsync(assetData, from); - if (proxyAllowance.lessThan(amountInBaseUnits)) { + if (proxyAllowance.isLessThan(amountInBaseUnits)) { ExchangeTransferSimulator._throwValidationError( FailureReason.ProxyAllowance, tradeSide, transferType, ); } - if (balance.lessThan(amountInBaseUnits)) { + if (balance.isLessThan(amountInBaseUnits)) { ExchangeTransferSimulator._throwValidationError(FailureReason.Balance, tradeSide, transferType); } await this._decreaseProxyAllowanceAsync(assetData, from, amountInBaseUnits); diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts index fa32f1413..9042551fa 100644 --- a/packages/order-utils/src/market_utils.ts +++ b/packages/order-utils/src/market_utils.ts @@ -52,7 +52,7 @@ export const marketUtils = { const result = _.reduce( orders, ({ resultOrders, remainingFillAmount, ordersRemainingFillableMakerAssetAmounts }, order, index) => { - if (remainingFillAmount.lessThanOrEqualTo(constants.ZERO_AMOUNT)) { + if (remainingFillAmount.isLessThanOrEqualTo(constants.ZERO_AMOUNT)) { return { resultOrders, remainingFillAmount: constants.ZERO_AMOUNT, @@ -137,7 +137,7 @@ export const marketUtils = { (accFees, order, index) => { const makerAssetAmountAvailable = remainingFillableMakerAssetAmounts[index]; const feeToFillMakerAssetAmountAvailable = makerAssetAmountAvailable - .mul(order.takerFee) + .multipliedBy(order.takerFee) .dividedToIntegerBy(order.makerAssetAmount); return accFees.plus(feeToFillMakerAssetAmountAvailable); }, diff --git a/packages/order-utils/src/order_state_utils.ts b/packages/order-utils/src/order_state_utils.ts index 389419587..430178b5d 100644 --- a/packages/order-utils/src/order_state_utils.ts +++ b/packages/order-utils/src/order_state_utils.ts @@ -214,10 +214,10 @@ export class OrderStateUtils { const remainingFillableTakerAssetAmountGivenTakersStatus = orderRelevantTakerState.remainingFillableAssetAmount; // The min of these two in the actualy max fillable by either party - const fillableTakerAssetAmount = BigNumber.min([ + const fillableTakerAssetAmount = BigNumber.min( remainingFillableTakerAssetAmountGivenMakersStatus, remainingFillableTakerAssetAmountGivenTakersStatus, - ]); + ); return fillableTakerAssetAmount; } @@ -260,8 +260,8 @@ export class OrderStateUtils { traderAddress, ); - const transferrableTraderAssetAmount = BigNumber.min([traderProxyAllowance, traderBalance]); - const transferrableFeeAssetAmount = BigNumber.min([traderFeeProxyAllowance, traderFeeBalance]); + const transferrableTraderAssetAmount = BigNumber.min(traderProxyAllowance, traderBalance); + const transferrableFeeAssetAmount = BigNumber.min(traderFeeProxyAllowance, traderFeeBalance); const orderHash = orderHashUtils.getOrderHashHex(signedOrder); const filledTakerAssetAmount = await this._orderFilledCancelledFetcher.getFilledTakerAmountAsync(orderHash); @@ -312,7 +312,7 @@ export class OrderStateUtils { const tokenAddress = decodedAssetData.tokenAddress; balances[tokenAddress] = _.isUndefined(initialBalances[tokenAddress]) ? balance - : balances[tokenAddress].add(balance); + : balances[tokenAddress].plus(balance); } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) { for (const assetDataElement of decodedAssetData.nestedAssetData) { balances = await this._getAssetBalancesAsync(assetDataElement, traderAddress, balances); @@ -335,7 +335,7 @@ export class OrderStateUtils { const tokenAddress = decodedAssetData.tokenAddress; allowances[tokenAddress] = _.isUndefined(initialAllowances[tokenAddress]) ? allowance - : allowances[tokenAddress].add(allowance); + : allowances[tokenAddress].plus(allowance); } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) { for (const assetDataElement of decodedAssetData.nestedAssetData) { allowances = await this._getAssetBalancesAsync(assetDataElement, traderAddress, allowances); diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts index ae4291ea8..95215d918 100644 --- a/packages/order-utils/src/order_validation_utils.ts +++ b/packages/order-utils/src/order_validation_utils.ts @@ -31,13 +31,13 @@ export class OrderValidationUtils { if (denominator.eq(0)) { throw new Error('denominator cannot be 0'); } - const remainder = target.mul(numerator).mod(denominator); + const remainder = target.multipliedBy(numerator).mod(denominator); if (remainder.eq(0)) { return false; // no rounding error } // tslint:disable-next-line:custom-no-magic-numbers - const errPercentageTimes1000000 = remainder.mul(1000000).div(numerator.mul(target)); + const errPercentageTimes1000000 = remainder.multipliedBy(1000000).div(numerator.multipliedBy(target)); // tslint:disable-next-line:custom-no-magic-numbers const isError = errPercentageTimes1000000.gt(1000); return isError; @@ -108,7 +108,7 @@ export class OrderValidationUtils { } private static _validateOrderNotExpiredOrThrow(expirationTimeSeconds: BigNumber): void { const currentUnixTimestampSec = utils.getCurrentUnixTimestampSec(); - if (expirationTimeSeconds.lessThan(currentUnixTimestampSec)) { + if (expirationTimeSeconds.isLessThan(currentUnixTimestampSec)) { throw new Error(RevertReason.OrderUnfillable); } } @@ -216,7 +216,7 @@ export class OrderValidationUtils { } OrderValidationUtils._validateOrderNotExpiredOrThrow(signedOrder.expirationTimeSeconds); const remainingTakerTokenAmount = signedOrder.takerAssetAmount.minus(filledTakerTokenAmount); - const desiredFillTakerTokenAmount = remainingTakerTokenAmount.lessThan(fillTakerAssetAmount) + const desiredFillTakerTokenAmount = remainingTakerTokenAmount.isLessThan(fillTakerAssetAmount) ? remainingTakerTokenAmount : fillTakerAssetAmount; try { diff --git a/packages/order-utils/src/rate_utils.ts b/packages/order-utils/src/rate_utils.ts index 416e00c67..dacdbd5a2 100644 --- a/packages/order-utils/src/rate_utils.ts +++ b/packages/order-utils/src/rate_utils.ts @@ -22,7 +22,7 @@ export const rateUtils = { feeRate.gte(constants.ZERO_AMOUNT), `Expected feeRate: ${feeRate} to be greater than or equal to 0`, ); - const takerAssetAmountNeededToPayForFees = order.takerFee.mul(feeRate); + const takerAssetAmountNeededToPayForFees = order.takerFee.multipliedBy(feeRate); const totalTakerAssetAmount = takerAssetAmountNeededToPayForFees.plus(order.takerAssetAmount); const rate = totalTakerAssetAmount.div(order.makerAssetAmount); return rate; @@ -35,9 +35,9 @@ export const rateUtils = { */ getFeeAdjustedRateOfFeeOrder(feeOrder: Order): BigNumber { assert.doesConformToSchema('feeOrder', feeOrder, schemas.orderSchema); - const zrxAmountAfterFees = feeOrder.makerAssetAmount.sub(feeOrder.takerFee); + const zrxAmountAfterFees = feeOrder.makerAssetAmount.minus(feeOrder.takerFee); assert.assert( - zrxAmountAfterFees.greaterThan(constants.ZERO_AMOUNT), + zrxAmountAfterFees.isGreaterThan(constants.ZERO_AMOUNT), `Expected takerFee: ${JSON.stringify(feeOrder.takerFee)} to be less than makerAssetAmount: ${JSON.stringify( feeOrder.makerAssetAmount, )}`, diff --git a/packages/order-utils/src/remaining_fillable_calculator.ts b/packages/order-utils/src/remaining_fillable_calculator.ts index 052eafa1d..92ffc8e80 100644 --- a/packages/order-utils/src/remaining_fillable_calculator.ts +++ b/packages/order-utils/src/remaining_fillable_calculator.ts @@ -39,15 +39,15 @@ export class RemainingFillableCalculator { private _hasSufficientFundsForFeeAndTransferAmount(): boolean { if (this._isTraderAssetZRX) { const totalZRXTransferAmountRequired = this._remainingOrderAssetAmount.plus(this._remainingOrderFeeAmount); - const hasSufficientFunds = this._transferrableAssetAmount.greaterThanOrEqualTo( + const hasSufficientFunds = this._transferrableAssetAmount.isGreaterThanOrEqualTo( totalZRXTransferAmountRequired, ); return hasSufficientFunds; } else { - const hasSufficientFundsForTransferAmount = this._transferrableAssetAmount.greaterThanOrEqualTo( + const hasSufficientFundsForTransferAmount = this._transferrableAssetAmount.isGreaterThanOrEqualTo( this._remainingOrderAssetAmount, ); - const hasSufficientFundsForFeeAmount = this._transferrableFeeAmount.greaterThanOrEqualTo( + const hasSufficientFundsForFeeAmount = this._transferrableFeeAmount.isGreaterThanOrEqualTo( this._remainingOrderFeeAmount, ); const hasSufficientFunds = hasSufficientFundsForTransferAmount && hasSufficientFundsForFeeAmount; diff --git a/packages/order-utils/src/salt.ts b/packages/order-utils/src/salt.ts index ff47ab5d2..95df66c99 100644 --- a/packages/order-utils/src/salt.ts +++ b/packages/order-utils/src/salt.ts @@ -13,6 +13,6 @@ export function generatePseudoRandomSalt(): BigNumber { // Source: https://mikemcl.github.io/bignumber.js/#random const randomNumber = BigNumber.random(MAX_DIGITS_IN_UNSIGNED_256_INT); const factor = new BigNumber(10).pow(MAX_DIGITS_IN_UNSIGNED_256_INT - 1); - const salt = randomNumber.times(factor).round(); + const salt = randomNumber.times(factor).integerValue(); return salt; } diff --git a/packages/order-utils/src/utils.ts b/packages/order-utils/src/utils.ts index 6b2261001..64195dbed 100644 --- a/packages/order-utils/src/utils.ts +++ b/packages/order-utils/src/utils.ts @@ -10,13 +10,13 @@ export const utils = { }, getCurrentUnixTimestampSec(): BigNumber { const milisecondsInSecond = 1000; - return new BigNumber(Date.now() / milisecondsInSecond).round(); + return new BigNumber(Date.now() / milisecondsInSecond).integerValue(); }, getPartialAmountFloor(numerator: BigNumber, denominator: BigNumber, target: BigNumber): BigNumber { const fillMakerTokenAmount = numerator - .mul(target) + .multipliedBy(target) .div(denominator) - .round(0); + .integerValue(0); return fillMakerTokenAmount; }, }; diff --git a/packages/order-utils/test/remaining_fillable_calculator_test.ts b/packages/order-utils/test/remaining_fillable_calculator_test.ts index c55a76def..affad8f1c 100644 --- a/packages/order-utils/test/remaining_fillable_calculator_test.ts +++ b/packages/order-utils/test/remaining_fillable_calculator_test.ts @@ -162,7 +162,7 @@ describe('RemainingFillableCalculator', () => { remainingMakeAssetAmount, ); const calculatedFillableAmount = calculator.computeRemainingFillable(); - expect(calculatedFillableAmount.lessThanOrEqualTo(transferrableMakeAssetAmount)).to.be.true(); + expect(calculatedFillableAmount.isLessThanOrEqualTo(transferrableMakeAssetAmount)).to.be.true(); expect(calculatedFillableAmount).to.be.bignumber.greaterThan(new BigNumber(0)); const orderToFeeRatio = signedOrder.makerAssetAmount.dividedBy(signedOrder.makerFee); const calculatedFeeAmount = calculatedFillableAmount.dividedBy(orderToFeeRatio); diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts index 84e5559a9..937382056 100644 --- a/packages/order-utils/test/signature_utils_test.ts +++ b/packages/order-utils/test/signature_utils_test.ts @@ -132,10 +132,10 @@ describe('Signature utils', () => { }); it('generates salt in range [0..2^256)', () => { const salt = generatePseudoRandomSalt(); - expect(salt.greaterThanOrEqualTo(0)).to.be.true(); + expect(salt.isGreaterThanOrEqualTo(0)).to.be.true(); // tslint:disable-next-line:custom-no-magic-numbers const twoPow256 = new BigNumber(2).pow(256); - expect(salt.lessThan(twoPow256)).to.be.true(); + expect(salt.isLessThan(twoPow256)).to.be.true(); }); }); describe('#ecSignOrderAsync', () => { -- cgit v1.2.3 From eb393f0a6643183c784914bf3e039d1f4299247d Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Mon, 14 Jan 2019 15:53:43 +0100 Subject: Upgrade chai-bignumber --- packages/order-utils/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/order-utils') diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index bdcbd2dfc..5bd459f80 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -41,7 +41,7 @@ "@types/lodash": "4.14.104", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", - "chai-bignumber": "^2.0.1", + "chai-bignumber": "^2.0.2", "dirty-chai": "^2.0.1", "make-promises-safe": "^1.1.0", "mocha": "^4.1.0", -- cgit v1.2.3 From e84232cce8b1a1b1e3607d341baa688613dcefde Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 Jan 2019 11:32:53 +0100 Subject: Use new check for isBigNumber --- packages/order-utils/src/crypto.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'packages/order-utils') diff --git a/packages/order-utils/src/crypto.ts b/packages/order-utils/src/crypto.ts index 0f1504a72..8b835ff48 100644 --- a/packages/order-utils/src/crypto.ts +++ b/packages/order-utils/src/crypto.ts @@ -1,3 +1,4 @@ +import { BigNumber } from '@0x/utils'; import BN = require('bn.js'); import ABI = require('ethereumjs-abi'); import ethUtil = require('ethereumjs-util'); @@ -24,7 +25,7 @@ export const crypto = { const isNumber = _.isFinite(arg); if (isNumber) { argTypes.push('uint8'); - } else if (arg.isBigNumber) { + } else if (BigNumber.isBigNumber(arg)) { argTypes.push('uint256'); const base = 10; args[i] = new BN(arg.toString(base), base); -- cgit v1.2.3 From 20eab4257a58c6783cf2313b160d6df342cdc7d2 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 Jan 2019 12:20:54 +0100 Subject: Upgrade chai-bignumber --- packages/order-utils/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'packages/order-utils') diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json index 5bd459f80..7a4d4aa84 100644 --- a/packages/order-utils/package.json +++ b/packages/order-utils/package.json @@ -41,7 +41,7 @@ "@types/lodash": "4.14.104", "chai": "^4.0.1", "chai-as-promised": "^7.1.0", - "chai-bignumber": "^2.0.2", + "chai-bignumber": "^3.0.0", "dirty-chai": "^2.0.1", "make-promises-safe": "^1.1.0", "mocha": "^4.1.0", -- cgit v1.2.3 From 4404f92b3809a1edf538a1ebda6e0afe053b5e0c Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 Jan 2019 17:05:51 +0100 Subject: Add CHANGELOG entries --- packages/order-utils/CHANGELOG.json | 57 ++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 16 deletions(-) (limited to 'packages/order-utils') diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index ace3656c4..a63e9b436 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -1,4 +1,13 @@ [ + { + "version": "4.0.0", + "changes": [ + { + "note": "Upgrade the bignumber.js to v8.0.2", + "pr": 1517 + } + ] + }, { "timestamp": 1547561734, "version": "3.1.2", @@ -21,7 +30,8 @@ "version": "3.1.0", "changes": [ { - "note": "Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils", + "note": + "Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils", "pr": 1363 } ], @@ -95,19 +105,23 @@ "version": "3.0.0", "changes": [ { - "note": "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", + "note": + "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", "pr": 1235 }, { - "note": "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", + "note": + "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", "pr": 1235 }, { - "note": "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", + "note": + "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", "pr": 1235 }, { - "note": "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param", + "note": + "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param", "pr": 1235 } ], @@ -126,7 +140,8 @@ "version": "2.0.0", "changes": [ { - "note": "Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`.", + "note": + "Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`.", "pr": 1102 }, { @@ -157,7 +172,8 @@ "version": "1.0.6", "changes": [ { - "note": "Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address", + "note": + "Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address", "pr": 1096 } ], @@ -239,19 +255,23 @@ "pr": 953 }, { - "note": "Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided", + "note": + "Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided", "pr": 954 }, { - "note": "Instead of exporting signature util methods individually, they are now exported as `signatureUtils`", + "note": + "Instead of exporting signature util methods individually, they are now exported as `signatureUtils`", "pr": 924 }, { - "note": "Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", + "note": + "Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", "pr": 924 }, { - "note": "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api", + "note": + "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api", "pr": 997 }, { @@ -259,7 +279,8 @@ "pr": 997 }, { - "note": "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees", + "note": + "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees", "pr": 997 } ], @@ -270,10 +291,12 @@ "changes": [ { "pr": 914, - "note": "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts." + "note": + "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts." }, { - "note": "Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters", + "note": + "Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters", "pr": 936 }, { @@ -317,7 +340,8 @@ "version": "1.0.0-rc.2", "changes": [ { - "note": "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`" + "note": + "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`" } ], "timestamp": 1532357734 @@ -380,7 +404,8 @@ "version": "0.0.5", "changes": [ { - "note": "Add orderStateUtils, a module for computing order state needed to decide if an order is still valid" + "note": + "Add orderStateUtils, a module for computing order state needed to decide if an order is still valid" } ], "timestamp": 1527008794 -- cgit v1.2.3 From 7d166dc7da23c30540fb554727a955015073286f Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 15 Jan 2019 17:34:44 +0100 Subject: Fix prettier --- packages/order-utils/CHANGELOG.json | 48 +++++++++++++------------------------ 1 file changed, 16 insertions(+), 32 deletions(-) (limited to 'packages/order-utils') diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json index a63e9b436..08d88da5b 100644 --- a/packages/order-utils/CHANGELOG.json +++ b/packages/order-utils/CHANGELOG.json @@ -30,8 +30,7 @@ "version": "3.1.0", "changes": [ { - "note": - "Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils", + "note": "Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils", "pr": 1363 } ], @@ -105,23 +104,19 @@ "version": "3.0.0", "changes": [ { - "note": - "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", + "note": "Add signature validation, regular cancellation and `cancelledUpTo` checks to `validateOrderFillableOrThrowAsync`", "pr": 1235 }, { - "note": - "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", + "note": "Improved the errors thrown by `validateOrderFillableOrThrowAsync` by making them more descriptive", "pr": 1235 }, { - "note": - "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", + "note": "Throw previously swallowed network errors when calling `validateOrderFillableOrThrowAsync` (see issue: #1218)", "pr": 1235 }, { - "note": - "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param", + "note": "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param", "pr": 1235 } ], @@ -140,8 +135,7 @@ "version": "2.0.0", "changes": [ { - "note": - "Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`.", + "note": "Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`.", "pr": 1102 }, { @@ -172,8 +166,7 @@ "version": "1.0.6", "changes": [ { - "note": - "Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address", + "note": "Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address", "pr": 1096 } ], @@ -255,23 +248,19 @@ "pr": 953 }, { - "note": - "Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided", + "note": "Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided", "pr": 954 }, { - "note": - "Instead of exporting signature util methods individually, they are now exported as `signatureUtils`", + "note": "Instead of exporting signature util methods individually, they are now exported as `signatureUtils`", "pr": 924 }, { - "note": - "Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", + "note": "Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`", "pr": 924 }, { - "note": - "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api", + "note": "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api", "pr": 997 }, { @@ -279,8 +268,7 @@ "pr": 997 }, { - "note": - "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees", + "note": "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees", "pr": 997 } ], @@ -291,12 +279,10 @@ "changes": [ { "pr": 914, - "note": - "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts." + "note": "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts." }, { - "note": - "Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters", + "note": "Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters", "pr": 936 }, { @@ -340,8 +326,7 @@ "version": "1.0.0-rc.2", "changes": [ { - "note": - "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`" + "note": "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`" } ], "timestamp": 1532357734 @@ -404,8 +389,7 @@ "version": "0.0.5", "changes": [ { - "note": - "Add orderStateUtils, a module for computing order state needed to decide if an order is still valid" + "note": "Add orderStateUtils, a module for computing order state needed to decide if an order is still valid" } ], "timestamp": 1527008794 -- cgit v1.2.3