Merge pull request #20 from embark-framework/bugfix/onReady
Fix showing the indicator
This commit is contained in:
commit
848238dc80
|
@ -108,7 +108,9 @@ let Contract = function (options) {
|
||||||
let originalMethods = Object.keys(ContractClass);
|
let originalMethods = Object.keys(ContractClass);
|
||||||
|
|
||||||
Blockchain.execWhenReady(function() {
|
Blockchain.execWhenReady(function() {
|
||||||
|
if(!ContractClass.currentProvider){
|
||||||
ContractClass.setProvider(web3.currentProvider);
|
ContractClass.setProvider(web3.currentProvider);
|
||||||
|
}
|
||||||
ContractClass.options.from = web3.eth.defaultAccount;
|
ContractClass.options.from = web3.eth.defaultAccount;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -6,10 +6,8 @@ import Utils from './utils';
|
||||||
|
|
||||||
var EmbarkJS = {
|
var EmbarkJS = {
|
||||||
onReady: function (cb) {
|
onReady: function (cb) {
|
||||||
if (this.Blockchain.done) {
|
Blockchain.execWhenReady(cb)
|
||||||
return cb();
|
Blockchain.finalCb = function() {
|
||||||
}
|
|
||||||
this.Blockchain.finalCb = function() {
|
|
||||||
cb();
|
cb();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue