WIP: qml: Hand payment URIs to the running instance

bitcoin-core/gui-qml: PR #988

1 minor finding · 1 suggestion

Earlier concerns neither republished nor resolved: 1 suggestion. See the Run archive for their assessments.

Findings

Link

[minor] · Incoming payment requests ignore open native file choosers

Static inspection shows incoming URIs can cancel backup/export choosers or, after a successful PSBT import, be dequeued without application; these chooser sequences were not exercised.

Location: qml/pages/MainWindow.qml:147 (head).

Details and suggested fix

AppFileDialog opens a separate modal QFileDialog asynchronously, so IPC delivery continues while it is open. Neither the Quick-overlay check nor Send's popup checks detect it. A request arriving during backup or CSV export selection therefore switches to Send, and WalletView.pageHidden() closes the chooser, abandoning the operation.

With the PSBT chooser already open on Send, delivery instead opens the incoming-request review while the chooser remains open. Accepting a supported PSBT replaces the recipients. onCurrentRecipientChanged() clears the pending parsed URI but neither interrupts its delivery nor closes its review. Later, Apply finds a null result and applies nothing, yet onClosed reports resolved, so MainWindow removes the request from the queue. The guard in openPsbtFileImport() protects only the opposite ordering. Track open AppFileDialogs in the delivery gate, including psbtOpenDialog, and retry when they finish. Recipient replacement should also interrupt and close an outstanding incoming review so its request remains queued. Add routing tests for both chooser sequences.


Optional improvements

Link

[suggestion] · Review does not warn that an explicit amount will turn off Use maximum

In the zero-amount Use maximum state, an otherwise nonconflicting incoming URI can switch to a fixed amount without a replacement warning, although its explicit amount is shown; the duration of this state was not established.

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

Details and suggested fix

paymentUriConflicts() ignores amount conflicts when the recipient amount is zero. Maximum mode can still be selected in that state before a usable fee preview arrives. Applying a positive explicit amount then clears maximum mode through its amountChanged connection, but replacesValues remains false if no other fields conflict. A different nonzero preview amount already triggers the generic warning. Treat result.hasAmount && root.wallet.maximumRecipient === root.recipient as replacing a value in the incoming review, and add a test for an explicit-amount request while maximum mode has amount zero.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.