aboutsummaryrefslogtreecommitdiffstats
path: root/ui
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
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')
-rw-r--r--ui/app/conf-tx.js5
-rw-r--r--ui/lib/tx-helper.js5
2 files changed, 10 insertions, 0 deletions
diff --git a/ui/app/conf-tx.js b/ui/app/conf-tx.js
index a27219576..646dbb602 100644
--- a/ui/app/conf-tx.js
+++ b/ui/app/conf-tx.js
@@ -47,6 +47,8 @@ ConfirmTxScreen.prototype.render = function () {
var txData = unconfTxList[index] || {}
var txParams = txData.params || {}
var isNotification = isPopupOrNotification() === 'notification'
+
+ log.info(`rendering a combined ${unconfTxList.length} unconf msg & txs`)
if (unconfTxList.length === 0) return null
return (
@@ -120,11 +122,14 @@ function currentTxView (opts) {
const { txData } = opts
const { txParams, msgParams } = txData
+ log.info('rendering current tx view')
if (txParams) {
// This is a pending transaction
+ log.debug('txParams detected, rendering pending tx')
return h(PendingTx, opts)
} else if (msgParams) {
// This is a pending message to sign
+ log.debug('msgParams detected, rendering pending msg')
return h(PendingMsg, opts)
}
}
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)
}