1
0
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:
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: {},
};
const initState = {
seedPhraseBackedUp: null,
seedPhraseBackedUp: false,
firstTimeFlowType: null,
completedOnboarding: false,
...opts.initState,

View File

@ -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 }} />;
}

View File

@ -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(

View File

@ -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 }} />;
}