aboutsummaryrefslogtreecommitdiffstats
path: root/test/ether_token_wrapper_test.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 16:07:16 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-09-05 16:07:16 +0800
commit2b547f94a44dfed029b5559b743344d5998fa3bc (patch)
tree3c5241ba9cadcfad6ee0290b497ed6780cc9fc8b /test/ether_token_wrapper_test.ts
parentc9e490bdaec53e3a93b5da8daaaf0b1d87d9de76 (diff)
downloaddexon-sol-tools-2b547f94a44dfed029b5559b743344d5998fa3bc.tar
dexon-sol-tools-2b547f94a44dfed029b5559b743344d5998fa3bc.tar.gz
dexon-sol-tools-2b547f94a44dfed029b5559b743344d5998fa3bc.tar.bz2
dexon-sol-tools-2b547f94a44dfed029b5559b743344d5998fa3bc.tar.lz
dexon-sol-tools-2b547f94a44dfed029b5559b743344d5998fa3bc.tar.xz
dexon-sol-tools-2b547f94a44dfed029b5559b743344d5998fa3bc.tar.zst
dexon-sol-tools-2b547f94a44dfed029b5559b743344d5998fa3bc.zip
Change non-exhange contracts to also return txHash
Diffstat (limited to 'test/ether_token_wrapper_test.ts')
-rw-r--r--test/ether_token_wrapper_test.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/ether_token_wrapper_test.ts b/test/ether_token_wrapper_test.ts
index 601800cd1..f50aac48b 100644
--- a/test/ether_token_wrapper_test.ts
+++ b/test/ether_token_wrapper_test.ts
@@ -52,7 +52,8 @@ describe('EtherTokenWrapper', () => {
expect(preETHBalance).to.be.bignumber.gt(0);
expect(preWETHBalance).to.be.bignumber.equal(0);
- await zeroEx.etherToken.depositAsync(depositWeiAmount, addressWithETH);
+ const txHash = await zeroEx.etherToken.depositAsync(depositWeiAmount, addressWithETH);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const postETHBalanceInWei = await (zeroEx as any)._web3Wrapper.getBalanceInWeiAsync(addressWithETH);
const postWETHBalanceInBaseUnits = await zeroEx.token.getBalanceAsync(wethContractAddress, addressWithETH);
@@ -86,7 +87,8 @@ describe('EtherTokenWrapper', () => {
expect(gasCost).to.be.bignumber.lte(MAX_REASONABLE_GAS_COST_IN_WEI);
expect(preWETHBalance).to.be.bignumber.equal(depositWeiAmount);
- await zeroEx.etherToken.withdrawAsync(depositWeiAmount, addressWithETH);
+ const txHash = await zeroEx.etherToken.withdrawAsync(depositWeiAmount, addressWithETH);
+ await zeroEx.awaitTransactionMinedAsync(txHash);
const postETHBalance = await (zeroEx as any)._web3Wrapper.getBalanceInWeiAsync(addressWithETH);
const postWETHBalanceInBaseUnits = await zeroEx.token.getBalanceAsync(wethContractAddress, addressWithETH);