From c4812b3452da96c0196da4ea39ac3080b59078cb Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 15 Jul 2016 17:47:58 -0700 Subject: [PATCH 1/3] Triage a strange undefined balance error --- ui/app/components/pending-tx-details.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/app/components/pending-tx-details.js b/ui/app/components/pending-tx-details.js index a6f72a89b..2fb0eae3f 100644 --- a/ui/app/components/pending-tx-details.js +++ b/ui/app/components/pending-tx-details.js @@ -28,7 +28,8 @@ PTXP.render = function () { var txParams = txData.txParams || {} var address = txParams.from || props.selectedAddress var identity = props.identities[address] || { address: address } - var balance = props.accounts[address].balance + var account = props.accounts[address] + var balance = account ? account.balance : '0x0' var gasCost = new BN(ethUtil.stripHexPrefix(txParams.gas || txData.estimatedGas), 16) var gasPrice = new BN(ethUtil.stripHexPrefix(txParams.gasPrice || '0x4a817c800'), 16) From 203a56fb92dd51d41fa9dbc145ba5a912f27c6db Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 15 Jul 2016 17:51:37 -0700 Subject: [PATCH 2/3] Add ui state logging function Now from the UI console, you can always call `logState()`, and it will print the state stringified into the console, ready to drop into the ui dev mode states folder, or other inspection. This should make it easier to diagnose user bugs in the future. --- ui/app/reducers.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/app/reducers.js b/ui/app/reducers.js index 9243ddba4..a691cf614 100644 --- a/ui/app/reducers.js +++ b/ui/app/reducers.js @@ -7,6 +7,8 @@ const reduceIdentities = require('./reducers/identities') const reduceMetamask = require('./reducers/metamask') const reduceApp = require('./reducers/app') +window.METAMASK_CACHED_LOG_STATE = null + module.exports = rootReducer function rootReducer (state, action) { @@ -35,5 +37,11 @@ function rootReducer (state, action) { state.appState = reduceApp(state, action) + window.METAMASK_CACHED_LOG_STATE = state return state } + +window.logState = function() { + var stateString = JSON.stringify(window.METAMASK_CACHED_LOG_STATE, null, 2) + console.log(stateString) +} From 2697e1ba95924014323e320ec5c81a6056d1191d Mon Sep 17 00:00:00 2001 From: Dan Finlay Date: Fri, 15 Jul 2016 17:53:31 -0700 Subject: [PATCH 3/3] Bump changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index faaa3138c..4e67df837 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Current Master +- Fixed bug that would prevent the plugin from reopening on the first try after receiving a new transaction while locked. + ## 2.6.1 2016-07-13 - Fix tool tips on Eth balance to show the 6 decimals