From b05a3b7aed9d2dcbc6ce4177eeb7db85675b7a96 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Tue, 22 May 2018 17:52:27 -0700 Subject: Check transaction receipt status codes where applicable --- packages/contract-wrappers/test/ether_token_wrapper_test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'packages/contract-wrappers/test/ether_token_wrapper_test.ts') diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts index e06fe96e5..a2154c2bd 100644 --- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts +++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts @@ -95,7 +95,7 @@ describe('EtherTokenWrapper', () => { depositWeiAmount, addressWithETH, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const postETHBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); const postWETHBalanceInBaseUnits = await contractWrappers.token.getBalanceAsync( @@ -137,7 +137,7 @@ describe('EtherTokenWrapper', () => { depositWeiAmount, addressWithETH, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const postETHBalance = await web3Wrapper.getBalanceInWeiAsync(addressWithETH); const postWETHBalanceInBaseUnits = await contractWrappers.token.getBalanceAsync( @@ -347,7 +347,7 @@ describe('EtherTokenWrapper', () => { }); it('should get logs with decoded args emitted by Approval', async () => { txHash = await contractWrappers.token.setUnlimitedProxyAllowanceAsync(etherTokenAddress, addressWithETH); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const eventName = EtherTokenEvents.Approval; const indexFilterValues = {}; const logs = await contractWrappers.etherToken.getLogsAsync( @@ -381,7 +381,7 @@ describe('EtherTokenWrapper', () => { }); it('should only get the logs with the correct event name', async () => { txHash = await contractWrappers.token.setUnlimitedProxyAllowanceAsync(etherTokenAddress, addressWithETH); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const differentEventName = EtherTokenEvents.Transfer; const indexFilterValues = {}; const logs = await contractWrappers.etherToken.getLogsAsync( @@ -394,12 +394,12 @@ describe('EtherTokenWrapper', () => { }); it('should only get the logs with the correct indexed fields', async () => { txHash = await contractWrappers.token.setUnlimitedProxyAllowanceAsync(etherTokenAddress, addressWithETH); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); txHash = await contractWrappers.token.setUnlimitedProxyAllowanceAsync( etherTokenAddress, addressWithoutFunds, ); - await web3Wrapper.awaitTransactionMinedAsync(txHash); + await web3Wrapper.awaitTransactionSuccessAsync(txHash); const eventName = EtherTokenEvents.Approval; const indexFilterValues = { _owner: addressWithETH, -- cgit