diff options
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r-- | ui/app/selectors.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js index 7209f19d1..b518527c9 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors.js @@ -31,6 +31,7 @@ const selectors = { getSelectedTokenToFiatRate, getSelectedTokenContract, autoAddToBetaUI, + getShouldUseNewUi, getSendMaxModeState, getCurrentViewContext, getTotalUnapprovedCount, @@ -185,6 +186,13 @@ function autoAddToBetaUI (state) { return userIsNotInBeta && userPassesThreshold } +function getShouldUseNewUi (state) { + const isAlreadyUsingBetaUi = state.metamask.featureFlags.betaUI + const isMascara = state.metamask.isMascara + const isFreshInstall = Object.keys(state.metamask.identities).length === 0 + return isAlreadyUsingBetaUi || isMascara || isFreshInstall +} + function getCurrentViewContext (state) { const { currentView = {} } = state.appState return currentView.context |