diff options
author | kumavis <kumavis@users.noreply.github.com> | 2018-04-10 04:56:59 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-10 04:56:59 +0800 |
commit | df1f891585dc41a7d725d592902a84e432e66dc4 (patch) | |
tree | e450c931e8d6d4a1277fd57e330fa8882d7cc93f /ui/app/components/tx-view.js | |
parent | 931ce120737210cbbf6736b454580ac0610f527a (diff) | |
parent | 305f5f0034f347ee3eacbc4e6ef41817c1de9ab2 (diff) | |
download | tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar.gz tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar.bz2 tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar.lz tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar.xz tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.tar.zst tangerine-wallet-browser-df1f891585dc41a7d725d592902a84e432e66dc4.zip |
Merge branch 'master' into i3621-LogoPerformance
Diffstat (limited to 'ui/app/components/tx-view.js')
-rw-r--r-- | ui/app/components/tx-view.js | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/ui/app/components/tx-view.js b/ui/app/components/tx-view.js index ca24e813f..80aac35c4 100644 --- a/ui/app/components/tx-view.js +++ b/ui/app/components/tx-view.js @@ -4,20 +4,25 @@ const connect = require('react-redux').connect const h = require('react-hyperscript') const ethUtil = require('ethereumjs-util') const inherits = require('util').inherits +const { withRouter } = require('react-router-dom') +const { compose } = require('recompose') const actions = require('../actions') const selectors = require('../selectors') +const { SEND_ROUTE } = require('../routes') const BalanceComponent = require('./balance-component') const TxList = require('./tx-list') const Identicon = require('./identicon') +module.exports = compose( + withRouter, + connect(mapStateToProps, mapDispatchToProps) +)(TxView) + TxView.contextTypes = { t: PropTypes.func, } -module.exports = connect(mapStateToProps, mapDispatchToProps)(TxView) - - function mapStateToProps (state) { const sidebarOpen = state.appState.sidebarOpen const isMascara = state.appState.isMascara @@ -69,7 +74,7 @@ TxView.prototype.renderHeroBalance = function () { } TxView.prototype.renderButtons = function () { - const {selectedToken, showModal, showSendPage, showSendTokenPage } = this.props + const {selectedToken, showModal, history } = this.props return !selectedToken ? ( @@ -84,14 +89,14 @@ TxView.prototype.renderButtons = function () { style: { marginLeft: '0.8em', }, - onClick: showSendPage, + onClick: () => history.push(SEND_ROUTE), }, this.context.t('send')), ]) ) : ( h('div.flex-row.flex-center.hero-balance-buttons', [ h('button.btn-primary.hero-balance-button', { - onClick: showSendTokenPage, + onClick: () => history.push(SEND_ROUTE), }, this.context.t('send')), ]) ) |