aboutsummaryrefslogblamecommitdiffstats
path: root/ui/lib/tx-helper.js
blob: fa7a94cdc9d29ef7f0fcf6460ef709ee3fcefadd (plain) (tree)
1
2
3
4
5
6
7
8

                                                  


                                                                                                                                      


                                            
const valuesFor = require('../app/util').valuesFor

module.exports = function (unapprovedTxs, unapprovedMsgs, network) {
  var txValues = network ? valuesFor(unapprovedTxs).filter(tx => tx.txParams.metamaskNetworkId === network) : valuesFor(unapprovedTxs)
  var msgValues = valuesFor(unapprovedMsgs)
  var allValues = txValues.concat(msgValues)
  return allValues.sort(tx => tx.time)
}