aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib/tx-helper.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/lib/tx-helper.js')
-rw-r--r--ui/lib/tx-helper.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/ui/lib/tx-helper.js b/ui/lib/tx-helper.js
index 7f64f9fbe..c8dc46c9d 100644
--- a/ui/lib/tx-helper.js
+++ b/ui/lib/tx-helper.js
@@ -1,13 +1,16 @@
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)
+ allValues = allValues.concat(personalValues)
+
return allValues.sort(tx => tx.time)
}