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

[bugfix] Reset state upon reading an invalid QR #460

Merged
merged 2 commits into from
Sep 1, 2023

Conversation

kdmukai
Copy link
Contributor

@kdmukai kdmukai commented Aug 28, 2023

fixes #456

The problem

The BackStack and the Controller.resume_main_flow can create some confusing debugging when an error happens mid-flow.

In this case it was:

  • Load a seed
  • In Seed Options, select Sign Message
  • Scan an invalid QR (not a format recognized by any of our decoders)

That would route you to the ErrorView which would then take you BACK, which routes you to SeedOptionsView. That detected the Controller.resume_main_flow which then routes to SeedSignMessageConfirmMessageView which assumes by that point that all necessary data has been loaded, yielding a second error screen.


The fix

Don't attempt any kind of resumption of flow when an invalid QR is scanned. Just clear and reset the state (Controller.resume_main_flow = None), show ErrorView, and return to the MainMenuView.

This PR adds the above change and a matching new test for that flow.

@kdmukai kdmukai changed the title Reset state upon reading an invalid QR [bugfix] Reset state upon reading an invalid QR Aug 28, 2023
@jdlcdl
Copy link

jdlcdl commented Aug 30, 2023

As of 3a3ac12

ACK tested

@newtonick
Copy link
Collaborator

ACK tested

@newtonick newtonick merged commit 0e26402 into SeedSigner:dev Sep 1, 2023
@newtonick newtonick added the bug Something isn't working label Sep 1, 2023
@kdmukai kdmukai deleted the message_signing_bad_qr_bugfix branch September 2, 2024 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Message signing error handling
3 participants