From d5d0aa1600e66751886ee51f34b034fbb8af2ded Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 20 Sep 2018 11:02:21 +0100 Subject: [PATCH 1/2] EmbarkJS blockchain must be done --- lib/modules/console/index.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/modules/console/index.js b/lib/modules/console/index.js index 95ec5967..d38a96d6 100644 --- a/lib/modules/console/index.js +++ b/lib/modules/console/index.js @@ -79,11 +79,12 @@ class Console { this.events.emit('runcode:register', 'Web3', Web3, false); this.events.emit('runcode:register', 'EmbarkJS', EmbarkJS, false); - this.events.once('code-generator-ready', () => { - if (this.ipc.connected) { - return; - } + EmbarkJS.Blockchain.done = true; + if (this.ipc.connected) { + return; + } + this.events.once('code-generator-ready', () => { this.events.request('code-generator:embarkjs:provider-code', (code) => { const func = () => {}; this.events.request('runcode:eval', code, func, true); From 09de3201a1b4becef58a3c765bff55b3779529fa Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Thu, 20 Sep 2018 11:49:05 +0100 Subject: [PATCH 2/2] Set default account back --- cmd/cmd_controller.js | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/cmd_controller.js b/cmd/cmd_controller.js index 646f9058..842303a3 100644 --- a/cmd/cmd_controller.js +++ b/cmd/cmd_controller.js @@ -314,6 +314,7 @@ class EmbarkController { web3Endpoint: web3Config.providerUrl }; const provider = new Provider(providerOptions); + web3.eth.defaultAccount = web3Config.defaultAccount; provider.startWeb3Provider(() => { engine.events.emit("runcode:register", "web3", web3); async.each(commands, ({varName, code}, next) => {