diff options
author | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-07 18:14:53 +0800 |
---|---|---|
committer | Chi Kei Chan <chikeichan@gmail.com> | 2017-09-07 18:14:53 +0800 |
commit | 983fa2a11721aa7d1307ef76d516e25a50d0eedf (patch) | |
tree | bfe3cc63c9b3169e7116535f551749694073d714 /ui/app/selectors.js | |
parent | 14b2f3e391752cca02c05ae0137e490bfdcdd7a7 (diff) | |
download | tangerine-wallet-browser-983fa2a11721aa7d1307ef76d516e25a50d0eedf.tar tangerine-wallet-browser-983fa2a11721aa7d1307ef76d516e25a50d0eedf.tar.gz tangerine-wallet-browser-983fa2a11721aa7d1307ef76d516e25a50d0eedf.tar.bz2 tangerine-wallet-browser-983fa2a11721aa7d1307ef76d516e25a50d0eedf.tar.lz tangerine-wallet-browser-983fa2a11721aa7d1307ef76d516e25a50d0eedf.tar.xz tangerine-wallet-browser-983fa2a11721aa7d1307ef76d516e25a50d0eedf.tar.zst tangerine-wallet-browser-983fa2a11721aa7d1307ef76d516e25a50d0eedf.zip |
Add Contract Tx List Item; Update Token Tx on select
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r-- | ui/app/selectors.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js index 400f5cd45..d8764b488 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors.js @@ -45,11 +45,16 @@ function conversionRateSelector (state) { } function transactionsSelector (state) { - const { network } = state.metamask + const { network, selectedTokenAddress } = state.metamask const unapprovedMsgs = valuesFor(state.metamask.unapprovedMsgs) const shapeShiftTxList = (network === '1') ? state.metamask.shapeShiftTxList : undefined const transactions = state.metamask.selectedAddressTxList || [] const txsToRender = !shapeShiftTxList ? transactions.concat(unapprovedMsgs) : transactions.concat(unapprovedMsgs, shapeShiftTxList) - return txsToRender.sort((a, b) => b.time - a.time) + return selectedTokenAddress + ? txsToRender + .filter(({ to }) => to === selectedTokenAddress) + .sort((a, b) => b.time - a.time) + : txsToRender + .sort((a, b) => b.time - a.time) } |