mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-02-23 12:38:18 +00:00
Console via IPC do not run on deploy
This commit is contained in:
parent
a59cc29d39
commit
a7b0cea09b
@ -56,7 +56,7 @@ class Console {
|
|||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
this.events.request('runcode:eval', cmd, callback, true);
|
this.events.request('runcode:eval', cmd, callback);
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (this.ipc.connected && this.ipc.isClient()) {
|
if (this.ipc.connected && this.ipc.isClient()) {
|
||||||
|
@ -37,12 +37,12 @@ class CodeRunner {
|
|||||||
RunCode.registerVar(varName, code);
|
RunCode.registerVar(varName, code);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.events.setCommandHandler('runcode:eval', (code, cb, dashboard = false) => {
|
this.events.setCommandHandler('runcode:eval', (code, cb, saveForConsole = false) => {
|
||||||
if (!cb) {
|
if (!cb) {
|
||||||
cb = function() {};
|
cb = function() {};
|
||||||
}
|
}
|
||||||
let result = RunCode.doEval(code);
|
let result = RunCode.doEval(code);
|
||||||
if (!dashboard && self.ipc.isServer()) {
|
if (saveForConsole && self.ipc.isServer()) {
|
||||||
self.commands.push({code});
|
self.commands.push({code});
|
||||||
self.ipc.broadcast("runcode:newCommand", {code});
|
self.ipc.broadcast("runcode:newCommand", {code});
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ class ContractDeployer {
|
|||||||
// TODO: can be moved into a afterDeploy event
|
// TODO: can be moved into a afterDeploy event
|
||||||
// just need to figure out the gasLimit coupling issue
|
// just need to figure out the gasLimit coupling issue
|
||||||
self.events.request('code-generator:contract:vanilla', contract, contract._gasLimit, (contractCode) => {
|
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();
|
return callback();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -274,7 +274,7 @@ class ContractDeployer {
|
|||||||
// TODO: can be moved into a afterDeploy event
|
// TODO: can be moved into a afterDeploy event
|
||||||
// just need to figure out the gasLimit coupling issue
|
// just need to figure out the gasLimit coupling issue
|
||||||
self.events.request('code-generator:contract:vanilla', contract, contract._gasLimit, (contractCode) => {
|
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}, () => {
|
self.plugins.runActionsForEvent('deploy:contract:deployed', {contract: contract}, () => {
|
||||||
return next(null, receipt);
|
return next(null, receipt);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user