if the contract is set to not deploy, display information correctly on the dashboard

This commit is contained in:
Iuri Matias 2016-10-20 23:31:42 -04:00
parent 727e2d0923
commit f747c757c5
2 changed files with 22 additions and 5 deletions

View File

@ -177,11 +177,23 @@ ContractsManager.prototype.contractsState = function() {
for(var className in this.contracts) {
var contract = this.contracts[className];
data.push([
className.green,
(contract.deployedAddress || '...').green,
((contract.deployedAddress !== undefined) ? "\t\tDeployed".green : "\t\tPending".magenta)
]);
var contractData;
if (contract.deploy === false) {
contractData = [
className.green,
'Interface or set to not deploy'.green,
"n/a".green
]
} else {
contractData = [
className.green,
(contract.deployedAddress || '...').green,
((contract.deployedAddress !== undefined) ? "\t\tDeployed".green : "\t\tPending".magenta)
]
}
data.push(contractData);
}
return data;

View File

@ -18,6 +18,11 @@ var Deploy = function(options) {
Deploy.prototype.checkAndDeployContract = function(contract, params, callback) {
var self = this;
if (contract.deploy === false) {
self.logger.contractsState(self.contractsManager.contractsState());
return callback();
}
if (contract.address !== undefined) {
// determine arguments