Merge pull request #850 from embark-framework/bug_fix/re-add-dev_funds-calling-code

Adding back calling code block for dev_funds
This commit is contained in:
Iuri Matias 2018-09-17 14:12:25 -04:00 committed by GitHub
commit cc8649aa95
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -180,6 +180,12 @@ Blockchain.prototype.run = function() {
self.child.stderr.on('data', (data) => {
data = data.toString();
if (!self.readyCalled && data.indexOf('WebSocket endpoint opened') > -1) {
if (self.isDev) {
self.createFundAndUnlockAccounts((err) => {
// TODO: this is never called!
if(err) console.error('Error creating, unlocking, and funding accounts', err);
});
}
self.readyCalled = true;
self.readyCallback();
}