aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/ether_token.ts
diff options
context:
space:
mode:
authorAlex Browne <stephenalexbrowne@gmail.com>2018-05-24 09:12:41 +0800
committerGitHub <noreply@github.com>2018-05-24 09:12:41 +0800
commit2f7ab3e32d1c54f42c435503426bc421fa89afd8 (patch)
treedfa0fb838fb4b1bdb36a45eaa820351bfaf1f04f /packages/contracts/test/ether_token.ts
parent2f1a4042bf924cf5d07d724d5d1a1c0a2c181f4f (diff)
parentf6f2818a02d0ef1880f6e4391840659cc8dc2395 (diff)
downloaddexon-sol-tools-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar
dexon-sol-tools-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.gz
dexon-sol-tools-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.bz2
dexon-sol-tools-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.lz
dexon-sol-tools-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.xz
dexon-sol-tools-2f7ab3e32d1c54f42c435503426bc421fa89afd8.tar.zst
dexon-sol-tools-2f7ab3e32d1c54f42c435503426bc421fa89afd8.zip
Merge pull request #613 from 0xProject/check-tx-receipt-status
Check transaction receipt status
Diffstat (limited to 'packages/contracts/test/ether_token.ts')
-rw-r--r--packages/contracts/test/ether_token.ts15
1 files changed, 12 insertions, 3 deletions
diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts
index 9b04dd187..5c8a5e199 100644
--- a/packages/contracts/test/ether_token.ts
+++ b/packages/contracts/test/ether_token.ts
@@ -61,7 +61,10 @@ describe('EtherToken', () => {
const ethToDeposit = new BigNumber(Web3Wrapper.toWei(new BigNumber(1)));
const txHash = await contractWrappers.etherToken.depositAsync(etherTokenAddress, ethToDeposit, account);
- const receipt = await web3Wrapper.awaitTransactionMinedAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
+ const receipt = await web3Wrapper.awaitTransactionSuccessAsync(
+ txHash,
+ constants.AWAIT_TRANSACTION_MINED_MS,
+ );
const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
const finalEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
@@ -97,7 +100,10 @@ describe('EtherToken', () => {
gasLimit: constants.MAX_ETHERTOKEN_WITHDRAW_GAS,
},
);
- const receipt = await web3Wrapper.awaitTransactionMinedAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
+ const receipt = await web3Wrapper.awaitTransactionSuccessAsync(
+ txHash,
+ constants.AWAIT_TRANSACTION_MINED_MS,
+ );
const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
const finalEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
@@ -124,7 +130,10 @@ describe('EtherToken', () => {
gasPrice,
});
- const receipt = await web3Wrapper.awaitTransactionMinedAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
+ const receipt = await web3Wrapper.awaitTransactionSuccessAsync(
+ txHash,
+ constants.AWAIT_TRANSACTION_MINED_MS,
+ );
const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
const finalEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);