You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
596 B
27 lines
596 B
6 years ago
|
import {
|
||
|
INITIALIZE_CREATE_PASSWORD_ROUTE,
|
||
|
INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE,
|
||
|
DEFAULT_ROUTE,
|
||
6 years ago
|
} from '../../helpers/constants/routes'
|
||
6 years ago
|
|
||
|
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
|
||
|
}
|