diff --git a/app/scripts/controllers/preferences.js b/app/scripts/controllers/preferences.js index acf952bb1..86c9517f5 100644 --- a/app/scripts/controllers/preferences.js +++ b/app/scripts/controllers/preferences.js @@ -55,7 +55,6 @@ class PreferencesController { useNativeCurrencyAsPrimaryCurrency: true, }, completedOnboarding: false, - completedUiMigration: true, metaMetricsId: null, metaMetricsSendCount: 0, }, opts.initState) @@ -613,14 +612,6 @@ class PreferencesController { return Promise.resolve(true) } - /** - * Sets the {@code completedUiMigration} state to {@code true}, indicating that the user has completed the UI switch. - */ - completeUiMigration () { - this.store.updateState({ completedUiMigration: true }) - return Promise.resolve(true) - } - // // PRIVATE METHODS // diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 0b6f5fcb5..393154c60 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -454,7 +454,6 @@ module.exports = class MetamaskController extends EventEmitter { setAccountLabel: nodeify(preferencesController.setAccountLabel, preferencesController), setFeatureFlag: nodeify(preferencesController.setFeatureFlag, preferencesController), setPreference: nodeify(preferencesController.setPreference, preferencesController), - completeUiMigration: nodeify(preferencesController.completeUiMigration, preferencesController), completeOnboarding: nodeify(preferencesController.completeOnboarding, preferencesController), addKnownMethodData: nodeify(preferencesController.addKnownMethodData, preferencesController), diff --git a/development/states/confirm-new-ui.json b/development/states/confirm-new-ui.json index c9340fc8f..dfa4170bb 100644 --- a/development/states/confirm-new-ui.json +++ b/development/states/confirm-new-ui.json @@ -134,7 +134,6 @@ "useNativeCurrencyAsPrimaryCurrency": true, "showFiatInTestnets": true }, - "completedUiMigration": true, "frequentRpcListDetail": [] }, "appState": { diff --git a/development/states/confirm-sig-requests.json b/development/states/confirm-sig-requests.json index d531b2ef7..e7658aa29 100644 --- a/development/states/confirm-sig-requests.json +++ b/development/states/confirm-sig-requests.json @@ -157,7 +157,6 @@ "preferences": { "useNativeCurrencyAsPrimaryCurrency": true }, - "completedUiMigration": true, "frequentRpcListDetail": [] }, "appState": { diff --git a/development/states/currency-localization.json b/development/states/currency-localization.json index a9a37ecd0..f9cfddb73 100644 --- a/development/states/currency-localization.json +++ b/development/states/currency-localization.json @@ -116,7 +116,6 @@ "useNativeCurrencyAsPrimaryCurrency": true, "showFiatInTestnets": true }, - "completedUiMigration": true, "frequentRpcListDetail": [] }, "appState": { diff --git a/development/states/send-edit.json b/development/states/send-edit.json index 7c7e8f097..df97e1ef5 100644 --- a/development/states/send-edit.json +++ b/development/states/send-edit.json @@ -138,7 +138,6 @@ "useNativeCurrencyAsPrimaryCurrency": true, "showFiatInTestnets": true }, - "completedUiMigration": true, "frequentRpcListDetail": [] }, "appState": { diff --git a/development/states/send-new-ui.json b/development/states/send-new-ui.json index 75982f318..545bd532d 100644 --- a/development/states/send-new-ui.json +++ b/development/states/send-new-ui.json @@ -117,7 +117,6 @@ "useNativeCurrencyAsPrimaryCurrency": true, "showFiatInTestnets": true }, - "completedUiMigration": true, "frequentRpcListDetail": [] }, "appState": { diff --git a/development/states/tx-list-items.json b/development/states/tx-list-items.json index 4190ee149..e3f91ad0e 100644 --- a/development/states/tx-list-items.json +++ b/development/states/tx-list-items.json @@ -1059,7 +1059,6 @@ "preferences": { "useNativeCurrencyAsPrimaryCurrency": true }, - "completedUiMigration": true, "frequentRpcListDetail": [] }, "appState": { diff --git a/ui/app/components/app/index.scss b/ui/app/components/app/index.scss index e9bb4ac9f..c8516c91c 100644 --- a/ui/app/components/app/index.scss +++ b/ui/app/components/app/index.scss @@ -77,5 +77,3 @@ @import 'gas-customization/index'; @import 'gas-customization/gas-price-button-group/index'; - -@import 'ui-migration-annoucement/index'; diff --git a/ui/app/components/app/ui-migration-annoucement/index.js b/ui/app/components/app/ui-migration-annoucement/index.js deleted file mode 100644 index c6c8cc619..000000000 --- a/ui/app/components/app/ui-migration-annoucement/index.js +++ /dev/null @@ -1 +0,0 @@ -export {default} from './ui-migration-announcement.container' diff --git a/ui/app/components/app/ui-migration-annoucement/index.scss b/ui/app/components/app/ui-migration-annoucement/index.scss deleted file mode 100644 index 6138a3079..000000000 --- a/ui/app/components/app/ui-migration-annoucement/index.scss +++ /dev/null @@ -1,22 +0,0 @@ -.ui-migration-announcement { - position: absolute; - z-index: 9999; - width: 100vw; - height: 100vh; - display: flex; - flex-direction: column; - align-items: center; - background: $white; - - p { - box-sizing: border-box; - padding: 1em; - font-size: 12pt; - } - - p:last-of-type { - cursor: pointer; - text-decoration: underline; - font-weight: bold; - } -} diff --git a/ui/app/components/app/ui-migration-annoucement/ui-migration-annoucement.component.js b/ui/app/components/app/ui-migration-annoucement/ui-migration-annoucement.component.js deleted file mode 100644 index 7a4124972..000000000 --- a/ui/app/components/app/ui-migration-annoucement/ui-migration-annoucement.component.js +++ /dev/null @@ -1,33 +0,0 @@ -import PropTypes from 'prop-types' -import React, {PureComponent} from 'react' - -export default class UiMigrationAnnouncement extends PureComponent { - static contextTypes = { - t: PropTypes.func.isRequired, - } - - static defaultProps = { - shouldShowAnnouncement: true, - }; - - static propTypes = { - onClose: PropTypes.func.isRequired, - shouldShowAnnouncement: PropTypes.bool, - } - - render () { - const { t } = this.context - const { onClose, shouldShowAnnouncement } = this.props - - if (!shouldShowAnnouncement) { - return null - } - - return ( -
-

