double quoted number and hex string

pull/7/head
yann300 7 years ago
parent 9d4cbb79df
commit 5b3d629d06
  1. 2
      remix-lib/src/execution/txFormat.js

@ -51,6 +51,8 @@ module.exports = {
data = Buffer.from(dataHex, 'hex')
} else {
try {
params = params.replace(/(^|,\s+|,)(\d+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted number by quoted number
params = params.replace(/(^|,\s+|,)(0[xX][0-9a-fA-F]+)(\s+,|,|$)/g, '$1"$2"$3') // replace non quoted hex string by quoted hex string
funArgs = JSON.parse('[' + params + ']')
} catch (e) {
callback('Error encoding arguments: ' + e)

Loading…
Cancel
Save