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) {
var inputs = ''
if (abiinputs) {
abiinputs.forEach(function (i, inp) {
if (inputs !== '') {
inputs += ', '
}
inputs += inp.type + ' ' + inp.name
})
}
return inputs
var inputs = (abiinputs || []).map((inp) => inp.type + ' ' + inp.name)
return inputs.join(', ')
}
}

Loading…
Cancel
Save