diff options
author | Leonid Logvinov <logvinov.leon@gmail.com> | 2019-01-18 20:06:08 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-18 20:06:08 +0800 |
commit | 3973dec9944a10c62ec6c3d15d973a00a6ea45a6 (patch) | |
tree | 73f1528a36b8fc8a0778e164b1579eb5865d944a /contracts/protocol/test/exchange/core.ts | |
parent | bef30e4209b26c8d4f443f8672e9acb9471c6a37 (diff) | |
parent | c8212f1d4d255120e5e683664b86f1830fb45ae6 (diff) | |
download | dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.gz dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.bz2 dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.lz dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.xz dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.tar.zst dexon-sol-tools-3973dec9944a10c62ec6c3d15d973a00a6ea45a6.zip |
Merge pull request #1517 from 0xProject/feature/bignumber-8.0
Bignumber 8.0
Diffstat (limited to 'contracts/protocol/test/exchange/core.ts')
-rw-r--r-- | contracts/protocol/test/exchange/core.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/contracts/protocol/test/exchange/core.ts b/contracts/protocol/test/exchange/core.ts index 700643b79..f88be1c94 100644 --- a/contracts/protocol/test/exchange/core.ts +++ b/contracts/protocol/test/exchange/core.ts @@ -538,7 +538,7 @@ describe('Exchange core', () => { it('should throw if order is expired', async () => { const currentTimestamp = await getLatestBlockTimestampAsync(); signedOrder = await orderFactory.newSignedOrderAsync({ - expirationTimeSeconds: new BigNumber(currentTimestamp).sub(10), + expirationTimeSeconds: new BigNumber(currentTimestamp).minus(10), }); return expectTransactionFailedAsync( exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress), @@ -625,15 +625,15 @@ describe('Exchange core', () => { }); const newBalances = await erc20Wrapper.getBalancesAsync(); - const fillMakerAssetAmount = signedOrders[2].makerAssetAmount.add(signedOrders[3].makerAssetAmount); - const fillTakerAssetAmount = signedOrders[2].takerAssetAmount.add(signedOrders[3].takerAssetAmount); - const makerFee = signedOrders[2].makerFee.add(signedOrders[3].makerFee); - const takerFee = signedOrders[2].takerFee.add(signedOrders[3].takerFee); + const fillMakerAssetAmount = signedOrders[2].makerAssetAmount.plus(signedOrders[3].makerAssetAmount); + const fillTakerAssetAmount = signedOrders[2].takerAssetAmount.plus(signedOrders[3].takerAssetAmount); + const makerFee = signedOrders[2].makerFee.plus(signedOrders[3].makerFee); + const takerFee = signedOrders[2].takerFee.plus(signedOrders[3].takerFee); expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal( erc20Balances[makerAddress][defaultMakerAssetAddress].minus(fillMakerAssetAmount), ); expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal( - erc20Balances[makerAddress][defaultTakerAssetAddress].add(fillTakerAssetAmount), + erc20Balances[makerAddress][defaultTakerAssetAddress].plus(fillTakerAssetAmount), ); expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[makerAddress][zrxToken.address].minus(makerFee), @@ -642,13 +642,13 @@ describe('Exchange core', () => { erc20Balances[takerAddress][defaultTakerAssetAddress].minus(fillTakerAssetAmount), ); expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal( - erc20Balances[takerAddress][defaultMakerAssetAddress].add(fillMakerAssetAmount), + erc20Balances[takerAddress][defaultMakerAssetAddress].plus(fillMakerAssetAmount), ); expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[takerAddress][zrxToken.address].minus(takerFee), ); expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal( - erc20Balances[feeRecipientAddress][zrxToken.address].add(makerFee.add(takerFee)), + erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)), ); }); }); |