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/exchange/transactions.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/exchange/transactions.ts')
-rw-r--r-- | contracts/protocol/test/exchange/transactions.ts | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/contracts/protocol/test/exchange/transactions.ts b/contracts/protocol/test/exchange/transactions.ts index 746f3cb04..e8c775f3e 100644 --- a/contracts/protocol/test/exchange/transactions.ts +++ b/contracts/protocol/test/exchange/transactions.ts @@ -160,7 +160,7 @@ describe('Exchange transactions', () => { erc20Balances[makerAddress][defaultMakerTokenAddress].minus(makerAssetFillAmount), ); expect(newBalances[makerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal( - erc20Balances[makerAddress][defaultTakerTokenAddress].add(takerAssetFillAmount), + erc20Balances[makerAddress][defaultTakerTokenAddress].plus(takerAssetFillAmount), ); expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[makerAddress][zrxToken.address].minus(makerFeePaid), @@ -169,13 +169,13 @@ describe('Exchange transactions', () => { erc20Balances[takerAddress][defaultTakerTokenAddress].minus(takerAssetFillAmount), ); expect(newBalances[takerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal( - erc20Balances[takerAddress][defaultMakerTokenAddress].add(makerAssetFillAmount), + erc20Balances[takerAddress][defaultMakerTokenAddress].plus(makerAssetFillAmount), ); expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[takerAddress][zrxToken.address].minus(takerFeePaid), ); expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal( - erc20Balances[feeRecipientAddress][zrxToken.address].add(makerFeePaid.add(takerFeePaid)), + erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)), ); }); @@ -234,7 +234,7 @@ describe('Exchange transactions', () => { senderAddress: exchangeWrapperContract.address, salt: orderSalt, }); - const targetOrderEpoch = orderSalt.add(1); + const targetOrderEpoch = orderSalt.plus(1); const cancelData = exchange.cancelOrdersUpTo.getABIEncodedTransactionData(targetOrderEpoch); const signedCancelTx = makerTransactionFactory.newSignedTransaction(cancelData); await exchangeWrapperContract.cancelOrdersUpTo.sendTransactionAsync( @@ -273,7 +273,7 @@ describe('Exchange transactions', () => { senderAddress: exchangeWrapperContract.address, salt: orderSalt, }); - const targetOrderEpoch = orderSalt.add(1); + const targetOrderEpoch = orderSalt.plus(1); await exchangeWrapper.cancelOrdersUpToAsync(targetOrderEpoch, makerAddress); erc20Balances = await erc20Wrapper.getBalancesAsync(); @@ -308,7 +308,7 @@ describe('Exchange transactions', () => { erc20Balances[makerAddress][defaultMakerTokenAddress].minus(makerAssetFillAmount), ); expect(newBalances[makerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal( - erc20Balances[makerAddress][defaultTakerTokenAddress].add(takerAssetFillAmount), + erc20Balances[makerAddress][defaultTakerTokenAddress].plus(takerAssetFillAmount), ); expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[makerAddress][zrxToken.address].minus(makerFeePaid), @@ -317,13 +317,13 @@ describe('Exchange transactions', () => { erc20Balances[takerAddress][defaultTakerTokenAddress].minus(takerAssetFillAmount), ); expect(newBalances[takerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal( - erc20Balances[takerAddress][defaultMakerTokenAddress].add(makerAssetFillAmount), + erc20Balances[takerAddress][defaultMakerTokenAddress].plus(makerAssetFillAmount), ); expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[takerAddress][zrxToken.address].minus(takerFeePaid), ); expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal( - erc20Balances[feeRecipientAddress][zrxToken.address].add(makerFeePaid.add(takerFeePaid)), + erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)), ); }); }); @@ -444,7 +444,7 @@ describe('Exchange transactions', () => { erc20Balances[makerAddress][defaultMakerTokenAddress].minus(makerAssetFillAmount), ); expect(newBalances[makerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal( - erc20Balances[makerAddress][defaultTakerTokenAddress].add(takerAssetFillAmount), + erc20Balances[makerAddress][defaultTakerTokenAddress].plus(takerAssetFillAmount), ); expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[makerAddress][zrxToken.address].minus(makerFeePaid), @@ -453,13 +453,13 @@ describe('Exchange transactions', () => { erc20Balances[takerAddress][defaultTakerTokenAddress].minus(takerAssetFillAmount), ); expect(newBalances[takerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal( - erc20Balances[takerAddress][defaultMakerTokenAddress].add(makerAssetFillAmount), + erc20Balances[takerAddress][defaultMakerTokenAddress].plus(makerAssetFillAmount), ); expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal( erc20Balances[takerAddress][zrxToken.address].minus(takerFeePaid), ); expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal( - erc20Balances[feeRecipientAddress][zrxToken.address].add(makerFeePaid.add(takerFeePaid)), + erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)), ); }); }); |