Commit 20e1a605 authored by yann300's avatar yann300

try encoding params in any case so we throw beforehand if something went wrong

parent 88882b76
...@@ -186,14 +186,12 @@ module.exports = { ...@@ -186,14 +186,12 @@ module.exports = {
callback('Error encoding arguments: ' + e) callback('Error encoding arguments: ' + e)
return return
} }
if (!isConstructor || funArgs.length > 0) { try {
try { data = helper.encodeParams(funAbi, funArgs)
data = helper.encodeParams(funAbi, funArgs) dataHex = data.toString('hex')
dataHex = data.toString('hex') } catch (e) {
} catch (e) { callback('Error encoding arguments: ' + e)
callback('Error encoding arguments: ' + e) return
return
}
} }
if (data.slice(0, 9) === 'undefined') { if (data.slice(0, 9) === 'undefined') {
dataHex = data.slice(9) dataHex = data.slice(9)
......
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