1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 09:52:26 +01:00

Changed seedPhraseBackedUp to always a boolean

This commit is contained in:
Zachary Belford 2022-06-02 09:39:17 -07:00
parent 5c93ca44da
commit 3665c3718d
No known key found for this signature in database
GPG Key ID: CC6C9E5B7B8D6059
4 changed files with 7 additions and 7 deletions

View File

@ -27,7 +27,7 @@ export default class OnboardingController {
onboardingTabs: {}, onboardingTabs: {},
}; };
const initState = { const initState = {
seedPhraseBackedUp: null, seedPhraseBackedUp: false,
firstTimeFlowType: null, firstTimeFlowType: null,
completedOnboarding: false, completedOnboarding: false,
...opts.initState, ...opts.initState,

View File

@ -34,7 +34,7 @@ export default class FirstTimeFlowSwitch extends PureComponent {
return <Redirect to={{ pathname: DEFAULT_ROUTE }} />; return <Redirect to={{ pathname: DEFAULT_ROUTE }} />;
} }
if (seedPhraseBackedUp !== null) { if (seedPhraseBackedUp) {
return <Redirect to={{ pathname: INITIALIZE_END_OF_FLOW_ROUTE }} />; return <Redirect to={{ pathname: INITIALIZE_END_OF_FLOW_ROUTE }} />;
} }

View File

@ -15,7 +15,7 @@ describe('FirstTimeFlowSwitch', () => {
completedOnboarding: null, completedOnboarding: null,
isInitialized: null, isInitialized: null,
isUnlocked: null, isUnlocked: null,
seedPhraseBackedUp: null, seedPhraseBackedUp: false,
}; };
const wrapper = mountWithRouter( const wrapper = mountWithRouter(
<FirstTimeFlowSwitch.WrappedComponent {...props} />, <FirstTimeFlowSwitch.WrappedComponent {...props} />,
@ -76,7 +76,7 @@ describe('FirstTimeFlowSwitch', () => {
const props = { const props = {
completedOnboarding: false, completedOnboarding: false,
isUnlocked: true, isUnlocked: true,
seedPhraseBackedUp: null, seedPhraseBackedUp: false,
}; };
const wrapper = mountWithRouter( const wrapper = mountWithRouter(
@ -93,7 +93,7 @@ describe('FirstTimeFlowSwitch', () => {
completedOnboarding: false, completedOnboarding: false,
isUnlocked: false, isUnlocked: false,
isInitialized: false, isInitialized: false,
seedPhraseBackedUp: null, seedPhraseBackedUp: false,
}; };
const wrapper = mountWithRouter( const wrapper = mountWithRouter(
@ -112,7 +112,7 @@ describe('FirstTimeFlowSwitch', () => {
completedOnboarding: false, completedOnboarding: false,
isUnlocked: false, isUnlocked: false,
isInitialized: true, isInitialized: true,
seedPhraseBackedUp: null, seedPhraseBackedUp: false,
}; };
const wrapper = mountWithRouter( const wrapper = mountWithRouter(

View File

@ -31,7 +31,7 @@ export default function OnboardingFlowSwitch() {
return <Redirect to={{ pathname: DEFAULT_ROUTE }} />; return <Redirect to={{ pathname: DEFAULT_ROUTE }} />;
} }
if (seedPhraseBackedUp !== null) { if (seedPhraseBackedUp) {
return <Redirect to={{ pathname: ONBOARDING_COMPLETION_ROUTE }} />; return <Redirect to={{ pathname: ONBOARDING_COMPLETION_ROUTE }} />;
} }