1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Clean up send screen

This commit is contained in:
sdtsui 2017-07-29 19:46:59 -07:00
parent 25259cc2cd
commit 8ace4710ff

View File

@ -320,7 +320,11 @@ SendTransactionScreen.prototype.onSubmit = function () {
const nickname = state.nickname || ' ' const nickname = state.nickname || ' '
const input = document.querySelector('input[name="amount"]').value const input = document.querySelector('input[name="amount"]').value
const value = util.normalizeEthStringToWei(input) const value = util.normalizeEthStringToWei(input)
const txData = document.querySelector('input[name="txData"]').value // TODO: check with team on whether txData is removed completely.
const txData = false;
// Must replace with memo data.
// const txData = document.querySelector('input[name="txData"]').value
const balance = this.props.balance const balance = this.props.balance
let message let message
@ -339,7 +343,7 @@ SendTransactionScreen.prototype.onSubmit = function () {
return this.props.dispatch(actions.displayWarning(message)) return this.props.dispatch(actions.displayWarning(message))
} }
if (!isHex(ethUtil.stripHexPrefix(txData)) && txData) { if (txData && !isHex(ethUtil.stripHexPrefix(txData))) {
message = 'Transaction data must be hex string.' message = 'Transaction data must be hex string.'
return this.props.dispatch(actions.displayWarning(message)) return this.props.dispatch(actions.displayWarning(message))
} }