Merge pull request #1165 from andremedeiros/fix-regex-for-firefox

fix: update regex to be Firefox compatible
pull/7/head
yann300 6 years ago committed by GitHub
commit ce771912ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      remix-debug/src/solidity-decoder/types/util.js

@ -75,7 +75,7 @@ async function extractHexValue (location, storageResolver, byteLength) {
function toBN (value) {
if (value instanceof BN) {
return value
} else if (value.match && value.match(/^(?:0x)?(?<hash>[a-f0-9])*$/)) {
} else if (value.match && value.match(/^(0x)?([a-f0-9]*)$/)) {
value = ethutil.unpad(value.replace(/^(0x)/, ''))
value = new BN(value === '' ? '0' : value, 16)
} else if (!isNaN(value)) {

Loading…
Cancel
Save