diff options
author | Alex Browne <stephenalexbrowne@gmail.com> | 2018-05-31 02:10:30 +0800 |
---|---|---|
committer | Alex Browne <stephenalexbrowne@gmail.com> | 2018-05-31 02:10:30 +0800 |
commit | 064608a8ef5c332e09fefaadd3b4c1155d4853c9 (patch) | |
tree | 8c6733a17294718756564e9becf488e727bc3fdb /packages/contracts/test/ether_token.ts | |
parent | b20e40dd6fd9964876a0006efe8b879a9a1d2118 (diff) | |
download | dexon-sol-tools-064608a8ef5c332e09fefaadd3b4c1155d4853c9.tar dexon-sol-tools-064608a8ef5c332e09fefaadd3b4c1155d4853c9.tar.gz dexon-sol-tools-064608a8ef5c332e09fefaadd3b4c1155d4853c9.tar.bz2 dexon-sol-tools-064608a8ef5c332e09fefaadd3b4c1155d4853c9.tar.lz dexon-sol-tools-064608a8ef5c332e09fefaadd3b4c1155d4853c9.tar.xz dexon-sol-tools-064608a8ef5c332e09fefaadd3b4c1155d4853c9.tar.zst dexon-sol-tools-064608a8ef5c332e09fefaadd3b4c1155d4853c9.zip |
Add awaitTransactionSuccess where needed
Diffstat (limited to 'packages/contracts/test/ether_token.ts')
-rw-r--r-- | packages/contracts/test/ether_token.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/contracts/test/ether_token.ts b/packages/contracts/test/ether_token.ts index 10dd635fe..4e52b658f 100644 --- a/packages/contracts/test/ether_token.ts +++ b/packages/contracts/test/ether_token.ts @@ -83,7 +83,10 @@ describe('EtherToken', () => { it('should convert ether tokens to ether with sufficient balance', async () => { const ethToDeposit = new BigNumber(Web3Wrapper.toWei(new BigNumber(1))); - await etherToken.deposit.sendTransactionAsync({ value: ethToDeposit }); + await web3Wrapper.awaitTransactionSuccessAsync( + await etherToken.deposit.sendTransactionAsync({ value: ethToDeposit }), + constants.AWAIT_TRANSACTION_MINED_MS, + ); const initEthTokenBalance = await etherToken.balanceOf.callAsync(account); const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account); const ethTokensToWithdraw = initEthTokenBalance; |