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

Message signing network mismatch bugfix; OptionDisabledView bugfix #443

Merged

Conversation

kdmukai
Copy link
Contributor

@kdmukai kdmukai commented Aug 16, 2023

Message signing was already checking for "Network Mismatch" if a user was configured for MAINNET in Settings but scanned in a signmessage QR with a TESTNET/REGTEST derivation path specified.

However, it was not checking the opposite: Settings configured for TESTNET or REGTEST but scan in a signmessage QR for MAINNET.

Second bug: When message signing is disabled in Settings, the OptionDisabledView appears but then did not return any values, resulting in a second error screen.

This PR:

  • Adds that opposite check (Settings configured for TESTNET/REGTEST, signmessage QR for MAINNET).
  • Moves the network check to be as early as possible in the flow.
  • Updates the test_sign_message_network_mismatch_flow to test for all possible network mismatches and DRY-ifies it for internal reuse.
  • Adds option on OptionDisabledView to jump straight to the relevant Settings update.
  • Moves message signing-related decision logic out of ScanView and into SeedSignMessageStartView
  • Adds OptionDisabledView to screenshot generator.
  • Adds test for sign message being disabled.

OptionDisabledView

@kdmukai kdmukai changed the title Message signing network mismatch bugfix Message signing network mismatch bugfix; OptionDisabledView bugfix Aug 18, 2023
@newtonick newtonick added this to the 0.7.0 milestone Aug 21, 2023
@newtonick newtonick added the bug Something isn't working label Aug 21, 2023
@newtonick
Copy link
Collaborator

ACK and tested

@newtonick newtonick merged commit cf1797f into SeedSigner:dev Aug 22, 2023
@kdmukai kdmukai deleted the message_signing_network_mismatch_bugfix branch September 2, 2024 13:58
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
Development

Successfully merging this pull request may close these issues.

2 participants