diff options
author | Kevin Serrano <kevgagser@gmail.com> | 2017-03-08 02:37:31 +0800 |
---|---|---|
committer | Kevin Serrano <kevgagser@gmail.com> | 2017-03-08 02:37:31 +0800 |
commit | 08ca7dac5a15e104084c6da3eb6015136b316809 (patch) | |
tree | 3e0b1a61f3be3aa1e01824512b4df0a793dc6a17 /ui/app/components/pending-tx.js | |
parent | 01f2ec4823e83d986e7ecfd268f6b293f38a13e8 (diff) | |
parent | 2acf991b67bc42fb904ff77af6ff6a7ca3a683fd (diff) | |
download | tangerine-wallet-browser-08ca7dac5a15e104084c6da3eb6015136b316809.tar tangerine-wallet-browser-08ca7dac5a15e104084c6da3eb6015136b316809.tar.gz tangerine-wallet-browser-08ca7dac5a15e104084c6da3eb6015136b316809.tar.bz2 tangerine-wallet-browser-08ca7dac5a15e104084c6da3eb6015136b316809.tar.lz tangerine-wallet-browser-08ca7dac5a15e104084c6da3eb6015136b316809.tar.xz tangerine-wallet-browser-08ca7dac5a15e104084c6da3eb6015136b316809.tar.zst tangerine-wallet-browser-08ca7dac5a15e104084c6da3eb6015136b316809.zip |
Merge branch 'master' into i1144-moarrpc
Diffstat (limited to 'ui/app/components/pending-tx.js')
-rw-r--r-- | ui/app/components/pending-tx.js | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index d39cbc0f8..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 () { @@ -60,25 +68,31 @@ PendingTx.prototype.render = function () { }, [ props.insufficientBalance ? - h('button.btn-green', { + h('button', { onClick: props.buyEth, }, 'Buy Ether') : null, - h('button.confirm', { + h('button', { + onClick: () => { + this.refs.details.resetGasFields() + }, + }, 'Reset'), + + 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', { onClick: props.cancelTransaction, }, 'Reject'), - - h('button', { - onClick: () => { - this.refs.details.resetGasFields() - }, - }, 'Reset'), ]), ]) ) |