Bufferize if 0x...

pull/1/head
yann300 7 years ago
parent 30ef60272a
commit b3e13456ae
  1. 6
      src/app/execution/txHelper.js

@ -7,10 +7,14 @@ module.exports = {
var types = []
if (funABI.inputs && funABI.inputs.length) {
for (var i = 0; i < funABI.inputs.length; i++) {
types.push(funABI.inputs[i].type)
var type = funABI.inputs[i].type
types.push(type)
if (args.length < types.length) {
args.push('')
}
if (args[i].indexOf && args[i].indexOf('0x') === 0) {
args[i] = new Buffer(args[i].replace('0x', ''), 'hex')
}
}
}

Loading…
Cancel
Save