Skip to content

fix(tools_views): prevent crash when opening address explorer with custom derivation (fixes #1074) - #1075

Open
muskan-creates352 wants to merge 1 commit into
SeedSigner:devfrom
muskan-creates352:fix-address-explorer-custom-derivation-crash
Open

muskan-creates352 wants to merge 1 commit into
SeedSigner:devfrom
muskan-creates352:fix-address-explorer-custom-derivation-crash

Conversation

@muskan-creates352

Copy link
Copy Markdown

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 run

Instead 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 in ToolsAddressExplorerAddressListView.

Fixes #1074

Solution

  1. ToolsAddressExplorerAddressListView (src/seedsigner/views/tools_views.py):

    • Replaced unhandled raise Exception(_("Custom Derivation address explorer not yet implemented")) with a graceful redirection to Destination(NotYetImplementedView, view_args=dict(text=_("Custom Derivation address explorer not yet implemented"))).
    • Replaced unhandled raise Exception(_("Single sig descriptors not yet supported")) with a graceful redirection to Destination(NotYetImplementedView, view_args=dict(text=_("Single sig descriptors not yet supported"))).
    • Maintained self.loading_screen.stop() in the finally block to ensure UI threads are cleaned up before view transition.
  2. Tests (tests/test_flows_tools.py):

    • Added test__address_explorer__custom_derivation__redirects_to_not_yet_implemented: End-to-end FlowTest simulating navigation through Tools -> Address Explorer -> Custom Derivation -> Address Type -> graceful redirection to NotYetImplementedView.
    • Added 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

  • Zero breaking changes; all standard derivation and multisig descriptor address explorer flows continue to function normally.

Screenshots

N/A (Flow redirection to existing NotYetImplementedView).


This pull request is categorized as a:

  • New feature
  • Bug fix
  • Code refactor
  • Documentation
  • Other

Checklist

I ran pytest locally

  • All tests passed before submitting the PR
  • I couldn't run the tests
  • N/A

I included screenshots of any new or modified screens

  • Yes
  • No
  • N/A

I added or updated tests

  • Yes
  • No, I’m a fool
  • N/A

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Unhandled Exception and Red Screen System Error when opening Address Explorer with Custom Derivation

1 participant