fixed contract.new examples

This commit is contained in:
Fabian Vogelsteller
2015-07-20 16:44:25 +02:00
parent f649befa6d
commit ce52fcf080
3 changed files with 28 additions and 17 deletions
+9 -5
View File
@@ -37,12 +37,16 @@
if (err) {
console.error(err);
return;
}
myContract = contract;
console.log('address: ' + myContract.address);
document.getElementById('status').innerText = 'Mined!';
document.getElementById('call').style.visibility = 'visible';
// callback fires twice, we only want the second call when the contract is deployed
} else if(contract.address){
myContract = contract;
console.log('address: ' + myContract.address);
document.getElementById('status').innerText = 'Mined!';
document.getElementById('call').style.visibility = 'visible';
}
});
}