aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/util.js
diff options
context:
space:
mode:
authorFrankie <frankie.pangilinan@consensys.net>2016-10-20 05:33:30 +0800
committerFrankie <frankie.pangilinan@consensys.net>2016-10-20 05:33:30 +0800
commit5fb1e492fb32e664364603c34044c3e573501781 (patch)
tree23fd77e8658c24faefb97056e951d8f8f7044dda /ui/app/util.js
parent0f0951ba549c294222421ef8508294165e9b5fdd (diff)
downloadtangerine-wallet-browser-5fb1e492fb32e664364603c34044c3e573501781.tar.gz
tangerine-wallet-browser-5fb1e492fb32e664364603c34044c3e573501781.tar.zst
tangerine-wallet-browser-5fb1e492fb32e664364603c34044c3e573501781.zip
Add valdations to txData param
Diffstat (limited to 'ui/app/util.js')
-rw-r--r--ui/app/util.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/app/util.js b/ui/app/util.js
index e4b77e2bc..facaef3ee 100644
--- a/ui/app/util.js
+++ b/ui/app/util.js
@@ -35,6 +35,7 @@ module.exports = {
normalizeNumberToWei: normalizeNumberToWei,
valueTable: valueTable,
bnTable: bnTable,
+ isHex: isHex,
}
function valuesFor (obj) {
@@ -209,3 +210,8 @@ function readableDate (ms) {
var time = `${hours}:${minutes.substr(-2)}:${seconds.substr(-2)}`
return `${dateStr} ${time}`
}
+
+function isHex (str) {
+ if (str.match(/[g-zG-Z]/) || str.match(/\W/)) return false
+ return true
+}