mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
27 lines
581 B
JavaScript
27 lines
581 B
JavaScript
|
import {
|
||
|
INITIALIZE_CREATE_PASSWORD_ROUTE,
|
||
|
INITIALIZE_IMPORT_WITH_SEED_PHRASE_ROUTE,
|
||
|
DEFAULT_ROUTE,
|
||
|
} from '../../../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
|
||
|
}
|