mirror of
https://github.com/embarklabs/web3.js.git
synced 2026-08-31 06:31:19 +00:00
fixed contract.new examples
This commit is contained in:
@@ -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';
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user