Add checking parameter size in ConvertParamsToTypedObj
@@ -245,9 +245,11 @@ func (a *Method) EnsureParamsSequential(paramObj *codec.TypedObj) (*codec.TypedO
func (a *Method) ConvertParamsToTypedObj(bs []byte) (*codec.TypedObj, error) {
var params map[string]string
+ if len(bs) > 0 {
if err := json.Unmarshal(bs, &params); err != nil {
return nil, scoreresult.Error(err, module.StatusInvalidParameter)
}
+ }
inputs := make([]interface{}, len(a.Inputs))
for i, input := range a.Inputs {
param, ok := params[input.Name]
