diff options
author | Alexander Tseung <alextsg@gmail.com> | 2018-09-08 04:59:05 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@gmail.com> | 2018-09-13 10:48:52 +0800 |
commit | f1a309e0cc110060cc56252ec5f7626ca6403fab (patch) | |
tree | 204da913ed98c7b5947cc74907335bd545f02213 /ui/app/components/transaction-list-item | |
parent | c18c0e1c30bd7b2800e66288e21ee724e7314b30 (diff) | |
download | tangerine-wallet-browser-f1a309e0cc110060cc56252ec5f7626ca6403fab.tar tangerine-wallet-browser-f1a309e0cc110060cc56252ec5f7626ca6403fab.tar.gz tangerine-wallet-browser-f1a309e0cc110060cc56252ec5f7626ca6403fab.tar.bz2 tangerine-wallet-browser-f1a309e0cc110060cc56252ec5f7626ca6403fab.tar.lz tangerine-wallet-browser-f1a309e0cc110060cc56252ec5f7626ca6403fab.tar.xz tangerine-wallet-browser-f1a309e0cc110060cc56252ec5f7626ca6403fab.tar.zst tangerine-wallet-browser-f1a309e0cc110060cc56252ec5f7626ca6403fab.zip |
Fix identicon address. Fix styling of New Contract recipient. Fix Activity Log initial ETH value. Add timestamps to Activity Log events
Diffstat (limited to 'ui/app/components/transaction-list-item')
-rw-r--r-- | ui/app/components/transaction-list-item/transaction-list-item.component.js | 9 | ||||
-rw-r--r-- | ui/app/components/transaction-list-item/transaction-list-item.container.js | 5 |
2 files changed, 11 insertions, 3 deletions
diff --git a/ui/app/components/transaction-list-item/transaction-list-item.component.js b/ui/app/components/transaction-list-item/transaction-list-item.component.js index d895b8e26..5564f0883 100644 --- a/ui/app/components/transaction-list-item/transaction-list-item.component.js +++ b/ui/app/components/transaction-list-item/transaction-list-item.component.js @@ -22,6 +22,7 @@ export default class TransactionListItem extends PureComponent { nonceAndDate: PropTypes.string, token: PropTypes.object, assetImages: PropTypes.object, + tokenData: PropTypes.object, } state = { @@ -106,9 +107,13 @@ export default class TransactionListItem extends PureComponent { showRetry, nonceAndDate, assetImages, + tokenData, } = this.props const { txParams = {} } = transaction const { showTransactionDetails } = this.state + const toAddress = tokenData + ? tokenData.params && tokenData.params[0] && tokenData.params[0].value || txParams.to + : txParams.to return ( <div className="transaction-list-item"> @@ -118,9 +123,9 @@ export default class TransactionListItem extends PureComponent { > <Identicon className="transaction-list-item__identicon" - address={txParams.to} + address={toAddress} diameter={34} - image={assetImages[txParams.to]} + image={assetImages[toAddress]} /> <TransactionAction transaction={transaction} diff --git a/ui/app/components/transaction-list-item/transaction-list-item.container.js b/ui/app/components/transaction-list-item/transaction-list-item.container.js index 47644241a..3db9d40ec 100644 --- a/ui/app/components/transaction-list-item/transaction-list-item.container.js +++ b/ui/app/components/transaction-list-item/transaction-list-item.container.js @@ -5,16 +5,19 @@ import withMethodData from '../../higher-order-components/with-method-data' import TransactionListItem from './transaction-list-item.component' import { setSelectedToken, retryTransaction } from '../../actions' import { hexToDecimal } from '../../helpers/conversions.util' +import { getTokenData } from '../../helpers/transactions.util' import { formatDate } from '../../util' const mapStateToProps = (state, ownProps) => { - const { transaction: { txParams: { value, nonce } = {}, time } = {} } = ownProps + const { transaction: { txParams: { value, nonce, data } = {}, time } = {} } = ownProps + const tokenData = data && getTokenData(data) const nonceAndDate = nonce ? `#${hexToDecimal(nonce)} - ${formatDate(time)}` : formatDate(time) return { value, nonceAndDate, + tokenData, } } |