don't return a contract from the chains.json if it has no address

This commit is contained in:
Iuri Matias 2016-10-20 23:21:32 -04:00
parent f9c4b5f996
commit bf509e8b27
1 changed files with 3 additions and 1 deletions

View File

@ -40,7 +40,9 @@ DeployTracker.prototype.trackContract = function(contractName, code, args, addre
}; };
DeployTracker.prototype.getContract = function(contractName, code, args) { DeployTracker.prototype.getContract = function(contractName, code, args) {
return this.currentChain.contracts[this.web3.sha3(code + contractName + args.join(','))]; var contract = this.currentChain.contracts[this.web3.sha3(code + contractName + args.join(','))];
if (contract && contract.address === undefined) { return false; }
return contract;
}; };
// TODO: abstract this // TODO: abstract this