diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2017-12-23 02:43:02 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-23 02:43:02 +0800 |
commit | a218008adf85dfb5fa8ca93c789e14d9f2090813 (patch) | |
tree | 863dd34eed719074277a8c65397d9e5081b2084b /ui/index.js | |
parent | 4acd48966edf2e6cf4ced6e3e0983a44dcb2ec13 (diff) | |
download | tangerine-wallet-browser-a218008adf85dfb5fa8ca93c789e14d9f2090813.tar tangerine-wallet-browser-a218008adf85dfb5fa8ca93c789e14d9f2090813.tar.gz tangerine-wallet-browser-a218008adf85dfb5fa8ca93c789e14d9f2090813.tar.bz2 tangerine-wallet-browser-a218008adf85dfb5fa8ca93c789e14d9f2090813.tar.lz tangerine-wallet-browser-a218008adf85dfb5fa8ca93c789e14d9f2090813.tar.xz tangerine-wallet-browser-a218008adf85dfb5fa8ca93c789e14d9f2090813.tar.zst tangerine-wallet-browser-a218008adf85dfb5fa8ca93c789e14d9f2090813.zip |
Track usage of old and new UI (#2794)
[NewUI] Track usage of old and new UI
Diffstat (limited to 'ui/index.js')
-rw-r--r-- | ui/index.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/index.js b/ui/index.js index 2aa30d3fe..bc3676c1f 100644 --- a/ui/index.js +++ b/ui/index.js @@ -4,6 +4,8 @@ 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 @@ -35,6 +37,10 @@ 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) const numberOfUnapprivedTx = unapprovedTxsAll.length |