aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib/tx-helper.js
diff options
context:
space:
mode:
authorKevin Serrano <kevin.serrano@consensys.net>2017-10-10 23:38:27 +0800
committerKevin Serrano <kevin.serrano@consensys.net>2017-10-10 23:38:27 +0800
commit1816eca9144b13b3e869e2c3c95476b27c3e3aba (patch)
tree356cc6269f6920bc20585e455811a43253fff777 /ui/lib/tx-helper.js
parent24a55cf7770a6154fe723cf13cdc9998e1759f3b (diff)
parentf18615a82abafee1a648e8de6f60ecc54e1aabb4 (diff)
downloadtangerine-wallet-browser-1816eca9144b13b3e869e2c3c95476b27c3e3aba.tar.gz
tangerine-wallet-browser-1816eca9144b13b3e869e2c3c95476b27c3e3aba.tar.zst
tangerine-wallet-browser-1816eca9144b13b3e869e2c3c95476b27c3e3aba.zip
Merge branch 'master' into version-debugging
Diffstat (limited to 'ui/lib/tx-helper.js')
-rw-r--r--ui/lib/tx-helper.js13
1 files changed, 10 insertions, 3 deletions
diff --git a/ui/lib/tx-helper.js b/ui/lib/tx-helper.js
index 5def23e51..341567e2f 100644
--- a/ui/lib/tx-helper.js
+++ b/ui/lib/tx-helper.js
@@ -1,20 +1,27 @@
const valuesFor = require('../app/util').valuesFor
-module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, network) {
+module.exports = function (unapprovedTxs, unapprovedMsgs, personalMsgs, typedMessages, network) {
log.debug('tx-helper called with params:')
- log.debug({ unapprovedTxs, unapprovedMsgs, personalMsgs, network })
+ log.debug({ unapprovedTxs, unapprovedMsgs, personalMsgs, typedMessages, network })
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`)
let allValues = txValues.concat(msgValues)
+
const personalValues = valuesFor(personalMsgs)
log.debug(`tx helper found ${personalValues.length} unsigned personal messages`)
allValues = allValues.concat(personalValues)
+
+ const typedValues = valuesFor(typedMessages)
+ log.debug(`tx helper found ${typedValues.length} unsigned typed messages`)
+ allValues = allValues.concat(typedValues)
+
allValues = allValues.sort((a, b) => {
return a.time > b.time
})
return allValues
-}
+} \ No newline at end of file