1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-24 02:58:09 +01:00
metamask-extension/ui/lib/tx-helper.js

9 lines
386 B
JavaScript
Raw Normal View History

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)
}