mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Add needed iterator in tx-list and path to account in selectors.
This commit is contained in:
parent
d206f183f5
commit
45dbd017e6
@ -50,7 +50,11 @@ TxList.prototype.renderTransaction = function () {
|
|||||||
const { txsToRender, conversionRate } = this.props
|
const { txsToRender, conversionRate } = this.props
|
||||||
return txsToRender.length
|
return txsToRender.length
|
||||||
? txsToRender.map((transaction, i) => this.renderTransactionListItem(transaction, conversionRate))
|
? txsToRender.map((transaction, i) => this.renderTransactionListItem(transaction, conversionRate))
|
||||||
: [h('div.tx-list-item.tx-list-item--empty', [ 'No Transactions' ])]
|
: [h(
|
||||||
|
'div.tx-list-item.tx-list-item--empty',
|
||||||
|
{ key: 'tx-list-none' },
|
||||||
|
[ 'No Transactions' ],
|
||||||
|
)]
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Consider moving TxListItem into a separate component
|
// TODO: Consider moving TxListItem into a separate component
|
||||||
@ -88,6 +92,7 @@ TxList.prototype.renderTransactionListItem = function (transaction, conversionRa
|
|||||||
txParams: transaction.txParams,
|
txParams: transaction.txParams,
|
||||||
transactionStatus,
|
transactionStatus,
|
||||||
transActionId,
|
transActionId,
|
||||||
|
key: transActionId,
|
||||||
dateString,
|
dateString,
|
||||||
address,
|
address,
|
||||||
transactionAmount,
|
transactionAmount,
|
||||||
|
@ -13,7 +13,7 @@ module.exports = selectors
|
|||||||
|
|
||||||
function getSelectedAddress (state) {
|
function getSelectedAddress (state) {
|
||||||
// TODO: accounts is not defined. Is it needed?
|
// TODO: accounts is not defined. Is it needed?
|
||||||
const selectedAddress = state.metamask.selectedAddress || Object.keys(accounts)[0]
|
const selectedAddress = state.metamask.selectedAddress || Object.keys(state.metamask.accounts)[0]
|
||||||
|
|
||||||
return selectedAddress
|
return selectedAddress
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user