From a221b1b6b9dbd4d966e1ebc2ce7707fe02345472 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Tue, 27 Oct 2015 12:30:48 -0500 Subject: [PATCH] fixed interface issues, stubs work again --- lib/config/contracts.js | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/config/contracts.js b/lib/config/contracts.js index 5045f8d63..e6aca9aba 100644 --- a/lib/config/contracts.js +++ b/lib/config/contracts.js @@ -40,16 +40,10 @@ ContractsConfig.prototype.config = function(env) { return this.contractConfig[env]; }; -ContractsConfig.prototype.is_a_token = function(target, compiled_contracts) { - for (var className in compiled_contracts) { //This needs some serious changing +ContractsConfig.prototype.is_a_interface = function(target, className) { - if (this.contractStubs[className] && this.contractStubs[className].indexOf(target) >= 0) { - console.log("hit the condition") - console.log(this.contractStubs[className]); - console.log(this.contractStubs[className].indexOf(target)); - return true; - } - } + if (this.contractStubs[className] && this.contractStubs[className].indexOf(target) >= 0) + return true; return false; }; @@ -84,7 +78,7 @@ ContractsConfig.prototype.compileContracts = function(env) { for (var className in compiled_contracts) { - if (this.is_a_token(className, compiled_contracts)) { + if (this.is_a_interface(className, compiled_contracts)) { continue; } @@ -99,6 +93,7 @@ ContractsConfig.prototype.compileContracts = function(env) { } this.configureContractsParameters(contractsConfig); + this.sortContracts(); }; @@ -166,3 +161,4 @@ ContractsConfig.prototype.sortContracts = function() { }; module.exports = ContractsConfig; +