Skip to content
This repository has been archived by the owner on Mar 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #1165 from andremedeiros/fix-regex-for-firefox
Browse files Browse the repository at this point in the history
fix: update regex to be Firefox compatible
  • Loading branch information
yann300 authored Apr 23, 2019
2 parents d4a8738 + 4f97502 commit ce77191
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion remix-debug/src/solidity-decoder/types/util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit ce77191

Please sign in to comment.