diff options
author | Dan Finlay <dan@danfinlay.com> | 2017-02-23 08:23:13 +0800 |
---|---|---|
committer | Dan Finlay <dan@danfinlay.com> | 2017-02-23 08:30:09 +0800 |
commit | 564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b (patch) | |
tree | 990ef92dfffa47160100553857c1d4da95e33162 /ui/lib | |
parent | 8684fc40c78cb5293d85f751cf3927c14067d343 (diff) | |
download | tangerine-wallet-browser-564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b.tar tangerine-wallet-browser-564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b.tar.gz tangerine-wallet-browser-564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b.tar.bz2 tangerine-wallet-browser-564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b.tar.lz tangerine-wallet-browser-564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b.tar.xz tangerine-wallet-browser-564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b.tar.zst tangerine-wallet-browser-564f920ae0a1be1aa08905f1b4cf6d081e9a5a0b.zip |
Add personal sign actions and template
Diffstat (limited to 'ui/lib')
-rw-r--r-- | ui/lib/tx-helper.js | 13 |
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) } |