{t('uiMigrationAnnouncement')}

-

{t('close')}

-
- ) - } -} diff --git a/ui/app/components/app/ui-migration-annoucement/ui-migration-announcement.container.js b/ui/app/components/app/ui-migration-annoucement/ui-migration-announcement.container.js deleted file mode 100644 index 55efd5a44..000000000 --- a/ui/app/components/app/ui-migration-annoucement/ui-migration-announcement.container.js +++ /dev/null @@ -1,21 +0,0 @@ -import { connect } from 'react-redux' -import UiMigrationAnnouncement from './ui-migration-annoucement.component' -import { setCompletedUiMigration } from '../../../store/actions' - -const mapStateToProps = (state) => { - const shouldShowAnnouncement = !state.metamask.completedUiMigration - - return { - shouldShowAnnouncement, - } -} - -const mapDispatchToProps = dispatch => { - return { - onClose () { - dispatch(setCompletedUiMigration()) - }, - } -} - -export default connect(mapStateToProps, mapDispatchToProps)(UiMigrationAnnouncement) diff --git a/ui/app/ducks/metamask/metamask.js b/ui/app/ducks/metamask/metamask.js index 3ca487c1f..64ce064b9 100644 --- a/ui/app/ducks/metamask/metamask.js +++ b/ui/app/ducks/metamask/metamask.js @@ -403,12 +403,6 @@ function reduceMetamask (state, action) { }) } - case actions.COMPLETE_UI_MIGRATION: { - return extend(metamaskState, { - completedUiMigration: true, - }) - } - case actions.SET_FIRST_TIME_FLOW_TYPE: { return extend(metamaskState, { firstTimeFlowType: action.value, diff --git a/ui/app/pages/routes/index.js b/ui/app/pages/routes/index.js index 9eeac2da2..afef0692e 100644 --- a/ui/app/pages/routes/index.js +++ b/ui/app/pages/routes/index.js @@ -24,7 +24,6 @@ import Settings from '../settings' import Authenticated from '../../helpers/higher-order-components/authenticated' import Initialized from '../../helpers/higher-order-components/initialized' import Lock from '../lock' -import UiMigrationAnnouncement from '../../components/app/ui-migration-annoucement' const RestoreVaultPage = require('../keychains/restore-vault').default const RevealSeedConfirmation = require('../keychains/reveal-seed') const MobileSyncPage = require('../mobile-sync') @@ -214,7 +213,6 @@ class Routes extends Component { } }} > - { - dispatch(actions.showLoadingIndication()) - return new Promise((resolve, reject) => { - background.completeUiMigration(err => { - dispatch(actions.hideLoadingIndication()) - - if (err) { - dispatch(actions.displayWarning(err.message)) - return reject(err) - } - - dispatch(actions.completeUiMigration()) - resolve() - }) - }) - } -} - -function completeUiMigration () { - return { - type: actions.COMPLETE_UI_MIGRATION, - } -} - function setNetworkNonce (networkNonce) { return { type: actions.SET_NETWORK_NONCE,