mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:54:42 +00:00
Watch-only send: review offers an unusable Send action after #935 #1047
Labels
No labels
Android
Bug
Build system
Design suggestion
Doc
Needs design review
Needs rebase
Stage
UX
Up for grabs
Upstream
Wallet
duplicate
enhancement
good first issue
question
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
bitcoin-core/gui-qml#1047
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I reproduced watch-only review saying Ready to send and offering an enabled Send transaction button, even though the same screen warns that the wallet doesn't have the keys to sign. Clicking Send returns This wallet cannot sign transactions. The review stays open and nothing is broadcast.
Tested on
qt6atd567e3eb2497df3be5d63f4dc1f554b3bf51f59f, using the native macOS GUI with Qt 6.9.0 and disposable regtest wallets.To reproduce:
getwalletinfoconfirmedprivate_keys_enabled: falseandexternal_signer: false.No wallet switching or overlapping operation is needed. This happens when preparing an ordinary payment from a valid, loaded watch-only wallet.
I also checked the export path. Save transaction writes an unsigned PSBT successfully, and
analyzepsbtreportsnext: signer. Importing that exact file back into the same wallet opens review with Send and the ready status correctly hidden. So the export workflow works; preparing the payment locally gives the review the wrong capability state.There's some history here. #662 described this same send-vs-export problem and was closed by #750. Johnny also described the intended watch-only action in #560: export a PSBT and label the action accordingly.
Tracing the code, #750's old review explicitly hid Send for watch-only wallets. That check was still present immediately before
8515b923014e9c5cf3a5faffa58b3c0591ff0166in #935. The replacement review usescurrentTransactionCanSendwithout the watch-only check.The model already set that flag unconditionally for a prepared Send draft, so that part predates #935. The redesign exposed the inconsistency by removing the UI guard. Current preparation still sets it to true, while sending rejects this wallet. The current behavior was reproduced in the GUI; the earlier behavior above was checked in source.
The existing tests cover unsigned preparation (
prepareTransactionWithPrivateKeysDisabledDoesNotRequirePassword) and rejection without committing (sendTransactionWithPrivateKeysDisabledDoesNotCommit). Neither checks the prepared draft'scurrentTransactionCanSendvalue or the review's button/status visibility, so they miss this contradictory UI.We should keep unsigned preparation and PSBT export available, but make the capability state and review actions agree. A watch-only wallet without an external signer shouldn't offer Send or claim it's ready to send. Coverage should check the model flag and the actual review controls, while preserving the separate external-signer and fully signed PSBT broadcast paths.
Related to #926. There are separate known gaps in watch-only creation/import (#954, #735, #737 and #738), but this reproduces after a valid wallet is already loaded. The earlier send behavior was explicitly handled, so those outstanding creation issues don't account for this regression.
@pseudoramdom