Merge pull request #1031 from ethereum/refactor/remove_jquery_dependency

minor refactor: replace jquery util with native js
pull/1/head
Iuri Matias 7 years ago committed by GitHub
commit f8b6ccba62
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/app/execution/txFormat.js
  2. 14
      src/app/execution/txHelper.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

@ -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(', ')
}
}

Loading…
Cancel
Save