From 28ec08e1834c54d4ec2f8266c253d630c8e544ec Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 2 Jan 2018 10:32:35 +0100 Subject: [PATCH] fix mapping parsing --- remix-solidity/src/decoder/decodeInfo.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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')