aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/send.js
diff options
context:
space:
mode:
authorDan Finlay <somniac@me.com>2016-10-22 08:24:04 +0800
committerGitHub <noreply@github.com>2016-10-22 08:24:04 +0800
commiteba37e773df54276e84d27c02a370719f670cc8b (patch)
tree8e433c62f71cd60eafa25a834a99109801417954 /ui/app/send.js
parent8d2ec8b820e500a936fad334ae504d5bd50d3d48 (diff)
parent7d9e295b759ccd1ca77e286651c3da71284631e3 (diff)
downloadtangerine-wallet-browser-eba37e773df54276e84d27c02a370719f670cc8b.tar
tangerine-wallet-browser-eba37e773df54276e84d27c02a370719f670cc8b.tar.gz
tangerine-wallet-browser-eba37e773df54276e84d27c02a370719f670cc8b.tar.bz2
tangerine-wallet-browser-eba37e773df54276e84d27c02a370719f670cc8b.tar.lz
tangerine-wallet-browser-eba37e773df54276e84d27c02a370719f670cc8b.tar.xz
tangerine-wallet-browser-eba37e773df54276e84d27c02a370719f670cc8b.tar.zst
tangerine-wallet-browser-eba37e773df54276e84d27c02a370719f670cc8b.zip
Merge pull request #752 from MetaMask/i#741
Add validations to txData param in send form
Diffstat (limited to 'ui/app/send.js')
-rw-r--r--ui/app/send.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/app/send.js b/ui/app/send.js
index 97ed29e4a..b8af19028 100644
--- a/ui/app/send.js
+++ b/ui/app/send.js
@@ -7,6 +7,7 @@ const actions = require('./actions')
const util = require('./util')
const numericBalance = require('./util').numericBalance
const addressSummary = require('./util').addressSummary
+const isHex = require('./util').isHex
const EthBalance = require('./components/eth-balance')
const ethUtil = require('ethereumjs-util')
const RangeSlider = require('./components/range-slider')
@@ -190,7 +191,7 @@ SendTransactionScreen.prototype.render = function () {
marginBottom: '16px',
},
}, [
- 'Transactional Data (optional)',
+ 'Transaction Data (optional)',
]),
// 'data' field
@@ -312,6 +313,11 @@ SendTransactionScreen.prototype.onSubmit = function (gasPrice) {
return this.props.dispatch(actions.displayWarning(message))
}
+ if (!isHex(ethUtil.stripHexPrefix(txData)) && txData) {
+ message = 'Transaction data must be hex string.'
+ return this.props.dispatch(actions.displayWarning(message))
+ }
+
this.props.dispatch(actions.hideWarning())
var txParams = {