Filter txs by txMeta network value in account detail

feature/default_network_editable
kumavis 8 years ago
parent 6310a05dae
commit 067459da4c
  1. 2
      ui/app/accounts/index.js
  2. 4
      ui/lib/tx-helper.js

@ -11,7 +11,7 @@ module.exports = connect(mapStateToProps)(AccountsScreen)
function mapStateToProps (state) {
const pendingTxs = valuesFor(state.metamask.unapprovedTxs)
.filter(tx => tx.txParams.metamaskNetworkId === state.metamask.network)
.filter(txMeta => txMeta.metamaskNetworkId === state.metamask.network)
const pendingMsgs = valuesFor(state.metamask.unapprovedMsgs)
const pending = pendingTxs.concat(pendingMsgs)

@ -4,7 +4,7 @@ module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, network)
log.debug('tx-helper called with params:')
log.debug({ unapprovedTxs, unapprovedMsgs, personalMsgs, network })
const txValues = network ? valuesFor(unapprovedTxs).filter(tx => tx.metamaskNetworkId === network) : valuesFor(unapprovedTxs)
const txValues = network ? valuesFor(unapprovedTxs).filter(txMeta => txMeta.metamaskNetworkId === network) : valuesFor(unapprovedTxs)
log.debug(`tx helper found ${txValues.length} unapproved txs`)
const msgValues = valuesFor(unapprovedMsgs)
log.debug(`tx helper found ${msgValues.length} unsigned messages`)
@ -13,5 +13,5 @@ module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, network)
log.debug(`tx helper found ${personalValues.length} unsigned personal messages`)
allValues = allValues.concat(personalValues)
return allValues.sort(tx => tx.time)
return allValues.sort(txMeta => txMeta.time)
}

Loading…
Cancel
Save