Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completes onboarding upon importing seed phrase #8873

Merged
merged 1 commit into from
Jul 27, 2020

Conversation

ryanml
Copy link
Contributor

@ryanml ryanml commented Jun 30, 2020

Fixes: #8679

In the case we assume that the imported phrase is already backed up, onboarding should be completed so users can continue after closing out the "Congratulations!" page.

cc: @danfinlay

@ryanml ryanml requested a review from a team as a code owner June 30, 2020 01:17
@ryanml ryanml dismissed a stale review via eb50e23 June 30, 2020 05:15
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that completeOnboarding is still being called on the final page, so it's now called twice redundantly. It is still needed there for the "Create wallet" flow though I suppose, and calling completeOnboarding twice doesn't seem particularly harmful.

It would be nice to make this same change on the "Create wallet" flow though. Then this bug would be fixed for that flow as well, and we could remove the redundant completeOnboarding call.

@ryanml ryanml dismissed a stale review via c694e4e July 23, 2020 07:35
@ryanml
Copy link
Contributor Author

ryanml commented Jul 23, 2020

@Gudahtt - this is now done for the Create Account flow, and the now redundant call has been removed.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@Gudahtt Gudahtt merged commit d9f07a7 into MetaMask:develop Jul 27, 2020
Gudahtt pushed a commit that referenced this pull request Aug 7, 2020
@metamaskbot metamaskbot mentioned this pull request Aug 7, 2020
Gudahtt added a commit that referenced this pull request Nov 10, 2020
The bug with our onboarding library integration was introduced in #8873
because of a change in when `completeOnboarding` was called. We hadn't
realized at the time that the onboarding integration relied upon the
onboarding completing event to know when the onboarding state should
be cleared. Because onboarding is now marked as completed earlier, the
state was cleared just as it was intended to be used.

The onboarding completed event has been moved back to where it was
before: after the user exits the "end of flow" page.

The original problem that #8873 was addressing was a routing issue,
where the user would be redirected back to the seed phrase confirmation
page despite already having confirmed their seed phrase. This was fixed
in a different way here, by updating the routing in the first time flow
switch to skip straight to the end of flow page if the seed phrase has
already been confirmed.

This does involve one user-facing change in behavior; if the user opens
any MetaMask UI before navigating away from the end-of-flow screen,
they will still be considered mid-onboarding so it'll redirect to the
end-of-flow screen. But we do mark onboarding as completed if the user
closes the tab/window while on the end of flow screen, which was
another goal of #8873.
Gudahtt added a commit that referenced this pull request Nov 10, 2020
The bug with our onboarding library integration was introduced in #8873
because of a change in when `completeOnboarding` was called. We hadn't
realized at the time that the onboarding integration relied upon the
onboarding completing event to know when the onboarding state should
be cleared. Because onboarding is now marked as completed earlier, the
state was cleared just as it was intended to be used.

The onboarding completed event has been moved back to where it was
before: after the user exits the "end of flow" page.

The original problem that #8873 was addressing was a routing issue,
where the user would be redirected back to the seed phrase confirmation
page despite already having confirmed their seed phrase. This was fixed
in a different way here, by updating the routing in the first time flow
switch to skip straight to the end of flow page if the seed phrase has
already been confirmed.

This does involve one user-facing change in behavior; if the user opens
any MetaMask UI before navigating away from the end-of-flow screen,
they will still be considered mid-onboarding so it'll redirect to the
end-of-flow screen. But we do mark onboarding as completed if the user
closes the tab/window while on the end of flow screen, which was
another goal of #8873.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

develop: Importing seed phrase can force user into backup mode
2 participants