From 236f6e63e2c9ffe48f567833f849db6e1d11bd8e Mon Sep 17 00:00:00 2001 From: emizzle Date: Mon, 11 Mar 2019 13:59:02 +1100 Subject: [PATCH] fix(@embark/core): Re-enable regular txs commands/api https://github.com/embark-framework/embark/pull/1367 introduced a change that prevented the `blockchain_listener` from listening to logs until the IPC server connected. However, the restriction went too far, and included restricting registration of console commands and API endpoints for the regular transactions feature. This fix reverts the changes that affect registration of regular txs endpoints and console commands. --- packages/embark/src/lib/modules/blockchain_listener/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/embark/src/lib/modules/blockchain_listener/index.js b/packages/embark/src/lib/modules/blockchain_listener/index.js index a37271b40..de662e00d 100644 --- a/packages/embark/src/lib/modules/blockchain_listener/index.js +++ b/packages/embark/src/lib/modules/blockchain_listener/index.js @@ -26,10 +26,12 @@ class BlockchainListener { this.ipc.server.once('connect', () => { this.processLogsApi = new ProcessLogsApi({embark: this.embark, processName: PROCESS_NAME, silent: true}); this._listenToBlockchainLogs(); + }); + if (this.ipc.isServer()) { this._listenToCommands(); this._registerConsoleCommands(); this._registerApiEndpoint(); - }); + } } /**