diff --git a/src/app/execution/txFormat.js b/src/app/execution/txFormat.js index d69446380a..f529167963 100644 --- a/src/app/execution/txFormat.js +++ b/src/app/execution/txFormat.js @@ -1,5 +1,4 @@ 'use strict' -var $ = require('jquery') var ethJSABI = require('ethereumjs-abi') var ethJSUtil = require('ethereumjs-util') var BN = ethJSUtil.BN @@ -55,7 +54,7 @@ module.exports = { data = Buffer.from(dataHex, 'hex') } else { try { - funArgs = $.parseJSON('[' + params + ']') + funArgs = JSON.parse('[' + params + ']') } catch (e) { callback('Error encoding arguments: ' + e) return diff --git a/src/app/execution/txHelper.js b/src/app/execution/txHelper.js index 81275a835c..f11a9247e9 100644 --- a/src/app/execution/txHelper.js +++ b/src/app/execution/txHelper.js @@ -1,6 +1,5 @@ 'use strict' var ethJSABI = require('ethereumjs-abi') -var $ = require('jquery') module.exports = { encodeParams: function (funABI, args) { @@ -115,15 +114,8 @@ module.exports = { }, inputParametersDeclarationToString: function (abiinputs) { - var inputs = '' - if (abiinputs) { - $.each(abiinputs, 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(', ') } + }