[Enhancement] Specific ScanView
child classes to limit acceptable QR types
#333
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.
Aside from the
MainMenuView
's "Scan" option, all otherScanView
calls are expecting a specific type of QR code (e.g. "Scan a PSBT") but nothing is stoppingScanView
from accepting an unexpected but supported QR type.This PR:
adds specific
ScanView
child classes that display an error screen if the user scans an unexpected QR type.displays a friendlier error screen when an invalid or unrecognized QR format is scanned (the current approach just raises an
Exception
and makes it look like a bug in SeedSigner).promotes "Verify address" to the Tools menu. Previously it was a kind of hidden feature that would be activated if a bitcoin address was scanned by
ScanView
.Testing notes
If a user scans the wrong kind of QR, verify that they get another chance to resume their task and scan again.