diff --git a/remix-solidity/src/decoder/decodeInfo.js b/remix-solidity/src/decoder/decodeInfo.js index 4fc6f86cb3..417fa85cce 100644 --- a/remix-solidity/src/decoder/decodeInfo.js +++ b/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')