Receive: Undo can restore another payment request’s amount #1083

Open
opened 2026-11-08 23:58:00 +00:00 by jarolrod · 0 comments
jarolrod commented 2026-11-08 23:58:00 +00:00 (Migrated from github.com)

Opening a different saved payment request can retain the previous request’s amount-edit history. Pressing Undo in the new request restores an amount from the old request, and Update payment request saves it under the new request’s address.

Steps to reproduce:

  1. Create two unpaid requests in the same wallet. Give request A an amount of 0.00421 BTC; leave request B’s amount blank.
  2. In Activity, open request A.
  3. Select its amount, press Backspace, click Update payment request, and close the dialog.
  4. Open request B and focus its blank amount field without typing.
  5. Press Undo. The field now contains 0.00421000.
  6. Click Update payment request, then reopen request B.

Request B now asks for 421,000 sats. Its copied payment URI and decoded QR both contain that amount at B’s address. Request A remains at zero.

Undo history should belong to the request being edited. Opening another request should clear the previous request’s history while preserving normal Undo within one editing session.

Activity reuses the request modal and its text field. PaymentRequestField.qml resets the visible value, but assigning an already-blank value leaves the previous Undo entry available.

Reproduced in two isolated runs on qt6 at 6e54a48ab571, macOS / Qt 6.9, using synthetic input. The restored amount is visible, and the saved request changes only after clicking Update.

Opening a different saved payment request can retain the previous request’s amount-edit history. Pressing Undo in the new request restores an amount from the old request, and **Update payment request** saves it under the new request’s address. Steps to reproduce: 1. Create two unpaid requests in the same wallet. Give request A an amount of `0.00421 BTC`; leave request B’s amount blank. 2. In Activity, open request A. 3. Select its amount, press Backspace, click **Update payment request**, and close the dialog. 4. Open request B and focus its blank amount field without typing. 5. Press Undo. The field now contains `0.00421000`. 6. Click **Update payment request**, then reopen request B. Request B now asks for 421,000 sats. Its copied payment URI and decoded QR both contain that amount at B’s address. Request A remains at zero. Undo history should belong to the request being edited. Opening another request should clear the previous request’s history while preserving normal Undo within one editing session. Activity reuses the request modal and its text field. [PaymentRequestField.qml](https://github.com/bitcoin-core/gui-qml/blob/6e54a48ab571cb46b813eb1d98a301401089192f/qml/components/PaymentRequestField.qml#L25) resets the visible value, but assigning an already-blank value leaves the previous Undo entry available. Reproduced in two isolated runs on `qt6` at `6e54a48ab571`, macOS / Qt 6.9, using synthetic input. The restored amount is visible, and the saved request changes only after clicking Update.
Sign in to join this conversation.
No description provided.