From b3e13456ae094d82793e74fd20ed63b613050283 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 18 Sep 2017 22:52:45 +0200 Subject: [PATCH] Bufferize if 0x... --- src/app/execution/txHelper.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/execution/txHelper.js b/src/app/execution/txHelper.js index c21a857803..a9919f1020 100644 --- a/src/app/execution/txHelper.js +++ b/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') + } } }