mirror of https://github.com/status-im/web3.js.git
common fixes in examples
This commit is contained in:
parent
f1f30d04ed
commit
7b161b4ca4
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue