From aa4746f4c723857710d61482a73960d863a8a098 Mon Sep 17 00:00:00 2001 From: Frankie Date: Wed, 19 Oct 2016 19:35:44 -0700 Subject: Add test and ability for isHex to handle hex strings with hex-prefix --- ui/app/util.js | 1 + 1 file changed, 1 insertion(+) (limited to 'ui/app') diff --git a/ui/app/util.js b/ui/app/util.js index facaef3ee..a519ab5b4 100644 --- a/ui/app/util.js +++ b/ui/app/util.js @@ -212,6 +212,7 @@ function readableDate (ms) { } function isHex (str) { + if (str.startsWith('0x')) str = str.replace('0x', '') if (str.match(/[g-zG-Z]/) || str.match(/\W/)) return false return true } -- cgit