diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-05-24 09:12:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-24 09:12:41 +0800 |
commit | 2f7ab3e32d1c54f42c435503426bc421fa89afd8 (patch) | |
tree | dfa0fb838fb4b1bdb36a45eaa820351bfaf1f04f /packages/contract-wrappers/test/exchange_wrapper_test.ts | |
parent | 2f1a4042bf924cf5d07d724d5d1a1c0a2c181f4f (diff) | |
parent | f6f2818a02d0ef1880f6e4391840659cc8dc2395 (diff) | |
download | dexon-0x-contracts-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar dexon-0x-contracts-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.gz dexon-0x-contracts-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.bz2 dexon-0x-contracts-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.lz dexon-0x-contracts-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.xz dexon-0x-contracts-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.zst dexon-0x-contracts-2f7ab3e32d1c54f42c435503426bc421fa89afd8.zip |
Merge pull request #613 from 0xProject/check-tx-receipt-status
Check transaction receipt status
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 = { |