simplify inputParametersDeclarationToString code by using array.map

pull/3094/head
Iuri Matias 7 years ago
parent acb2ab0e81
commit a2f57f2590
  1. 13
      src/app/execution/txHelper.js

@ -114,15 +114,8 @@ module.exports = {
}, },
inputParametersDeclarationToString: function (abiinputs) { inputParametersDeclarationToString: function (abiinputs) {
var inputs = '' var inputs = (abiinputs || []).map((inp) => inp.type + ' ' + inp.name)
if (abiinputs) { return inputs.join(', ')
abiinputs.forEach(function (i, inp) {
if (inputs !== '') {
inputs += ', '
}
inputs += inp.type + ' ' + inp.name
})
}
return inputs
} }
} }

Loading…
Cancel
Save