Watch only wallet#565
Open
epicleafies wants to merge 8 commits into
Open
Conversation
Prevent startNodeInitializionThread() from emitting requestedInitialize() more than once. Without this guard, re-entering the wallet creation wizard (which eagerly starts the node in Component.onCompleted) would trigger a second initialization attempt.
Replace anchors.centerIn with explicit left/right/verticalCenter anchoring on the badge's RowLayouts, removing the implicit width constraint from contentItem. Add text elision so long wallet names are truncated rather than overflowing.
Replace the direct "Create wallet" → CreateIntro routing with a new wallet type selector page that offers Regular, Watch-only, Import, Multi-key (disabled), and Custom (disabled) options. Add the full watch-only wallet creation flow: an intro page explaining watch-only capabilities, an xpub entry page with real-time validation, then the existing name page (which skips the password step for watch-only wallets and creates the wallet directly). The backend creates a blank descriptor wallet with private keys disabled, then imports wpkh receive and change descriptors derived from the user-provided xpub. Also fix createSingleSigWallet to use setWalletLoaded/setWalletLoadError for consistent state management across both creation paths, and remove the unused m_error_message member.
Add end-to-end GUI tests covering: - Full watch-only wallet creation flow (type selector → intro → xpub entry → name → wallet created with private_keys_enabled=false) - Type selector routing to regular wallet flow (CreateIntro) - Type selector routing to import wallet flow - Disabled state of Multi-key and Custom options Uses a source bitcoind node to generate a real xpub for the test, then drives the QML GUI through the creation wizard and verifies the result via RPC.
Cover the node initialization guard (startNodeInitializionThread emits requestedInitialize exactly once) and xpub validation logic (valid key, garbage, empty, whitespace trimming, invalid-xpub error path).
Add a MockWalletController context property and Clipboard singleton stub so QML tests can instantiate wallet wizard pages without the real C++ backend.
Add test cases for WalletTypeListItem, CreateTypeSelector, WatchOnlyXpub, CreateName, and CreatePassword covering signal routing, disabled states, input validation, and loading behavior.
Parameterize CreateConfirm with headerText and descriptionText properties so both single-sig and watch-only flows can reuse the same component with different messaging. Route the watch-only flow through a new watchOnlyConfirm page instead of finishing immediately after wallet creation.
8c01c0a to
cf438f3
Compare
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.
Added the menu for all wallet options when adding a wallet.
Added the watch only wallet creation flow. Currently password protection isn't supported, may want to consider for the future.
Added unit, qml and functional tests for new features.
Fixed bug where the gui would crash when leaving the on-boarding sequence.
Fixed bug where long wallet names would break the wallet name text boxes.
One TODO added. The wallet creation process should be moved to its own worker thread to avoid UI freezes. Out of scope for this PR.
#560