From 860bf423469fce4d661d48055769fc93a54496c3 Mon Sep 17 00:00:00 2001 From: Dan Miller Date: Tue, 14 Aug 2018 12:34:39 -0230 Subject: Make deployment states in test/e2e/beta/contract-test/contract.js more explicit --- test/e2e/beta/contract-test/contract.js | 9 +++++---- test/e2e/beta/contract-test/index.html | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) (limited to 'test/e2e/beta/contract-test') 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 @@
- Not yet deployed + Not clicked
-- cgit