Commit b3e13456 authored by yann300's avatar yann300

Bufferize if 0x...

parent 30ef6027
......@@ -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')
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment