diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-02 09:03:55 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-02 09:03:55 +0800 |
commit | 72932bdcba10bd9d47724f271d0c14f84d12b759 (patch) | |
tree | b1426b18930b61d6f24031372f1a91f7375a4c47 /ui/app/components/pending-tx.js | |
parent | 0ac1f749fd68244682d0f2c763028cdf6aa29486 (diff) | |
download | tangerine-wallet-browser-72932bdcba10bd9d47724f271d0c14f84d12b759.tar tangerine-wallet-browser-72932bdcba10bd9d47724f271d0c14f84d12b759.tar.gz tangerine-wallet-browser-72932bdcba10bd9d47724f271d0c14f84d12b759.tar.bz2 tangerine-wallet-browser-72932bdcba10bd9d47724f271d0c14f84d12b759.tar.lz tangerine-wallet-browser-72932bdcba10bd9d47724f271d0c14f84d12b759.tar.xz tangerine-wallet-browser-72932bdcba10bd9d47724f271d0c14f84d12b759.tar.zst tangerine-wallet-browser-72932bdcba10bd9d47724f271d0c14f84d12b759.zip |
Prevent submission of invalid gas parameters.
Diffstat (limited to 'ui/app/components/pending-tx.js')
-rw-r--r-- | ui/app/components/pending-tx.js | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index ed366aa45..2ab6f25a9 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -1,10 +1,18 @@ const Component = require('react').Component +const connect = require('react-redux').connect const h = require('react-hyperscript') const inherits = require('util').inherits const PendingTxDetails = require('./pending-tx-details') const extend = require('xtend') +const actions = require('../actions') -module.exports = PendingTx +module.exports = connect(mapStateToProps)(PendingTx) + +function mapStateToProps (state) { + return { + + } +} inherits(PendingTx, Component) function PendingTx () { @@ -73,7 +81,13 @@ PendingTx.prototype.render = function () { h('button.confirm.btn-green', { disabled: props.insufficientBalance, - onClick: props.sendTransaction, + onClick: (txData, event) => { + if (this.refs.details.verifyGasParams()) { + props.sendTransaction(txData, event) + } else { + this.props.dispatch(actions.displayWarning('Invalid Gas Parameters')) + } + }, }, 'Accept'), h('button.cancel.btn-red', { |