Skip to content

[Refactor] Seed XOR functionality in Seeds Menu, builds on PR #738#885

Open
berlinxray wants to merge 45 commits intoSeedSigner:devfrom
berlinxray:seed-xor-flow-concise
Open

[Refactor] Seed XOR functionality in Seeds Menu, builds on PR #738#885
berlinxray wants to merge 45 commits intoSeedSigner:devfrom
berlinxray:seed-xor-flow-concise

Conversation

@berlinxray
Copy link
Copy Markdown

@berlinxray berlinxray commented Mar 2, 2026

Description

Based on PR #738 (seed-xor-flow) by https://github.com/Advaitgaur004
this applies conciseness improvements:

  • Remove RebuildSeedXORErrorView (redundant wrapper around ErrorView)
  • Remove trivial getters/setters in SeedStorage (use direct attribute access)
  • Merge validate/process controller methods into single process method
  • Simplify shard listing in ViewShards and RemoveShards views
  • Simplify discard-shards logic (reverse iteration, set-based lookup)
  • Remove dead code (unused imports, unreachable error branch, unused var)
  • Extract shared test vectors into seedxor_test_vectors.py
  • Trim verbose docstrings in SeedXORValidator

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

This pull request is categorized as a:

  • Code refactor

Checklist

  • I’ve run pytest and made sure all unit tests pass before submitting the PR

If you modified or added functionality/workflow, did you add new unit tests?

  • Yes

I have tested this PR on the following platforms/os:

Advaitgaur004 and others added 30 commits April 17, 2025 13:39
- View for loading a component key in the SeedXOR rebuild flow.
-  Current combined fingerprint of the SeedXOR components
- View for selecting an existing seed to use as a SeedXOR component.
- View for finalizing the SeedXOR seed.
- put in src/seedsigner/helphers/mnemonic_generation.py
- used in seed_views.py
- fstring removed
- text for xorcancelview changed a bit
- errorview module added for seed_view.py
- Validation logic has been separated from the controller into a dedicated
SeedXORValidator, and the controller's methods now consistently return None on success or an error dictionary on failure. Views are now responsible for handling these results and managing navigation.
Advaitgaur004 and others added 14 commits August 29, 2025 07:06
- Covers the `combine_mnemonics_with_xor` function and the `SeedXORValidator` class, ensuring correctness and robust error handling.
Based on PR SeedSigner#738 (seed-xor-flow), this applies conciseness improvements:

- Remove RebuildSeedXORErrorView (redundant wrapper around ErrorView)
- Remove trivial getters/setters in SeedStorage (use direct attribute access)
- Merge validate/process controller methods into single process method
- Simplify shard listing in ViewShards and RemoveShards views
- Simplify discard-shards logic (reverse iteration, set-based lookup)
- Remove dead code (unused imports, unreachable error branch, unused var)
- Extract shared test vectors into seedxor_test_vectors.py
- Trim verbose docstrings in SeedXORValidator

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@berlinxray berlinxray changed the title Seed xor flow concise [refactor] Seed XOR functionality in Seeds Menu #738 Mar 2, 2026
@berlinxray berlinxray changed the title [refactor] Seed XOR functionality in Seeds Menu #738 [Refactor] Seed XOR functionality in Seeds Menu #738 Mar 2, 2026
@berlinxray berlinxray changed the title [Refactor] Seed XOR functionality in Seeds Menu #738 [Refactor] Seed XOR functionality in Seeds Menu, builds on PR #738 Mar 2, 2026
Resolve merge conflicts to integrate upstream dev branch changes (i18n,
settings cleanup, screen refactors) with the Seed XOR conciseness
refactoring.

Conflict resolutions:
- controller.py: Keep PR's SeedXORValidator import (not needed in upstream)
- mnemonic_generation.py: Keep PR's combine_mnemonics_with_xor and
  generate_mnemonic_from_image (new in PR, not in upstream)
- settings_definition.py: Keep both PR's SEED_XOR and upstream's
  MICROSD_TOAST_TIMER settings
- seed_views.py: Combine PR's LargeIconStatusScreen import with
  upstream's ButtonOptionWithoutTranslation and SpecterLegacyXPubQrEncoder
- components.py: Uncomment CLOSE icon constant used by Seed XOR views

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@berlinxray berlinxray force-pushed the seed-xor-flow-concise branch from feca192 to 196bba3 Compare March 3, 2026 22:01
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.

2 participants