diff options
Diffstat (limited to 'ui/lib/tx-helper.js')
-rw-r--r-- | ui/lib/tx-helper.js | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/ui/lib/tx-helper.js b/ui/lib/tx-helper.js index 7f64f9fbe..2eefdff68 100644 --- a/ui/lib/tx-helper.js +++ b/ui/lib/tx-helper.js @@ -1,13 +1,17 @@ const valuesFor = require('../app/util').valuesFor -module.exports = function (unapprovedTxs, unapprovedMsgs, network) { +module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, network) { log.debug('tx-helper called with params:') - log.debug({ unapprovedTxs, unapprovedMsgs, network }) + log.debug({ unapprovedTxs, unapprovedMsgs, personalMsgs, network }) - var txValues = network ? valuesFor(unapprovedTxs).filter(tx => tx.txParams.metamaskNetworkId === network) : valuesFor(unapprovedTxs) + const txValues = network ? valuesFor(unapprovedTxs).filter(tx => tx.txParams.metamaskNetworkId === network) : valuesFor(unapprovedTxs) log.debug(`tx helper found ${txValues.length} unapproved txs`) - var msgValues = valuesFor(unapprovedMsgs) + const msgValues = valuesFor(unapprovedMsgs) log.debug(`tx helper found ${msgValues.length} unsigned messages`) - var allValues = txValues.concat(msgValues) + let allValues = txValues.concat(msgValues) + const personalValues = valuesFor(personalMsgs) + log.debug(`tx helper found ${personalValues.length} unsigned personal messages`) + allValues = allValues.concat(personalValues) + return allValues.sort(tx => tx.time) } |