aboutsummaryrefslogtreecommitdiffstats
path: root/ui/lib
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-02-21 15:33:21 +0800
committerDan Finlay <dan@danfinlay.com>2017-02-21 15:33:21 +0800
commit05080d1c50edda0ab59fa9127fa471173d850dc7 (patch)
treed11f25538c51c938ee2350cbf5f9862eb0f07eae /ui/lib
parent838d19e17fb26daadd7f171cc6f0494ce29fe43d (diff)
downloadtangerine-wallet-browser-05080d1c50edda0ab59fa9127fa471173d850dc7.tar
tangerine-wallet-browser-05080d1c50edda0ab59fa9127fa471173d850dc7.tar.gz
tangerine-wallet-browser-05080d1c50edda0ab59fa9127fa471173d850dc7.tar.bz2
tangerine-wallet-browser-05080d1c50edda0ab59fa9127fa471173d850dc7.tar.lz
tangerine-wallet-browser-05080d1c50edda0ab59fa9127fa471173d850dc7.tar.xz
tangerine-wallet-browser-05080d1c50edda0ab59fa9127fa471173d850dc7.tar.zst
tangerine-wallet-browser-05080d1c50edda0ab59fa9127fa471173d850dc7.zip
Fix UI Dev Mode for Tx Approval
The state object had been changed, but our mock states for tx approval were using the old keys. Rather than try to muck about and figure out each and every change, I've re-generated a UI dev state for tx approval, which should help @zanibas on his current project. We can continue adding new dev states as needed from here. If anyone catches a state that doesn't render correctly, it's worth checking if a new snapshot doesn't solve things. Debugged by adding new debugging loggers, and I've left them in place for easier future debugging.
Diffstat (limited to 'ui/lib')
-rw-r--r--ui/lib/tx-helper.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/lib/tx-helper.js b/ui/lib/tx-helper.js
index fa7a94cdc..7f64f9fbe 100644
--- a/ui/lib/tx-helper.js
+++ b/ui/lib/tx-helper.js
@@ -1,8 +1,13 @@
const valuesFor = require('../app/util').valuesFor
module.exports = function (unapprovedTxs, unapprovedMsgs, network) {
+ log.debug('tx-helper called with params:')
+ log.debug({ unapprovedTxs, unapprovedMsgs, network })
+
var 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)
+ log.debug(`tx helper found ${msgValues.length} unsigned messages`)
var allValues = txValues.concat(msgValues)
return allValues.sort(tx => tx.time)
}