mirror of https://github.com/embarklabs/embark.git
emit contractsDeployed event only
This commit is contained in:
parent
68e6782f49
commit
1d782c0e53
|
@ -1,9 +1,5 @@
|
|||
let async = require('async');
|
||||
|
||||
// TODO: remove contractsManager dependency
|
||||
// * use events
|
||||
// * in the engine use the instance instead
|
||||
|
||||
class DeployManager {
|
||||
constructor(options) {
|
||||
const self = this;
|
||||
|
@ -76,7 +72,7 @@ class DeployManager {
|
|||
// TODO: shouldn't be necessary
|
||||
function checkCompileOnly(callback){
|
||||
if(self.onlyCompile){
|
||||
self.events.emit('contractsDeployed', self.contractsManager);
|
||||
self.events.emit('contractsDeployed');
|
||||
return done();
|
||||
}
|
||||
return callback();
|
||||
|
@ -101,7 +97,7 @@ class DeployManager {
|
|||
function deployAllContracts(callback) {
|
||||
self.deployAll(function (err) {
|
||||
if (!err) {
|
||||
self.events.emit('contractsDeployed', self.contractsManager);
|
||||
self.events.emit('contractsDeployed');
|
||||
}
|
||||
if (err && self.fatalErrors) {
|
||||
return callback(err);
|
||||
|
|
|
@ -189,8 +189,8 @@ class Engine {
|
|||
generateCode(tasks[tasks.length - 1].contractsManager);
|
||||
self.events.once('outputDone', callback);
|
||||
});
|
||||
const addToCargo = function (contractsManager) {
|
||||
cargo.push({contractsManager});
|
||||
const addToCargo = function () {
|
||||
cargo.push({contractsManager: self.contractsManager});
|
||||
};
|
||||
|
||||
this.events.on('contractsDeployed', addToCargo);
|
||||
|
|
Loading…
Reference in New Issue