aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/util.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-10-22 07:39:14 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-10-22 07:39:14 +0800
commit7d9e295b759ccd1ca77e286651c3da71284631e3 (patch)
tree8e433c62f71cd60eafa25a834a99109801417954 /ui/app/util.js
parent8326258b585b51bedf278423f911a24ce1f5ed08 (diff)
downloadtangerine-wallet-browser-7d9e295b759ccd1ca77e286651c3da71284631e3.tar
tangerine-wallet-browser-7d9e295b759ccd1ca77e286651c3da71284631e3.tar.gz
tangerine-wallet-browser-7d9e295b759ccd1ca77e286651c3da71284631e3.tar.bz2
tangerine-wallet-browser-7d9e295b759ccd1ca77e286651c3da71284631e3.tar.lz
tangerine-wallet-browser-7d9e295b759ccd1ca77e286651c3da71284631e3.tar.xz
tangerine-wallet-browser-7d9e295b759ccd1ca77e286651c3da71284631e3.tar.zst
tangerine-wallet-browser-7d9e295b759ccd1ca77e286651c3da71284631e3.zip
Change regex in isHex function
Diffstat (limited to 'ui/app/util.js')
-rw-r--r--ui/app/util.js5
1 files changed, 1 insertions, 4 deletions
diff --git a/ui/app/util.js b/ui/app/util.js
index 72b3af465..7a56bf6a0 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -212,8 +212,5 @@ function readableDate (ms) {
}
function isHex (str) {
- if (str.startsWith('0x')) {
- return !str.substring(2).match(/([g-zG-Z]|\W)/)
- }
- return !str.match(/([g-zG-Z]|\W)/)
+ return Boolean(str.match(/^(0x)?[0-9a-fA-F]+$/))
}