fixed interface issues, stubs work again

This commit is contained in:
VoR0220 2015-10-27 12:30:48 -05:00 committed by Iuri Matias
parent 078e3240db
commit a221b1b6b9
1 changed files with 6 additions and 10 deletions

View File

@ -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;