Repository navigation
fix(tools_views): prevent crash when opening address explorer with custom derivation (fixes #1074) - #1075
Open
muskan-creates352 wants to merge 1 commit into
Conversation
…stom derivation (fixes SeedSigner#1074)
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
Problem or Issue being addressed
When navigating to Tools -> Address Explorer, selecting a loaded seed, choosing Custom Derivation, and entering a derivation path, proceeding to the address list resulted in a fatal Red Screen System Error:
System Error Exception: Custom Derivation address explorer not yet implemented tools_views.py, 712, in runInstead of gracefully handling the unimplemented state, an unhandled runtime exception was raised in
ToolsAddressExplorerAddressListView.run(), crashing the main controller loop. A similar unhandled exception was present when encountering a single-sig descriptor inToolsAddressExplorerAddressListView.Fixes #1074
Solution
ToolsAddressExplorerAddressListView(src/seedsigner/views/tools_views.py):raise Exception(_("Custom Derivation address explorer not yet implemented"))with a graceful redirection toDestination(NotYetImplementedView, view_args=dict(text=_("Custom Derivation address explorer not yet implemented"))).raise Exception(_("Single sig descriptors not yet supported"))with a graceful redirection toDestination(NotYetImplementedView, view_args=dict(text=_("Single sig descriptors not yet supported"))).self.loading_screen.stop()in thefinallyblock to ensure UI threads are cleaned up before view transition.Tests (
tests/test_flows_tools.py):test__address_explorer__custom_derivation__redirects_to_not_yet_implemented: End-to-endFlowTestsimulating navigation through Tools -> Address Explorer -> Custom Derivation -> Address Type -> graceful redirection toNotYetImplementedView.test__address_explorer_address_list_view__unsupported_descriptor_redirect: Unit view test verifying graceful redirect when a single-sig descriptor is passed in explorer data.Additional Information
Screenshots
N/A (Flow redirection to existing
NotYetImplementedView).This pull request is categorized as a:
Checklist
I ran
pytestlocallyI included screenshots of any new or modified screens
I added or updated tests
I tested this PR hands-on on the following platform(s):
I have reviewed these notes:
Keep your changes limited in scope.
If you uncover other issues or improvements along the way, ideally submit those as a separate PR.
The more complicated the PR, the harder it is to review, test, and merge.
We appreciate your efforts, but we're a small team of volunteers so PR review can be a very slow process.
Please only "@" mention a contributor if their input is truly needed to enable further progress.
I understand