mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-26 20:39:08 +01:00
Fixed issue where the "lock screen" shows up briefly between the "create password" screen and the success screen (#14111)
Co-authored-by: Alex Donesky <adonesky@gmail.com>
This commit is contained in:
parent
2118b4825d
commit
31f0b245c3
@ -21,8 +21,6 @@ import {
|
|||||||
} from '../../helpers/constants/routes';
|
} from '../../helpers/constants/routes';
|
||||||
import {
|
import {
|
||||||
getCompletedOnboarding,
|
getCompletedOnboarding,
|
||||||
getIsInitialized,
|
|
||||||
getIsUnlocked,
|
|
||||||
getSeedPhraseBackedUp,
|
getSeedPhraseBackedUp,
|
||||||
} from '../../ducks/metamask/metamask';
|
} from '../../ducks/metamask/metamask';
|
||||||
import {
|
import {
|
||||||
@ -54,8 +52,6 @@ export default function OnboardingFlow() {
|
|||||||
const currentLocation = useLocation();
|
const currentLocation = useLocation();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const t = useI18nContext();
|
const t = useI18nContext();
|
||||||
const isInitialized = useSelector(getIsInitialized);
|
|
||||||
const isUnlocked = useSelector(getIsUnlocked);
|
|
||||||
const completedOnboarding = useSelector(getCompletedOnboarding);
|
const completedOnboarding = useSelector(getCompletedOnboarding);
|
||||||
const seedPhraseBackedUp = useSelector(getSeedPhraseBackedUp);
|
const seedPhraseBackedUp = useSelector(getSeedPhraseBackedUp);
|
||||||
const nextRoute = useSelector(getFirstTimeFlowTypeRoute);
|
const nextRoute = useSelector(getFirstTimeFlowTypeRoute);
|
||||||
@ -63,19 +59,8 @@ export default function OnboardingFlow() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (completedOnboarding && seedPhraseBackedUp) {
|
if (completedOnboarding && seedPhraseBackedUp) {
|
||||||
history.push(DEFAULT_ROUTE);
|
history.push(DEFAULT_ROUTE);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
}, [history, completedOnboarding, seedPhraseBackedUp]);
|
||||||
if (isInitialized && !isUnlocked) {
|
|
||||||
history.push(ONBOARDING_UNLOCK_ROUTE);
|
|
||||||
}
|
|
||||||
}, [
|
|
||||||
history,
|
|
||||||
completedOnboarding,
|
|
||||||
isInitialized,
|
|
||||||
isUnlocked,
|
|
||||||
seedPhraseBackedUp,
|
|
||||||
]);
|
|
||||||
|
|
||||||
const handleCreateNewAccount = async (password) => {
|
const handleCreateNewAccount = async (password) => {
|
||||||
const newSecretRecoveryPhrase = await dispatch(
|
const newSecretRecoveryPhrase = await dispatch(
|
||||||
|
Loading…
Reference in New Issue
Block a user