From 6f86c5f8ee6779eddfde1fbc32e356bbc80708f3 Mon Sep 17 00:00:00 2001 From: Frankie Date: Thu, 8 Sep 2016 12:56:04 -0700 Subject: Add network checks for unconfirmed Txs --- ui/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ui/index.js') diff --git a/ui/index.js b/ui/index.js index 8cf74f6ee..0cd6ac735 100644 --- a/ui/index.js +++ b/ui/index.js @@ -3,7 +3,7 @@ const h = require('react-hyperscript') const Root = require('./app/root') const actions = require('./app/actions') const configureStore = require('./app/store') - +const txHelper = require('./lib/tx-helper') module.exports = launchApp function launchApp (opts) { @@ -34,7 +34,8 @@ function startApp (metamaskState, accountManager, opts) { }) // if unconfirmed txs, start on txConf page - if (Object.keys(metamaskState.unconfTxs || {}).length) { + var unconfirmedTxsAll = txHelper(metamaskState.unconfTxs, metamaskState.unconfMsgs, metamaskState.network) + if (unconfirmedTxsAll > 0) { store.dispatch(actions.showConfTxPage()) } -- cgit v1.2.3 From ece1ecb90b6b013b5ea6f81de562d4a391d0f700 Mon Sep 17 00:00:00 2001 From: Frankie Date: Thu, 8 Sep 2016 14:53:49 -0700 Subject: Fix wording in changelog and bug --- ui/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ui/index.js') diff --git a/ui/index.js b/ui/index.js index 0cd6ac735..0e69b00d6 100644 --- a/ui/index.js +++ b/ui/index.js @@ -35,7 +35,7 @@ function startApp (metamaskState, accountManager, opts) { // if unconfirmed txs, start on txConf page var unconfirmedTxsAll = txHelper(metamaskState.unconfTxs, metamaskState.unconfMsgs, metamaskState.network) - if (unconfirmedTxsAll > 0) { + if (unconfirmedTxsAll.length > 0) { store.dispatch(actions.showConfTxPage()) } -- cgit v1.2.3