aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts
diff options
context:
space:
mode:
authorAlexander Tseung <alextsg@gmail.com>2018-01-10 08:45:39 +0800
committerChi Kei Chan <chikeichan@gmail.com>2018-01-13 05:39:26 +0800
commitbdcee058dc278c46c828f376476f121417481385 (patch)
tree0e84049acea9f14c82d0c02763935e3020486da1 /app/scripts
parent5c1dcf3e9bdb317dd8b42aadb18657eb4bfa2e0f (diff)
downloadtangerine-wallet-browser-bdcee058dc278c46c828f376476f121417481385.tar
tangerine-wallet-browser-bdcee058dc278c46c828f376476f121417481385.tar.gz
tangerine-wallet-browser-bdcee058dc278c46c828f376476f121417481385.tar.bz2
tangerine-wallet-browser-bdcee058dc278c46c828f376476f121417481385.tar.lz
tangerine-wallet-browser-bdcee058dc278c46c828f376476f121417481385.tar.xz
tangerine-wallet-browser-bdcee058dc278c46c828f376476f121417481385.tar.zst
tangerine-wallet-browser-bdcee058dc278c46c828f376476f121417481385.zip
Fix styling in initialization
Diffstat (limited to 'app/scripts')
-rw-r--r--app/scripts/popup.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/scripts/popup.js b/app/scripts/popup.js
index d0952af6a..97a29fb1a 100644
--- a/app/scripts/popup.js
+++ b/app/scripts/popup.js
@@ -26,8 +26,13 @@ const container = document.getElementById('app-content')
startPopup({ container, connectionStream }, (err, store) => {
if (err) return displayCriticalError(err)
- let betaUIState = store.getState().metamask.featureFlags.betaUI
- let css = betaUIState ? NewMetaMaskUiCss() : OldMetaMaskUiCss()
+ const { isMascara, identities = {}, featureFlags = {} } = store.getState().metamask
+ const firstTime = Object.keys(identities).length === 0
+ let betaUIState = featureFlags.betaUI
+
+ const useBetaCss = isMascara || firstTime || betaUIState
+
+ let css = useBetaCss ? NewMetaMaskUiCss() : OldMetaMaskUiCss()
let deleteInjectedCss = injectCss(css)
let newBetaUIState