Review report

bitcoin-core/gui-qml: PR #934

2 minor findings · 2 suggestions

Findings

Link

[minor] · Native-menu navigation silently removes the reviewed payment request

Where native menus remain usable during payment review, navigating away from Send closes the review as resolved and removes the request without Apply, Discard or notice.

Location: qml/pages/wallet/WalletView.qml:205 (head).

Details and suggested fix

The Send visibility handler reports interruption only when WalletView.active is false. Native-menu routes such as Node, Activity, Receive and Settings remain enabled during the modal review and can hide Send without deactivating its wallet view. pageHidden(sendPage) then closes the review, whose onClosed reports "resolved" while the incoming-request flag is still set. MainWindow consequently dequeues the request. Nothing is applied, but recovering the request requires opening the URI again. Disable shell navigation routes while the payment review is open, and add a routing test that attempts to hide Send on an active wallet view. This trigger is conditional on usable native menus, such as macOS or Linux global menus; it was traced statically, not exercised.


Link

[minor] · Payment review can show a stale retained amount after manual URI import

Where native File > Open URI remains usable during review, a second import can change the amount that an amount-less request will retain, without updating the original review.

Location: qml/pages/wallet/SendCreate.qml:613 (head).

Details and suggested fix

handleIncomingPaymentUri snapshots keptAmountSatoshi and replacesValues when the review opens. File > Open URI remains enabled and can open the manual importer on the same Send page. Applying that import changes the live amount, but draftChanged() closes only reviewSweepAlert. Applying the original amount-less request then sets its address while preserving the new amount, although its review still says "Not specified, keeps X", or hides Amount when the original value was zero. Interrupt and close the payment review when its draft changes, then offer it again with fresh values; exclude its own application after closure. Add a test that changes the amount through the manual importer during review. The user performs the second import, and transaction review still shows the final address and amount before signing. This native-menu sequence was traced statically, not exercised.


Optional improvements

Link

[suggestion] · Clicking outside payment review discards the queued request

The default outside-click dismissal treats a stray click on the dimmed area as Discard, removing the queued request until the URI is opened again.

Location: qml/components/PaymentRequestReviewPopup.qml:25 (head).

Details and suggested fix

PaymentRequestReviewPopup leaves closePolicy at Popup's default CloseOnEscape | CloseOnPressOutside. An outside press closes it with accepted false, and SendCreate reports "resolved", causing MainWindow to dequeue the request without notice. The no-wallet, wallet-disabled and clipboard-confirmation dialogs instead use AlertPopup, which disables outside-click dismissal. Set this review's policy to Popup.CloseOnEscape so Discard and Escape remain deliberate dismissal paths without making a stray click consume the request. Nothing would apply without Apply, so this preserves the current safe application behavior.


Link

[suggestion] · Replacement warning omits overwritten request labels and messages

A same-address request can replace the existing Pay to label or clear its message without a replacement warning, although the review displays the incoming metadata.

Location: qml/pages/wallet/SendCreate.qml:616 (head).

Details and suggested fix

replacesValues reuses the clipboard conflict predicate, which checks the address, an explicit amount and a nonempty message-derived note. After applying bitcoin:<A>?label=Alice, a queued bitcoin:<A>?label=Bob therefore reviews with replacesValues false, even though Apply changes Pay to from Alice to Bob. A new request without a message likewise clears the previous request's message without triggering the note check. Use a dedicated incoming-review predicate that includes changes and clearing of the payment-request label and message, rather than inheriting the clipboard source-field exceptions. These values came from earlier requests rather than typing, so whether they count as "values already entered in the form" is a product choice. The review already shows the incoming metadata; validation and signing are unaffected.


Coverage details