diff --git a/cmd/dashboard/console.js b/cmd/dashboard/console.js index 8caaa3d0b..793993012 100644 --- a/cmd/dashboard/console.js +++ b/cmd/dashboard/console.js @@ -56,7 +56,7 @@ class Console { } try { - this.events.request('runcode:eval', cmd, callback, true); + this.events.request('runcode:eval', cmd, callback); } catch (e) { if (this.ipc.connected && this.ipc.isClient()) { diff --git a/lib/core/modules/coderunner/codeRunner.js b/lib/core/modules/coderunner/codeRunner.js index f5075aa2a..080669aad 100644 --- a/lib/core/modules/coderunner/codeRunner.js +++ b/lib/core/modules/coderunner/codeRunner.js @@ -37,12 +37,12 @@ class CodeRunner { RunCode.registerVar(varName, code); }); - this.events.setCommandHandler('runcode:eval', (code, cb, dashboard = false) => { + this.events.setCommandHandler('runcode:eval', (code, cb, saveForConsole = false) => { if (!cb) { cb = function() {}; } let result = RunCode.doEval(code); - if (!dashboard && self.ipc.isServer()) { + if (saveForConsole && self.ipc.isServer()) { self.commands.push({code}); self.ipc.broadcast("runcode:newCommand", {code}); } diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index 7c83bb6ae..635aaaa49 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -171,7 +171,7 @@ class ContractDeployer { // TODO: can be moved into a afterDeploy event // just need to figure out the gasLimit coupling issue self.events.request('code-generator:contract:vanilla', contract, contract._gasLimit, (contractCode) => { - self.events.request('runcode:eval', contractCode); + self.events.request('runcode:eval', contractCode, () => {}, true); return callback(); }); } @@ -274,7 +274,7 @@ class ContractDeployer { // TODO: can be moved into a afterDeploy event // just need to figure out the gasLimit coupling issue self.events.request('code-generator:contract:vanilla', contract, contract._gasLimit, (contractCode) => { - self.events.request('runcode:eval', contractCode); + self.events.request('runcode:eval', contractCode, () => {}, true); self.plugins.runActionsForEvent('deploy:contract:deployed', {contract: contract}, () => { return next(null, receipt); });