diff options
author | Sergey Ukustov <sergey@ukstv.me> | 2017-09-30 00:24:08 +0800 |
---|---|---|
committer | Sergey Ukustov <sergey@ukstv.me> | 2017-09-30 00:40:46 +0800 |
commit | c2b8dada91c90788dcd81a0318c52a66b4b769d1 (patch) | |
tree | 599c21d3ff09e5ac1c01062940337d6eb2c5d4fb /ui/lib | |
parent | cdf41c28573822c7c4d50efe7dfa34a062825d7f (diff) | |
download | tangerine-wallet-browser-c2b8dada91c90788dcd81a0318c52a66b4b769d1.tar tangerine-wallet-browser-c2b8dada91c90788dcd81a0318c52a66b4b769d1.tar.gz tangerine-wallet-browser-c2b8dada91c90788dcd81a0318c52a66b4b769d1.tar.bz2 tangerine-wallet-browser-c2b8dada91c90788dcd81a0318c52a66b4b769d1.tar.lz tangerine-wallet-browser-c2b8dada91c90788dcd81a0318c52a66b4b769d1.tar.xz tangerine-wallet-browser-c2b8dada91c90788dcd81a0318c52a66b4b769d1.tar.zst tangerine-wallet-browser-c2b8dada91c90788dcd81a0318c52a66b4b769d1.zip |
Add eth_signTypedData handler
Diffstat (limited to 'ui/lib')
-rw-r--r-- | ui/lib/tx-helper.js | 13 |
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 |