From 48047f81947c28cc21f0fb93fe98a2d308078714 Mon Sep 17 00:00:00 2001 From: kumavis Date: Tue, 12 Mar 2019 21:47:21 +0800 Subject: mascara - remove from project (#6283) --- ui/app/app.js | 2 - ui/app/components/menu-bar/menu-bar.component.js | 47 +++++++++++------------- ui/app/components/menu-bar/menu-bar.container.js | 3 +- ui/app/reducers/metamask.js | 2 - 4 files changed, 23 insertions(+), 31 deletions(-) (limited to 'ui') diff --git a/ui/app/app.js b/ui/app/app.js index b9f6cafe7..efec4e49a 100644 --- a/ui/app/app.js +++ b/ui/app/app.js @@ -312,7 +312,6 @@ App.propTypes = { sidebar: PropTypes.object, alertOpen: PropTypes.bool, hideSidebar: PropTypes.func, - isMascara: PropTypes.bool, isOnboarding: PropTypes.bool, isUnlocked: PropTypes.bool, networkDropdownOpen: PropTypes.bool, @@ -388,7 +387,6 @@ function mapStateToProps (state) { currentView: state.appState.currentView, activeAddress: state.appState.activeAddress, transForward: state.appState.transForward, - isMascara: state.metamask.isMascara, isOnboarding: Boolean(!noActiveNotices || seedWords || !isInitialized), isPopup: state.metamask.isPopup, seedWords: state.metamask.seedWords, diff --git a/ui/app/components/menu-bar/menu-bar.component.js b/ui/app/components/menu-bar/menu-bar.component.js index dfc977d3c..29c56953d 100644 --- a/ui/app/components/menu-bar/menu-bar.component.js +++ b/ui/app/components/menu-bar/menu-bar.component.js @@ -12,7 +12,6 @@ export default class MenuBar extends PureComponent { static propTypes = { hideSidebar: PropTypes.func, - isMascara: PropTypes.bool, sidebarOpen: PropTypes.bool, showSidebar: PropTypes.func, } @@ -21,7 +20,7 @@ export default class MenuBar extends PureComponent { render () { const { t } = this.context - const { isMascara, sidebarOpen, hideSidebar, showSidebar } = this.props + const { sidebarOpen, hideSidebar, showSidebar } = this.props const { accountDetailsMenuOpen } = this.state return ( @@ -45,29 +44,27 @@ export default class MenuBar extends PureComponent { /> - { - !isMascara && ( - -
{ - this.context.metricsEvent({ - eventOpts: { - category: 'Navigation', - action: 'Home', - name: 'Opened Account Options', - }, - }) - this.setState({ accountDetailsMenuOpen: true }) - }} - > -
-
- ) - } + + +
{ + this.context.metricsEvent({ + eventOpts: { + category: 'Navigation', + action: 'Home', + name: 'Opened Account Options', + }, + }) + this.setState({ accountDetailsMenuOpen: true }) + }} + > +
+
+ { accountDetailsMenuOpen && ( { - const { appState: { sidebar: { isOpen }, isMascara } } = state + const { appState: { sidebar: { isOpen } } } = state return { sidebarOpen: isOpen, - isMascara, } } diff --git a/ui/app/reducers/metamask.js b/ui/app/reducers/metamask.js index c1aa20bf7..d4b920748 100644 --- a/ui/app/reducers/metamask.js +++ b/ui/app/reducers/metamask.js @@ -1,6 +1,5 @@ const extend = require('xtend') const actions = require('../actions') -const MetamascaraPlatform = require('../../../app/scripts/platforms/window') const { getEnvironmentType } = require('../../../app/scripts/lib/util') const { ENVIRONMENT_TYPE_POPUP } = require('../../../app/scripts/lib/enums') const { OLD_UI_NETWORK_TYPE } = require('../../../app/scripts/controllers/network/enums') @@ -15,7 +14,6 @@ function reduceMetamask (state, action) { isInitialized: false, isUnlocked: false, isAccountMenuOpen: false, - isMascara: window.platform instanceof MetamascaraPlatform, isPopup: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP, rpcTarget: 'https://rawtestrpc.metamask.io/', identities: {}, -- cgit v1.2.3