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(); data = data.toString();
if (self.onReadyCallback && !self.readyCalled && data.indexOf('WebSocket endpoint opened') > -1) { if (self.onReadyCallback && !self.readyCalled && data.indexOf('WebSocket endpoint opened') > -1) {
if (self.isDev) { if (self.isDev) {
return self.createFundAndUnlockAccounts((err) => { self.createFundAndUnlockAccounts((err) => {
if(err) console.error('Error creating, unlocking, and funding accounts', err); if(err) console.error('Error creating, unlocking, and funding accounts', err);
self.readyCalled = true; //self.readyCalled = true;
self.onReadyCallback(); //self.onReadyCallback();
}); });
} }
self.readyCalled = true; self.readyCalled = true;

View File

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