diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-14 22:50:32 +0800 |
---|---|---|
committer | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-15 23:25:24 +0800 |
commit | c3afc13dd660348e99b727c2dd01930eec8d99c3 (patch) | |
tree | 9a05e88e55200fdf72d08af10b5a753535e23256 /contracts/protocol/test/utils/fill_order_combinatorial_utils.ts | |
parent | f570f80674c22f69712c45e8e3c48e948b51f357 (diff) | |
download | dexon-sol-tools-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar dexon-sol-tools-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.gz dexon-sol-tools-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.bz2 dexon-sol-tools-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.lz dexon-sol-tools-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.xz dexon-sol-tools-c3afc13dd660348e99b727c2dd01930eec8d99c3.tar.zst dexon-sol-tools-c3afc13dd660348e99b727c2dd01930eec8d99c3.zip |
Upgrade bignumber.js version
Diffstat (limited to 'contracts/protocol/test/utils/fill_order_combinatorial_utils.ts')
-rw-r--r-- | contracts/protocol/test/utils/fill_order_combinatorial_utils.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts b/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts index 2fd33bebd..c2f530e5b 100644 --- a/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts +++ b/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts @@ -469,7 +469,7 @@ export class FillOrderCombinatorialUtils { const remainingTakerAmountToFill = signedOrder.takerAssetAmount.minus(alreadyFilledTakerAmount); const expFilledTakerAmount = takerAssetFillAmount.gt(remainingTakerAmountToFill) ? remainingTakerAmountToFill - : alreadyFilledTakerAmount.add(takerAssetFillAmount); + : alreadyFilledTakerAmount.plus(takerAssetFillAmount); const expFilledMakerAmount = orderUtils.getPartialAmountFloor( expFilledTakerAmount, @@ -644,7 +644,7 @@ export class FillOrderCombinatorialUtils { break; case TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount: - takerAssetFillAmount = fillableTakerAssetAmount.add(1); + takerAssetFillAmount = fillableTakerAssetAmount.plus(1); break; case TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount: @@ -657,7 +657,7 @@ export class FillOrderCombinatorialUtils { 'Cannot test `TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount` together with ERC721 assets since orders involving ERC721 must always be filled exactly.', ); } - takerAssetFillAmount = fillableTakerAssetAmount.div(2).floor(); + takerAssetFillAmount = fillableTakerAssetAmount.div(2).integerValue(BigNumber.ROUND_FLOOR); break; default: |