[Bugfix] Fix back-navigation trap in Electrum Seeds entry flow - #960
Open
PROWLERx15 wants to merge 5 commits into
Open
[Bugfix] Fix back-navigation trap in Electrum Seeds entry flow#960PROWLERx15 wants to merge 5 commits into
PROWLERx15 wants to merge 5 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR fixes a back-navigation trap in the Electrum Seed entry flow and adds new FlowTests which cover backing out of Electrum Seed entry from all possible entry points.
Problem or Issue being addressed
When entering an Electrum seed, the user is first shown a Warning screen (
SeedElectrumMnemonicStartView) explaining that some features are disabled. This screen explicitly disables the back button.However, when navigating forward to the keyboard entry, the
SeedElectrumMnemonicStartViewdid not setskip_current_view=True. As a result, the Warning screen was preserved in the back stack. If a user started typing their seed but then decided to goBACKto cancel, they would be navigated back into the Warning screen. Since the Warning screen has no back button, the user is trapped and forced to reboot the device or complete the seed entry flow.Solution
Modified the
SeedElectrumMnemonicStartViewand setskip_current_view=True.This safely omits the Warning screen from the back stack, allowing the mnemonic keyboard's
BACKbutton to correctly route the user back to the previous screen. I've also added new FlowTests to verify the changes.Additional Information
This bug can be reproduced using these flows:
Screenshots
This pull request is categorized as a:
Checklist
I ran
pytestlocallyI included screenshots of any new or modified screens
Should be part of the PR description above.
I added or updated tests
Any new or altered functionality should be covered in a unit test. Any new or updated sequences require FlowTests.
I tested this PR hands-on on the following platform(s):
I have reviewed these notes: