diff options
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r-- | ui/app/selectors.js | 21 |
1 files changed, 4 insertions, 17 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js index d86462275..1d5f4d4cb 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors.js @@ -1,6 +1,9 @@ -const valuesFor = require('./util').valuesFor const abi = require('human-standard-token-abi') +import { + transactionsSelector, +} from './selectors/transactions' + const { multiplyCurrencies, } = require('./conversion-util') @@ -101,22 +104,6 @@ function getCurrentAccountWithSendEtherInfo (state) { return accounts.find(({ address }) => address === currentAddress) } -function transactionsSelector (state) { - 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) - - // console.log({txsToRender, selectedTokenAddress}) - return selectedTokenAddress - ? txsToRender - .filter(({ txParams }) => txParams && txParams.to === selectedTokenAddress) - .sort((a, b) => b.time - a.time) - : txsToRender - .sort((a, b) => b.time - a.time) -} - function getGasIsLoading (state) { return state.appState.gasIsLoading } |