From c8c918d44e26e9541beead982ef0ed79a56d6e6f Mon Sep 17 00:00:00 2001 From: Dan Date: Fri, 27 Oct 2017 15:09:40 -0230 Subject: Add utility for getting token data; get token data in tx-list even if token has been removed. --- ui/app/components/tx-list.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'ui/app/components/tx-list.js') diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js index a02849d0e..2f6c1fee8 100644 --- a/ui/app/components/tx-list.js +++ b/ui/app/components/tx-list.js @@ -9,6 +9,7 @@ const ShiftListItem = require('./shift-list-item') const { formatBalance, formatDate } = require('../util') const { showConfTxPage } = require('../actions') const classnames = require('classnames') +const { tokenInfoGetter } = require('../token-util') module.exports = connect(mapStateToProps, mapDispatchToProps)(TxList) @@ -30,6 +31,10 @@ function TxList () { Component.call(this) } +TxList.prototype.componentWillMount = function () { + this.tokenInfoGetter = tokenInfoGetter() +} + TxList.prototype.render = function () { const { txsToRender, showConfTxPage } = this.props @@ -99,6 +104,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa transactionAmount, transactionHash, conversionRate, + tokenInfoGetter: this.tokenInfoGetter, } const isUnapproved = transactionStatus === 'unapproved'; -- cgit From 5a94775b3fa22517a71232ebe229ee83e9debcf1 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 2 Nov 2017 00:00:33 -0230 Subject: Lint fixes for NewUI-flat. --- ui/app/components/tx-list.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'ui/app/components/tx-list.js') diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js index 2f6c1fee8..6ea8776af 100644 --- a/ui/app/components/tx-list.js +++ b/ui/app/components/tx-list.js @@ -6,7 +6,7 @@ const prefixForNetwork = require('../../lib/etherscan-prefix-for-network') const selectors = require('../selectors') const TxListItem = require('./tx-list-item') const ShiftListItem = require('./shift-list-item') -const { formatBalance, formatDate } = require('../util') +const { formatDate } = require('../util') const { showConfTxPage } = require('../actions') const classnames = require('classnames') const { tokenInfoGetter } = require('../token-util') @@ -36,9 +36,6 @@ TxList.prototype.componentWillMount = function () { } TxList.prototype.render = function () { - - const { txsToRender, showConfTxPage } = this.props - return h('div.flex-column.tx-list-container', {}, [ h('div.flex-row.tx-list-header-wrapper', [ @@ -98,7 +95,6 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa txParams: transaction.txParams, transactionStatus, transActionId, - key: transActionId, dateString, address, transactionAmount, -- cgit From 56e9f98bd05de8ae26f653d15eec4304f0c72155 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 2 Nov 2017 09:45:59 -0230 Subject: More lint fixes --- ui/app/components/tx-list.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ui/app/components/tx-list.js') diff --git a/ui/app/components/tx-list.js b/ui/app/components/tx-list.js index 6ea8776af..70722f43e 100644 --- a/ui/app/components/tx-list.js +++ b/ui/app/components/tx-list.js @@ -22,7 +22,7 @@ function mapStateToProps (state) { function mapDispatchToProps (dispatch) { return { - showConfTxPage: ({ id }) => dispatch(showConfTxPage({ id })) + showConfTxPage: ({ id }) => dispatch(showConfTxPage({ id })), } } @@ -103,7 +103,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa tokenInfoGetter: this.tokenInfoGetter, } - const isUnapproved = transactionStatus === 'unapproved'; + const isUnapproved = transactionStatus === 'unapproved' if (isUnapproved) { opts.onClick = () => showConfTxPage({id: transActionId}) -- cgit