diff options
author | Dan <danjm.com@gmail.com> | 2017-08-30 11:16:30 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-08 01:25:56 +0800 |
commit | 6d3b3d42034c88475cd90172ddd97b95f04df60e (patch) | |
tree | c4ce6e5d95fa237d7d5545253b25ec371b26b24a /ui/app/components | |
parent | aa60944e30b7d1d9680b5ca53e8b61a8edb47904 (diff) | |
download | tangerine-wallet-browser-6d3b3d42034c88475cd90172ddd97b95f04df60e.tar.gz tangerine-wallet-browser-6d3b3d42034c88475cd90172ddd97b95f04df60e.tar.zst tangerine-wallet-browser-6d3b3d42034c88475cd90172ddd97b95f04df60e.zip |
Show confirm transaction screen when clicking a pending transaction in the list.
Diffstat (limited to 'ui/app/components')
-rw-r--r-- | ui/app/components/buy-button-subview.js | 2 | ||||
-rw-r--r-- | ui/app/components/tx-list.js | 16 |
2 files changed, 15 insertions, 3 deletions
diff --git a/ui/app/components/buy-button-subview.js b/ui/app/components/buy-button-subview.js index 15281171c..6cf6e9eb9 100644 --- a/ui/app/components/buy-button-subview.js +++ b/ui/app/components/buy-button-subview.js @@ -245,7 +245,7 @@ BuyButtonSubview.prototype.navigateTo = function (url) { BuyButtonSubview.prototype.backButtonContext = function () { if (this.props.context === 'confTx') { - this.props.dispatch(actions.showConfTxPage(false)) + this.props.dispatch(actions.showConfTxPage({transForward: false})) } else { this.props.dispatch(actions.goHome()) } diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js index 04d2eaa79..6cbd123f8 100644 --- a/ui/app/components/tx-list.js +++ b/ui/app/components/tx-list.js @@ -5,8 +5,9 @@ const inherits = require('util').inherits const selectors = require('../selectors') const Identicon = require('./identicon') const { formatBalance, formatDate } = require('../util') +const { showConfTxPage } = require('../actions') -module.exports = connect(mapStateToProps)(TxList) +module.exports = connect(mapStateToProps, mapDispatchToProps)(TxList) function mapStateToProps (state) { return { @@ -15,6 +16,12 @@ function mapStateToProps (state) { } } +function mapDispatchToProps (dispatch) { + return { + showConfTxPage: ({ id }) => dispatch(showConfTxPage({ id })) + } +} + inherits(TxList, Component) function TxList () { Component.call(this) @@ -22,7 +29,7 @@ function TxList () { TxList.prototype.render = function () { - // console.log('transactions to render', txsToRender) + const { txsToRender, showConfTxPage } = this.props return h('div.flex-column.tx-list-container', {}, [ @@ -73,18 +80,23 @@ TxList.prototype.renderTransactionListItem = function (transaction) { address: transaction.txParams.to, transactionStatus: transaction.status, transactionAmount: formatBalance(transaction.txParams.value, 6), + transActionId: transaction.id, } + const { address, transactionStatus, transactionAmount, dateString, + transActionId, } = props + const { showConfTxPage } = this.props return h('div.tx-list-item', { key: transaction.id, }, [ h('div.flex-column.tx-list-item__wrapper', { + onClick: () => transactionStatus === 'unapproved' && showConfTxPage({id: transActionId}), style: {}, }, [ |