This is the solution for my the issue #212 I had filed earlier
In my used case, I wanted to send a custom userId and it was breaking down and the middleware throws Broke parameter contract.
Problem was with the contract.js code in which, in the checkParams function, it straight-away starts comparing the type of incoming arguments with the allowed contract types
if (args[i]) {
type = typeOf(args[i]);
fulfilled = false;
for(j=0; j<types.length; j++){
if (type === types[j]){
fulfilled = true;
break;
}
}
}
if(fulfilled===false){
return false;
}
}
After this, this works perfectly. This is pretty common issue people must be facing since, one might need to send a custom userId or actions without specifying numPathComponents
This is the solution for my the issue #212 I had filed earlier
In my used case, I wanted to send a custom userId and it was breaking down and the middleware throws Broke parameter contract. Problem was with the contract.js code in which, in the checkParams function, it straight-away starts comparing the type of incoming arguments with the allowed contract types
Old Code:-
New Code:-
After this, this works perfectly. This is pretty common issue people must be facing since, one might need to send a custom userId or actions without specifying numPathComponents