mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 08:12:38 +00:00
QR save dialogs can outlive their wallet or payment request #1013
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#1013
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?
There are two cases here: a receiving-address QR save can export another wallet’s address, and a payment-request QR save can silently produce no file. Both leave a native Save dialog usable after the context it was opened for has changed.
These were originally reported under #992.
Receiving-address QR: saves the wrong wallet’s address
unloadwallet "A" false. B becomes selected.The PNG contains B’s address. I confirmed B owns it with
getaddressinfo.Visiting B’s Receive page first matters: a fresh address-generation signal can close the dialog and hide this case.
Payment-request QR: Save silently writes nothing
unloadwallet "A" falsethrough the GUI’s RPC server.The picker closes, but there’s no PNG and no error. I also reproduced this by loading B through RPC while A’s picker was open.
We should close and invalidate these dialogs when their wallet/request changes or the owning view closes. An accepted save shouldn’t pick up another wallet’s QR or silently do nothing.
Tested with native dialogs on macOS / Qt 6.9.0 at
b03cf0554841. The wrong-address case also reproduces on parent77e8005455cd; I only tested the silent-save case on the PR build.Original reports: wrong address, silent save. Related QR work: #972 and #990.
Found another way to hit the silent save here, without switching or unloading wallets.
The request changes to “Payment received,” but the Save dialog stays open. Clicking Save closes it without creating a PNG or showing an error.
Reproduced twice on
qt6atd567e3eb2497, native macOS / Qt 6.9.0. The same request exported successfully before payment, to the same folder.Once paid,
captureQR()returns false because sharing is disabled, and the acceptance handler ignores that result. There’s already cleanup intended to close the dialog when payment arrives, but it didn’t happen in these runs. We should cover this transition in the fix too.I'll take this