diff options
Diffstat (limited to 'ui/app/components/pages/first-time-flow/first-time-flow.component.js')
-rw-r--r-- | ui/app/components/pages/first-time-flow/first-time-flow.component.js | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/ui/app/components/pages/first-time-flow/first-time-flow.component.js b/ui/app/components/pages/first-time-flow/first-time-flow.component.js index cde077803..82308dda2 100644 --- a/ui/app/components/pages/first-time-flow/first-time-flow.component.js +++ b/ui/app/components/pages/first-time-flow/first-time-flow.component.js @@ -3,17 +3,19 @@ import PropTypes from 'prop-types' import { Switch, Route } from 'react-router-dom' import FirstTimeFlowSwitch from './first-time-flow-switch' import Welcome from './welcome' +import SelectAction from './select-action' +import EndOfFlow from './end-of-flow' import Unlock from '../unlock-page' import CreatePassword from './create-password' -import Notices from './notices' import SeedPhrase from './seed-phrase' import { DEFAULT_ROUTE, INITIALIZE_WELCOME_ROUTE, INITIALIZE_CREATE_PASSWORD_ROUTE, - INITIALIZE_NOTICE_ROUTE, INITIALIZE_SEED_PHRASE_ROUTE, INITIALIZE_UNLOCK_ROUTE, + INITIALIZE_SELECT_ACTION_ROUTE, + INITIALIZE_END_OF_FLOW_ROUTE, } from '../../../routes' export default class FirstTimeFlow extends PureComponent { @@ -24,7 +26,6 @@ export default class FirstTimeFlow extends PureComponent { history: PropTypes.object, isInitialized: PropTypes.bool, isUnlocked: PropTypes.bool, - noActiveNotices: PropTypes.bool, unlockAccount: PropTypes.func, } @@ -70,14 +71,12 @@ export default class FirstTimeFlow extends PureComponent { } handleUnlock = async password => { - const { unlockAccount, history, noActiveNotices } = this.props + const { unlockAccount, history } = this.props try { const seedPhrase = await unlockAccount(password) this.setState({ seedPhrase }, () => { - noActiveNotices - ? history.push(INITIALIZE_SEED_PHRASE_ROUTE) - : history.push(INITIALIZE_NOTICE_ROUTE) + history.push(INITIALIZE_SEED_PHRASE_ROUTE) }) } catch (error) { throw new Error(error.message) @@ -100,26 +99,21 @@ export default class FirstTimeFlow extends PureComponent { )} /> <Route - exact - path={INITIALIZE_NOTICE_ROUTE} - render={props => ( - <Notices - { ...props } - isImportedKeyring={isImportedKeyring} - /> - )} - /> - <Route path={INITIALIZE_CREATE_PASSWORD_ROUTE} render={props => ( <CreatePassword { ...props } + isImportedKeyring={isImportedKeyring} onCreateNewAccount={this.handleCreateNewAccount} onCreateNewAccountFromSeed={this.handleImportWithSeedPhrase} /> )} /> <Route + path={INITIALIZE_SELECT_ACTION_ROUTE} + component={SelectAction} + /> + <Route path={INITIALIZE_UNLOCK_ROUTE} render={props => ( <Unlock @@ -130,6 +124,11 @@ export default class FirstTimeFlow extends PureComponent { /> <Route exact + path={INITIALIZE_END_OF_FLOW_ROUTE} + component={EndOfFlow} + /> + <Route + exact path={INITIALIZE_WELCOME_ROUTE} component={Welcome} /> |