don't wait for account funds

This commit is contained in:
Iuri Matias 2018-07-17 17:30:23 +03:00
parent 231199c0dc
commit 91f1748d60
2 changed files with 4 additions and 3 deletions

View File

@ -164,10 +164,10 @@ Blockchain.prototype.run = function() {
data = data.toString();
if (self.onReadyCallback && !self.readyCalled && data.indexOf('WebSocket endpoint opened') > -1) {
if (self.isDev) {
return self.createFundAndUnlockAccounts((err) => {
self.createFundAndUnlockAccounts((err) => {
if(err) console.error('Error creating, unlocking, and funding accounts', err);
self.readyCalled = true;
self.onReadyCallback();
//self.readyCalled = true;
//self.onReadyCallback();
});
}
self.readyCalled = true;

View File

@ -92,6 +92,7 @@ class Blockchain {
},
function fundAccountsIfNeeded(next) {
console.dir('[blockchain/contracts]: funding accounts');
self.isWeb3Ready = true;
provider.fundAccounts(next);
}
], (err) => {