aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/test-utils
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2019-01-14 22:50:32 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2019-01-15 23:25:24 +0800
commitc3afc13dd660348e99b727c2dd01930eec8d99c3 (patch)
tree9a05e88e55200fdf72d08af10b5a753535e23256 /contracts/test-utils
parentf570f80674c22f69712c45e8e3c48e948b51f357 (diff)
downloaddexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.gz
dexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.zst
dexon-0x-contracts-c3afc13dd660348e99b727c2dd01930eec8d99c3.zip
Upgrade bignumber.js version
Diffstat (limited to 'contracts/test-utils')
-rw-r--r--contracts/test-utils/src/order_factory.ts2
-rw-r--r--contracts/test-utils/src/order_utils.ts4
2 files changed, 3 insertions, 3 deletions
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) => {