diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-05-23 08:52:27 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-05-24 06:09:17 +0800 |
commit | b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96 (patch) | |
tree | 8ab5d6d7cbe3834f91947518898aba0ecd764d8e /packages/contract-wrappers/test/exchange_wrapper_test.ts | |
parent | f6b81f588d98e09e7a5806902d94e2892d029481 (diff) | |
download | dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar.gz dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar.bz2 dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar.lz dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar.xz dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.tar.zst dexon-0x-contracts-b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96.zip |
Check transaction receipt status codes where applicable
Diffstat (limited to 'packages/contract-wrappers/test/exchange_wrapper_test.ts')
-rw-r--r-- | packages/contract-wrappers/test/exchange_wrapper_test.ts | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/packages/contract-wrappers/test/exchange_wrapper_test.ts b/packages/contract-wrappers/test/exchange_wrapper_test.ts index 99384e0fa..d35d2b819 100644 --- a/packages/contract-wrappers/test/exchange_wrapper_test.ts +++ b/packages/contract-wrappers/test/exchange_wrapper_test.ts @@ -276,7 +276,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); expect( await contractWrappers.token.getBalanceAsync(makerTokenAddress, makerAddress), ).to.be.bignumber.equal(fillableAmount.minus(takerTokenFillAmount)); @@ -305,7 +305,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); expect( await contractWrappers.token.getBalanceAsync(makerTokenAddress, makerAddress), ).to.be.bignumber.equal(fillableAmount.minus(partialFillAmount)); @@ -338,7 +338,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); expect( await contractWrappers.token.getBalanceAsync(zrxTokenAddress, feeRecipient), ).to.be.bignumber.equal(makerFee.plus(takerFee)); @@ -469,7 +469,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const filledAmount = await contractWrappers.exchange.getFilledTakerAmountAsync(signedOrderHashHex); const anotherFilledAmount = await contractWrappers.exchange.getFilledTakerAmountAsync( anotherOrderHashHex, @@ -595,7 +595,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const filledAmount = await contractWrappers.exchange.getFilledTakerAmountAsync(signedOrderHashHex); const anotherFilledAmount = await contractWrappers.exchange.getFilledTakerAmountAsync( anotherOrderHashHex, @@ -611,7 +611,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const filledAmount = await contractWrappers.exchange.getFilledTakerAmountAsync(signedOrderHashHex); const zeroAmount = await contractWrappers.exchange.getFilledTakerAmountAsync(anotherOrderHashHex); expect(filledAmount).to.be.bignumber.equal(fillableAmount); @@ -632,7 +632,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const filledAmount = await contractWrappers.exchange.getFilledTakerAmountAsync(signedOrderHashHex); const anotherFilledAmount = await contractWrappers.exchange.getFilledTakerAmountAsync( anotherOrderHashHex, @@ -730,7 +730,7 @@ describe('ExchangeWrapper', () => { describe('successful cancels', () => { it('should cancel an order', async () => { const txHash = await contractWrappers.exchange.cancelOrderAsync(signedOrder, cancelAmount); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const cancelledAmount = await contractWrappers.exchange.getCancelledTakerAmountAsync(orderHashHex); expect(cancelledAmount).to.be.bignumber.equal(cancelAmount); }); @@ -1112,7 +1112,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const eventName = ExchangeEvents.LogFill; const indexFilterValues = {}; const logs = await contractWrappers.exchange.getLogsAsync(eventName, blockRange, indexFilterValues); @@ -1133,7 +1133,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const differentEventName = ExchangeEvents.LogCancel; const indexFilterValues = {}; const logs = await contractWrappers.exchange.getLogsAsync( @@ -1157,7 +1157,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const differentMakerAddress = userAddresses[2]; const anotherSignedOrder = await fillScenarios.createFillableSignedOrderAsync( @@ -1173,7 +1173,7 @@ describe('ExchangeWrapper', () => { shouldThrowOnInsufficientBalanceOrAllowance, takerAddress, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const eventName = ExchangeEvents.LogFill; const indexFilterValues = { |