mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-10-22 19:26:13 +02:00
Changed seedPhraseBackedUp to always a boolean
This commit is contained in:
parent
5c93ca44da
commit
3665c3718d
@ -27,7 +27,7 @@ export default class OnboardingController {
|
||||
onboardingTabs: {},
|
||||
};
|
||||
const initState = {
|
||||
seedPhraseBackedUp: null,
|
||||
seedPhraseBackedUp: false,
|
||||
firstTimeFlowType: null,
|
||||
completedOnboarding: false,
|
||||
...opts.initState,
|
||||
|
@ -34,7 +34,7 @@ export default class FirstTimeFlowSwitch extends PureComponent {
|
||||
return <Redirect to={{ pathname: DEFAULT_ROUTE }} />;
|
||||
}
|
||||
|
||||
if (seedPhraseBackedUp !== null) {
|
||||
if (seedPhraseBackedUp) {
|
||||
return <Redirect to={{ pathname: INITIALIZE_END_OF_FLOW_ROUTE }} />;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ describe('FirstTimeFlowSwitch', () => {
|
||||
completedOnboarding: null,
|
||||
isInitialized: null,
|
||||
isUnlocked: null,
|
||||
seedPhraseBackedUp: null,
|
||||
seedPhraseBackedUp: false,
|
||||
};
|
||||
const wrapper = mountWithRouter(
|
||||
<FirstTimeFlowSwitch.WrappedComponent {...props} />,
|
||||
@ -76,7 +76,7 @@ describe('FirstTimeFlowSwitch', () => {
|
||||
const props = {
|
||||
completedOnboarding: false,
|
||||
isUnlocked: true,
|
||||
seedPhraseBackedUp: null,
|
||||
seedPhraseBackedUp: false,
|
||||
};
|
||||
|
||||
const wrapper = mountWithRouter(
|
||||
@ -93,7 +93,7 @@ describe('FirstTimeFlowSwitch', () => {
|
||||
completedOnboarding: false,
|
||||
isUnlocked: false,
|
||||
isInitialized: false,
|
||||
seedPhraseBackedUp: null,
|
||||
seedPhraseBackedUp: false,
|
||||
};
|
||||
|
||||
const wrapper = mountWithRouter(
|
||||
@ -112,7 +112,7 @@ describe('FirstTimeFlowSwitch', () => {
|
||||
completedOnboarding: false,
|
||||
isUnlocked: false,
|
||||
isInitialized: true,
|
||||
seedPhraseBackedUp: null,
|
||||
seedPhraseBackedUp: false,
|
||||
};
|
||||
|
||||
const wrapper = mountWithRouter(
|
||||
|
@ -31,7 +31,7 @@ export default function OnboardingFlowSwitch() {
|
||||
return <Redirect to={{ pathname: DEFAULT_ROUTE }} />;
|
||||
}
|
||||
|
||||
if (seedPhraseBackedUp !== null) {
|
||||
if (seedPhraseBackedUp) {
|
||||
return <Redirect to={{ pathname: ONBOARDING_COMPLETION_ROUTE }} />;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user