diff options
author | Dan Miller <danjm.com@gmail.com> | 2018-08-14 23:04:39 +0800 |
---|---|---|
committer | Dan Miller <danjm.com@gmail.com> | 2018-08-14 23:05:50 +0800 |
commit | 860bf423469fce4d661d48055769fc93a54496c3 (patch) | |
tree | 5134cc7ea5d4dd08049d620d302d97834329119c /test | |
parent | c00d0daeb528598e0f49484718fb7e91c40a1127 (diff) | |
download | tangerine-wallet-browser-860bf423469fce4d661d48055769fc93a54496c3.tar tangerine-wallet-browser-860bf423469fce4d661d48055769fc93a54496c3.tar.gz tangerine-wallet-browser-860bf423469fce4d661d48055769fc93a54496c3.tar.bz2 tangerine-wallet-browser-860bf423469fce4d661d48055769fc93a54496c3.tar.lz tangerine-wallet-browser-860bf423469fce4d661d48055769fc93a54496c3.tar.xz tangerine-wallet-browser-860bf423469fce4d661d48055769fc93a54496c3.tar.zst tangerine-wallet-browser-860bf423469fce4d661d48055769fc93a54496c3.zip |
Make deployment states in test/e2e/beta/contract-test/contract.js more explicit
Diffstat (limited to 'test')
-rw-r--r-- | test/e2e/beta/contract-test/contract.js | 9 | ||||
-rw-r--r-- | test/e2e/beta/contract-test/index.html | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/test/e2e/beta/contract-test/contract.js b/test/e2e/beta/contract-test/contract.js index 51891ea21..bb38438a8 100644 --- a/test/e2e/beta/contract-test/contract.js +++ b/test/e2e/beta/contract-test/contract.js @@ -38,18 +38,19 @@ const transferTokens = document.getElementById('transferTokens') const approveTokens = document.getElementById('approveTokens') deployButton.addEventListener('click', async function (event) { + document.getElementById('contractStatus').innerHTML = 'Deploying' + var piggybank = await piggybankContract.new( { from: web3.eth.accounts[0], data: '0x608060405234801561001057600080fd5b5033600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000808190555061023b806100686000396000f300608060405260043610610057576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e1a7d4d1461005c5780638da5cb5b1461009d578063d0e30db0146100f4575b600080fd5b34801561006857600080fd5b5061008760048036038101908080359060200190929190505050610112565b6040518082815260200191505060405180910390f35b3480156100a957600080fd5b506100b26101d0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6100fc6101f6565b6040518082815260200191505060405180910390f35b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561017057600080fd5b8160008082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156101c5573d6000803e3d6000fd5b506000549050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60003460008082825401925050819055506000549050905600a165627a7a72305820f237db3ec816a52589d82512117bc85bc08d3537683ffeff9059108caf3e5d400029', gas: '4700000', }, function (e, contract) { - console.log(e, contract) - if (typeof contract.address !== 'undefined') { + if (e) { + throw e + } else if (typeof contract.address !== 'undefined') { console.log('Contract mined! address: ' + contract.address + ' transactionHash: ' + contract.transactionHash) - console.log(`contract`, contract) - document.getElementById('contractStatus').innerHTML = 'Deployed' depositButton.addEventListener('click', function (event) { diff --git a/test/e2e/beta/contract-test/index.html b/test/e2e/beta/contract-test/index.html index f6e6f44c7..0d422ef20 100644 --- a/test/e2e/beta/contract-test/index.html +++ b/test/e2e/beta/contract-test/index.html @@ -11,7 +11,7 @@ <button id="withdrawButton">Withdraw</button> </div> <div id="contractStatus" style="display: flex; font-size: 1rem;"> - Not yet deployed + Not clicked </div> </div> <div style="display: flex; flex-flow: column;"> |