Refactor export flows for multi-account support and QR enhancements - #15
Merged
Conversation
…coordinator exports, and animated QR. - Introduced `AccountExportState` and `AccountSelectorDropdown` to unify account selection logic across `AccountKeysScreen`, `DescriptorsScreen`, and new export screens. - Implemented a "Combined" coordinator export in `CoordinatorExportService` that bundles all supported single-sig and multisig sections into a single JSON payload for Sparrow and Coldcard. - Added `AnimatedQrDisplay` to provide standardized playback controls (pause, manual frame stepping, and frame counter) for large exports using BBQr or BC-UR. - Centralized QR encoding logic for text and JSON payloads into `AnimatedQREncoder`, deduplicating logic between descriptor and coordinator export paths. - Introduced dedicated `NunchukQRScreen` and `SparrowQRScreen` to handle specific coordinator formats with enhanced account and script-type selection. - Extended `Wallet` domain logic and `CoordinatorExportService` to derive keys and generate export records for arbitrary account numbers when the master key is available. - Refactored `ExportMultiSigScreen` and `DescriptorsScreen` to use the new unified account selection and QR display components. Signed-off-by: Gorun Jinian <gorunbh@proton.me>
…olidate UI components and simplify navigation logic. - Unified `NunchukQRScreen` and `SparrowQRScreen` into a single `CoordinatorExportScreen`, using a `SegmentedToggle` to switch between formats and export modes. - Integrated animated QR support for combined Sparrow exports (BBQR/BC-UR) directly into the unified export view, including support for BIP48 multisig keys. - Consolidated security warning dialogs for seed phrase and root key exports into a shared `AlertDialog` logic in `ExportOptionsScreen`, reducing boilerplate. - Refined the sensitive view workflow to follow a consistent "Select Target -> Acknowledge Warning -> Verify Password" sequence. - Optimized memory usage by implementing a `DisposableEffect` to recycle animated QR frames and trigger garbage collection when leaving export screens. - Cleaned up the `Wallet` domain model and `AppNavigation` by removing redundant export methods and obsolete navigation routes. - Updated `CoordinatorExportScreen` to provide real-time verification details (fingerprint, path, first address) that dynamically update based on the selected account and format. Signed-off-by: Gorun Jinian <gorunbh@proton.me>
…s display and refined the coordinator export metadata.
- Created `AddressFormatter` utility to centralize address truncation logic, adding support for 5-character grouping and `AnnotatedString` styling to bold first/last segments for easier verification.
- Refactored `AddressesScreen` and `CoordinatorExportScreen` to use the new centralized formatting utility.
- Updated `CoordinatorExportService` to use technical network identifiers ("mainnet", "testnet4") instead of descriptive names, ensuring consistency in exported data and unit tests.
Signed-off-by: Gorun Jinian <gorunbh@proton.me>
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.
AccountExportStateandAccountSelectorDropdownto unify account selection logic acrossAccountKeysScreen,DescriptorsScreen, and new export screens.CoordinatorExportServicethat bundles all supported single-sig and multisig sections into a single JSON payload for Sparrow and Coldcard.AnimatedQrDisplayto provide standardized playback controls (pause, manual frame stepping, and frame counter) for large exports using BBQr or BC-UR.AnimatedQREncoder, deduplicating logic between descriptor and coordinator export paths.NunchukQRScreenandSparrowQRScreento handle specific coordinator formats with enhanced account and script-type selection (now merged into one)Walletdomain logic andCoordinatorExportServiceto derive keys and generate export records for arbitrary account numbers when the master key is available.ExportMultiSigScreenandDescriptorsScreento use the new unified account selection and QR display components.