From 9151466a752d61acb45e8a5083aae3221eafb63b Mon Sep 17 00:00:00 2001 From: Andre Medeiros Date: Tue, 18 Sep 2018 16:36:21 -0400 Subject: [PATCH] Simplify code --- lib/modules/deployment/contract_deployer.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/lib/modules/deployment/contract_deployer.js b/lib/modules/deployment/contract_deployer.js index adff4735..fe41b313 100644 --- a/lib/modules/deployment/contract_deployer.js +++ b/lib/modules/deployment/contract_deployer.js @@ -44,13 +44,9 @@ class ContractDeployer { } let contractName = arg.substr(1); self.events.request('contracts:contract', contractName, (referedContract) => { - if(referedContract.deployedAddress !== undefined) { - return cb(null, referedContract.deployedAddress); - } - // Because we're referring to a contract that is not being deployed (ie. an interface), // we still need to provide a valid address so that the ABI checker won't fail. - cb(null, '0x0000000000000000000000000000000000000000'); + cb(null, (referedContract.deployedAddress || '0x0000000000000000000000000000000000000000')); }); }