fix mapping parsing

pull/7/head
yann300 7 years ago
parent 7c5b18544a
commit 28ec08e183
  1. 6
      remix-solidity/src/decoder/decodeInfo.js

@ -20,9 +20,9 @@ var util = require('./types/util')
* @return {Object} returns decoded info about the current type: { storageBytes, typeName}
*/
function mapping (type, stateDefinitions, contractName) {
var match = type.match(/mapping\((.*?)( =>)? (.*)\)$/)
var keyTypeName = match[1]
var valueTypeName = match[3]
var match = type.match(/mapping\((.*?)=>(.*)\)$/)
var keyTypeName = match[1].trim()
var valueTypeName = match[2].trim()
var keyType = parseType(keyTypeName, stateDefinitions, contractName, 'storage')
var valueType = parseType(valueTypeName, stateDefinitions, contractName, 'storage')

Loading…
Cancel
Save