Skip to content

fix(seed_views): prevent crash when exporting multisig xpub with taproot (fixes #982) - #1068

Open
muskan-creates352 wants to merge 1 commit into
SeedSigner:devfrom
muskan-creates352:prevent-multisig-taproot-crash
Open

muskan-creates352 wants to merge 1 commit into
SeedSigner:devfrom
muskan-creates352:prevent-multisig-taproot-crash

Conversation

@muskan-creates352

Copy link
Copy Markdown

Fixes #982

###Description

In 0.8.7, attempting to export a Multisig extended public key (Export Xpub -> Multisig) allows users to select Taproot as a script type if Taproot is enabled in Settings. However, Taproot multisig standard derivation is not yet implemented in SeedSigner (BIP-48 only defines script types 1' for nested segwit and 2' for native segwit).

When selected, SeedSigner proceeds through the QR format and privacy warning screens, and then fatally crashes on SeedExportXpubDetailsView with a Red Screen System Error:

Exception: embit_utils.py, 53, in get_standard_derivation_path Taproot multisig not yet supported

Changes Made

  1. SeedExportXpubScriptTypeView:
    • Filtered out SettingsConstants.TAPROOT from available standard script types when self.sig_type == SettingsConstants.MULTISIG.
    • Handled edge case where all enabled multisig script types are disabled in Settings by gracefully redirecting to NotYetImplementedView rather than presenting an empty list or crashing.
    • Handled single available script type auto-advancement correctly when Taproot is filtered out for multisig.
  2. SeedExportXpubDetailsView:
    • Wrapped embit_utils.get_standard_derivation_path() in defensive exception handling to redirect to NotYetImplementedView rather than bubbling up an unhandled exception to the main controller loop.
  3. Tests (tests/test_flows_seed.py):
    • Added test_export_xpub_multisig_excludes_taproot: verified that selecting Taproot for multisig raises FlowTestInvalidButtonDataSelectionException because Taproot is omitted from the button options.
    • Added test_export_xpub_multisig_when_only_taproot_enabled: verified graceful redirection to NotYetImplementedView.
    • Added test_export_xpub_details_unsupported_path_handling: verified graceful handling of unsupported paths in SeedExportXpubDetailsView.

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.

Can't export Multisig Taproot xpub - "embit_utils.py, 53, in get_standard_derivation_path"

1 participant