1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +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:
VSaric 2022-03-25 22:03:49 +01:00 committed by GitHub
parent 2118b4825d
commit 31f0b245c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,8 +21,6 @@ import {
} from '../../helpers/constants/routes';
import {
getCompletedOnboarding,
getIsInitialized,
getIsUnlocked,
getSeedPhraseBackedUp,
} from '../../ducks/metamask/metamask';
import {
@ -54,8 +52,6 @@ export default function OnboardingFlow() {
const currentLocation = useLocation();
const history = useHistory();
const t = useI18nContext();
const isInitialized = useSelector(getIsInitialized);
const isUnlocked = useSelector(getIsUnlocked);
const completedOnboarding = useSelector(getCompletedOnboarding);
const seedPhraseBackedUp = useSelector(getSeedPhraseBackedUp);
const nextRoute = useSelector(getFirstTimeFlowTypeRoute);
@ -63,19 +59,8 @@ export default function OnboardingFlow() {
useEffect(() => {
if (completedOnboarding && seedPhraseBackedUp) {
history.push(DEFAULT_ROUTE);
return;
}
if (isInitialized && !isUnlocked) {
history.push(ONBOARDING_UNLOCK_ROUTE);
}
}, [
history,
completedOnboarding,
isInitialized,
isUnlocked,
seedPhraseBackedUp,
]);
}, [history, completedOnboarding, seedPhraseBackedUp]);
const handleCreateNewAccount = async (password) => {
const newSecretRecoveryPhrase = await dispatch(