diff options
author | Dan J Miller <danjm.com@gmail.com> | 2018-01-16 05:23:44 +0800 |
---|---|---|
committer | Alexander Tseung <alextsg@users.noreply.github.com> | 2018-01-16 05:23:44 +0800 |
commit | aa833a09281960bfc0af5032034021c25c26a7fd (patch) | |
tree | 88a3c55b1eecd082a73b87a86c5c3d0c00dbde02 /ui/app | |
parent | b42baacdf4683be560c5632752347eadf77f1d0f (diff) | |
download | tangerine-wallet-browser-aa833a09281960bfc0af5032034021c25c26a7fd.tar tangerine-wallet-browser-aa833a09281960bfc0af5032034021c25c26a7fd.tar.gz tangerine-wallet-browser-aa833a09281960bfc0af5032034021c25c26a7fd.tar.bz2 tangerine-wallet-browser-aa833a09281960bfc0af5032034021c25c26a7fd.tar.lz tangerine-wallet-browser-aa833a09281960bfc0af5032034021c25c26a7fd.tar.xz tangerine-wallet-browser-aa833a09281960bfc0af5032034021c25c26a7fd.tar.zst tangerine-wallet-browser-aa833a09281960bfc0af5032034021c25c26a7fd.zip |
[NewUI] Place all users of extension into old UI (disable auto adding). (#2946)
* Place all users of extension into old UI (disable auto adding).
* Fix lint errors.
Diffstat (limited to 'ui/app')
-rw-r--r-- | ui/app/select-app.js | 53 |
1 files changed, 30 insertions, 23 deletions
diff --git a/ui/app/select-app.js b/ui/app/select-app.js index ac6867aeb..193c98353 100644 --- a/ui/app/select-app.js +++ b/ui/app/select-app.js @@ -9,13 +9,13 @@ const { setFeatureFlag, setNetworkEndpoints } = require('./actions') const { BETA_UI_NETWORK_TYPE } = require('../../app/scripts/config').enums function mapStateToProps (state) { - return { - betaUI: state.metamask.featureFlags.betaUI, - autoAdd: autoAddToBetaUI(state), - isUnlocked: state.metamask.isUnlocked, - isMascara: state.metamask.isMascara, - firstTime: Object.keys(state.metamask.identities).length === 0, - } + return { + betaUI: state.metamask.featureFlags.betaUI, + autoAdd: autoAddToBetaUI(state), + isUnlocked: state.metamask.isUnlocked, + isMascara: state.metamask.isMascara, + firstTime: Object.keys(state.metamask.identities).length === 0, + } } function mapDispatchToProps (dispatch) { @@ -34,28 +34,35 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(SelectedApp) inherits(SelectedApp, Component) function SelectedApp () { - Component.call(this) + Component.call(this) } SelectedApp.prototype.componentWillReceiveProps = function (nextProps) { - const { - isUnlocked, - setFeatureFlagWithModal, - setFeatureFlagWithoutModal, - isMascara, - firstTime, - } = this.props - - if (isMascara || firstTime) { - setFeatureFlagWithoutModal() - } else if (!isUnlocked && nextProps.isUnlocked && (nextProps.autoAdd)) { - setFeatureFlagWithModal() - } + // Code commented out until we begin auto adding users to NewUI + const { + // isUnlocked, + // setFeatureFlagWithModal, + setFeatureFlagWithoutModal, + isMascara, + // firstTime, + } = this.props + + // if (isMascara || firstTime) { + if (isMascara) { + setFeatureFlagWithoutModal() + } + // } else if (!isUnlocked && nextProps.isUnlocked && (nextProps.autoAdd)) { + // setFeatureFlagWithModal() + // } } SelectedApp.prototype.render = function () { - const { betaUI, isMascara, firstTime } = this.props + // Code commented out until we begin auto adding users to NewUI + // const { betaUI, isMascara, firstTime } = this.props + // const Selected = betaUI || isMascara || firstTime ? App : OldApp + + const { betaUI, isMascara } = this.props + const Selected = betaUI || isMascara ? App : OldApp - const Selected = betaUI || isMascara || firstTime ? App : OldApp return h(Selected) } |