common fixes in examples

This commit is contained in:
Marek Kotewicz 2015-07-07 11:58:42 +02:00
parent f1f30d04ed
commit 7b161b4ca4
3 changed files with 3 additions and 5 deletions

View File

@ -37,7 +37,7 @@
document.getElementById('status').innerText = "transaction sent, waiting for confirmation"; document.getElementById('status').innerText = "transaction sent, waiting for confirmation";
web3.eth.contract(abi).new({data: code}, function (err, contract) { web3.eth.contract(abi).new({data: code}, function (err, contract) {
if (err) { if (err) {
console.error('contract creation failed!'); console.error(err);
return; return;
} }
myContract = contract; myContract = contract;

View File

@ -37,7 +37,7 @@
document.getElementById('status').innerText = "transaction sent, waiting for confirmation"; document.getElementById('status').innerText = "transaction sent, waiting for confirmation";
web3.eth.contract(abi).new({data: code}, function (err, contract) { web3.eth.contract(abi).new({data: code}, function (err, contract) {
if (err) { if (err) {
console.error('contract creation failed!'); console.error(err);
return; return;
} }
myContract = contract; myContract = contract;

View File

@ -35,14 +35,12 @@
// let's assume that we have a private key to coinbase ;) // let's assume that we have a private key to coinbase ;)
web3.eth.defaultAccount = web3.eth.coinbase; web3.eth.defaultAccount = web3.eth.coinbase;
var watch = web3.eth.filter('latest');
document.getElementById('create').style.visibility = 'hidden'; document.getElementById('create').style.visibility = 'hidden';
document.getElementById('status').innerText = "transaction sent, waiting for confirmation"; document.getElementById('status').innerText = "transaction sent, waiting for confirmation";
web3.eth.contract(abi).new({data: code}, function (err, c) { web3.eth.contract(abi).new({data: code}, function (err, c) {
if (err) { if (err) {
console.error('contract creation failed!'); console.error(err);
return; return;
} }