1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00
metamask-extension/ui/app/pages/first-time-flow/first-time-flow.selectors.js
2019-12-05 10:23:43 -10:00

27 lines
596 B
JavaScript

import {
INITIALIZE_CREATE_PASSWORD_ROUTE,
INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE,
DEFAULT_ROUTE,
} from '../../helpers/constants/routes'
const selectors = {
getFirstTimeFlowTypeRoute,
}
module.exports = selectors
function getFirstTimeFlowTypeRoute (state) {
const { firstTimeFlowType } = state.metamask
let nextRoute
if (firstTimeFlowType === 'create') {
nextRoute = INITIALIZE_CREATE_PASSWORD_ROUTE
} else if (firstTimeFlowType === 'import') {
nextRoute = INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE
} else {
nextRoute = DEFAULT_ROUTE
}
return nextRoute
}