1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-27 12:56:01 +01:00

Fix .filter token tx

This commit is contained in:
Chi Kei Chan 2017-09-07 11:46:05 -07:00
parent ca69fa5d91
commit 272ade0f66

View File

@ -51,9 +51,10 @@ function transactionsSelector (state) {
const transactions = state.metamask.selectedAddressTxList || []
const txsToRender = !shapeShiftTxList ? transactions.concat(unapprovedMsgs) : transactions.concat(unapprovedMsgs, shapeShiftTxList)
console.log({txsToRender, selectedTokenAddress})
return selectedTokenAddress
? txsToRender
.filter(({ to }) => to === selectedTokenAddress)
.filter(({ txParams: { to } }) => to === selectedTokenAddress)
.sort((a, b) => b.time - a.time)
: txsToRender
.sort((a, b) => b.time - a.time)