aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/test-utils
diff options
context:
space:
mode:
Diffstat (limited to 'contracts/test-utils')
-rw-r--r--contracts/test-utils/CHANGELOG.json9
-rw-r--r--contracts/test-utils/package.json2
-rw-r--r--contracts/test-utils/src/order_factory.ts2
-rw-r--r--contracts/test-utils/src/order_utils.ts4
4 files changed, 13 insertions, 4 deletions
diff --git a/contracts/test-utils/CHANGELOG.json b/contracts/test-utils/CHANGELOG.json
index 91485313a..ae1575e43 100644
--- a/contracts/test-utils/CHANGELOG.json
+++ b/contracts/test-utils/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "3.0.0",
+ "changes": [
+ {
+ "note": "Upgrade the bignumber.js to v8.0.2",
+ "pr": 1517
+ }
+ ]
+ },
+ {
"timestamp": 1547747677,
"version": "2.0.1",
"changes": [
diff --git a/contracts/test-utils/package.json b/contracts/test-utils/package.json
index b7cfcb5b6..b0f4713af 100644
--- a/contracts/test-utils/package.json
+++ b/contracts/test-utils/package.json
@@ -61,7 +61,7 @@
"bn.js": "^4.11.8",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
- "chai-bignumber": "^2.0.1",
+ "chai-bignumber": "^3.0.0",
"dirty-chai": "^2.0.1",
"ethereum-types": "^1.1.6",
"ethereumjs-abi": "0.6.5",
diff --git a/contracts/test-utils/src/order_factory.ts b/contracts/test-utils/src/order_factory.ts
index 2449d1a8a..b0f435ff2 100644
--- a/contracts/test-utils/src/order_factory.ts
+++ b/contracts/test-utils/src/order_factory.ts
@@ -21,7 +21,7 @@ export class OrderFactory {
const currentBlockTimestamp = await getLatestBlockTimestampAsync();
const order = ({
senderAddress: constants.NULL_ADDRESS,
- expirationTimeSeconds: new BigNumber(currentBlockTimestamp).add(tenMinutesInSeconds),
+ expirationTimeSeconds: new BigNumber(currentBlockTimestamp).plus(tenMinutesInSeconds),
salt: generatePseudoRandomSalt(),
takerAddress: constants.NULL_ADDRESS,
...this._defaultOrderParams,
diff --git a/contracts/test-utils/src/order_utils.ts b/contracts/test-utils/src/order_utils.ts
index 4f7a34011..fd336bb47 100644
--- a/contracts/test-utils/src/order_utils.ts
+++ b/contracts/test-utils/src/order_utils.ts
@@ -7,9 +7,9 @@ import { CancelOrder, MatchOrder } from './types';
export const orderUtils = {
getPartialAmountFloor(numerator: BigNumber, denominator: BigNumber, target: BigNumber): BigNumber {
const partialAmount = numerator
- .mul(target)
+ .multipliedBy(target)
.div(denominator)
- .floor();
+ .integerValue(BigNumber.ROUND_FLOOR);
return partialAmount;
},
createFill: (signedOrder: SignedOrder, takerAssetFillAmount?: BigNumber) => {