Receive: creating a request from Address details silently discards an existing draft #1094

Open
opened 2026-11-09 20:48:15 +00:00 by jarolrod · 0 comments
jarolrod commented 2026-11-09 20:48:15 +00:00 (Migrated from github.com)

Creating a payment request from Address details silently replaces an existing unsaved Receive draft. The amount, message and private note are discarded without confirmation.

To reproduce:

  1. Open Receive and enter an amount, message and note to self. Leave the request unsaved. I used 0.12345678 BTC, “Draft message” and “Draft private note”.
  2. Open Settings → Wallet settings → Addresses.
  3. Open the details of an unused receiving address with a label, then click Create payment request.
  4. Inspect the Receive form.

The amount is now zero, the message is empty, and the private note has been replaced by the selected address’s label. No request was saved. Following the same navigation and returning without clicking Create payment request preserves all three fields.

Before replacing a populated draft, the app should ask whether to discard it. Cancelling that action should preserve the entire existing draft.

The clearing happens in QML’s wallet model: setCurrentPaymentRequestAddress() clears the current request before assigning the selected address and its label. The handoff needs to check for an existing draft before making those changes.

This differs from #1030, which concerned selecting the already-active wallet, and #909, which covered editing and discarding a prefilled draft. PR #1062’s used-address guard does not cover this unused-address case.

Reproduced on merged qt6 at eed1f426fcb6, macOS / Qt 6.9, using the full app with an isolated offscreen regtest profile.

Creating a payment request from Address details silently replaces an existing unsaved Receive draft. The amount, message and private note are discarded without confirmation. To reproduce: 1. Open Receive and enter an amount, message and note to self. Leave the request unsaved. I used 0.12345678 BTC, “Draft message” and “Draft private note”. 2. Open Settings → Wallet settings → Addresses. 3. Open the details of an unused receiving address with a label, then click **Create payment request**. 4. Inspect the Receive form. The amount is now zero, the message is empty, and the private note has been replaced by the selected address’s label. No request was saved. Following the same navigation and returning without clicking Create payment request preserves all three fields. Before replacing a populated draft, the app should ask whether to discard it. Cancelling that action should preserve the entire existing draft. The clearing happens in QML’s wallet model: `setCurrentPaymentRequestAddress()` clears the current request before assigning the selected address and its label. The handoff needs to check for an existing draft before making those changes. This differs from [#1030](https://github.com/bitcoin-core/gui-qml/issues/1030), which concerned selecting the already-active wallet, and [#909](https://github.com/bitcoin-core/gui-qml/issues/909), which covered editing and discarding a prefilled draft. PR [#1062](https://github.com/bitcoin-core/gui-qml/pull/1062)’s used-address guard does not cover this unused-address case. Reproduced on merged `qt6` at `eed1f426fcb6`, macOS / Qt 6.9, using the full app with an isolated offscreen regtest profile.
Sign in to join this conversation.
No description provided.