mirror of https://github.com/embarklabs/embark.git
Console via IPC do not run on deploy
This commit is contained in:
parent
a59cc29d39
commit
a7b0cea09b
|
@ -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()) {
|
||||
|
|
|
@ -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});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue