aboutsummaryrefslogtreecommitdiffstats
path: root/ui/index.js
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-01-17 10:17:28 +0800
committerAlexander Tseung <alextsg@gmail.com>2018-01-17 10:17:28 +0800
commit81f86cfab6da37f1a87f3243c6a082f8835ab81b (patch)
tree6af56231142544c5983bbe24d74644011596d003 /ui/index.js
parentaa76c5c73c5a9f0507ef69d88a43cf3bee5d60c0 (diff)
parent77eb7b2db692cc40bf5f8e36c5e695e8f82c76ec (diff)
downloadtangerine-wallet-browser-81f86cfab6da37f1a87f3243c6a082f8835ab81b.tar
tangerine-wallet-browser-81f86cfab6da37f1a87f3243c6a082f8835ab81b.tar.gz
tangerine-wallet-browser-81f86cfab6da37f1a87f3243c6a082f8835ab81b.tar.bz2
tangerine-wallet-browser-81f86cfab6da37f1a87f3243c6a082f8835ab81b.tar.lz
tangerine-wallet-browser-81f86cfab6da37f1a87f3243c6a082f8835ab81b.tar.xz
tangerine-wallet-browser-81f86cfab6da37f1a87f3243c6a082f8835ab81b.tar.zst
tangerine-wallet-browser-81f86cfab6da37f1a87f3243c6a082f8835ab81b.zip
Merge branch 'uat' into uat-master-011618
Diffstat (limited to 'ui/index.js')
-rw-r--r--ui/index.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/ui/index.js b/ui/index.js
index ae05cbe67..bc3676c1f 100644
--- a/ui/index.js
+++ b/ui/index.js
@@ -4,11 +4,12 @@ const Root = require('./app/root')
const actions = require('./app/actions')
const configureStore = require('./app/store')
const txHelper = require('./lib/tx-helper')
+const { OLD_UI_NETWORK_TYPE, BETA_UI_NETWORK_TYPE } = require('../app/scripts/config').enums
+
global.log = require('loglevel')
module.exports = launchMetamaskUi
-
log.setLevel(global.METAMASK_DEBUG ? 'debug' : 'warn')
function launchMetamaskUi (opts, cb) {
@@ -36,10 +37,17 @@ function startApp (metamaskState, accountManager, opts) {
networkVersion: opts.networkVersion,
})
+ const useBetaUi = metamaskState.featureFlags.betaUI
+ const networkEndpointType = useBetaUi ? BETA_UI_NETWORK_TYPE : OLD_UI_NETWORK_TYPE
+ store.dispatch(actions.setNetworkEndpoints(networkEndpointType))
+
// if unconfirmed txs, start on txConf page
const unapprovedTxsAll = txHelper(metamaskState.unapprovedTxs, metamaskState.unapprovedMsgs, metamaskState.unapprovedPersonalMsgs, metamaskState.unapprovedTypedMessages, metamaskState.network)
- if (unapprovedTxsAll.length > 0) {
- store.dispatch(actions.showConfTxPage())
+ const numberOfUnapprivedTx = unapprovedTxsAll.length
+ if (numberOfUnapprivedTx > 0) {
+ store.dispatch(actions.showConfTxPage({
+ id: unapprovedTxsAll[numberOfUnapprivedTx - 1].id,
+ }))
}
accountManager.on('update', function (metamaskState) {