Merge pull request #20 from embark-framework/bugfix/onReady

Fix showing the indicator
This commit is contained in:
Iuri Matias 2018-09-07 18:45:56 -04:00 committed by GitHub
commit 848238dc80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -108,7 +108,9 @@ let Contract = function (options) {
let originalMethods = Object.keys(ContractClass);
Blockchain.execWhenReady(function() {
if(!ContractClass.currentProvider){
ContractClass.setProvider(web3.currentProvider);
}
ContractClass.options.from = web3.eth.defaultAccount;
});

View File

@ -6,10 +6,8 @@ import Utils from './utils';
var EmbarkJS = {
onReady: function (cb) {
if (this.Blockchain.done) {
return cb();
}
this.Blockchain.finalCb = function() {
Blockchain.execWhenReady(cb)
Blockchain.finalCb = function() {
cb();
}
}