Saving a payment request can clear another wallet’s reserved receiving address #1085

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

Receive reservations are not isolated for certain valid nested wallet names. Creating a request in Ledger can remove the address reserved by Ledger/address. After restart, the latter creates its request for a different address.

To reproduce:

  1. Load descriptor wallets named Ledger and Ledger/address. The fixture wallets were created through RPC.
  2. In Ledger/address, select an unused labelled address in Addresses and choose Create payment request. Record that address and leave the draft open.
  3. Switch to Ledger and create a payment request.
  4. Restart the application and reopen Ledger/address.
  5. Save its request for 0.001 BTC, then pay the address selected in step 2.

The saved request uses a different address. Core credits the payment to Ledger/address, but the request remains Awaiting payment, with zero received, including after confirmation and another restart.

The reservation survives restart when step 3 is omitted. It also survives the equivalent sequence with the non-colliding name Ledger/invoices.

Clearing one wallet’s reservation should never remove another wallet’s reservation.

This is in the QML persistence layer: the key includes the raw wallet name, and clearing the reservation removes a hierarchical QSettings key containing the nested wallet’s entry.

Reproduced on merged qt6 at 6e54a48ab571, macOS / Qt 6.9, with offscreen regtest fixtures and isolated INI settings. Native preference backends were not tested. The payment remained in the correct wallet. Related to #972.

Receive reservations are not isolated for certain valid nested wallet names. Creating a request in `Ledger` can remove the address reserved by `Ledger/address`. After restart, the latter creates its request for a different address. To reproduce: 1. Load descriptor wallets named `Ledger` and `Ledger/address`. The fixture wallets were created through RPC. 2. In `Ledger/address`, select an unused labelled address in Addresses and choose **Create payment request**. Record that address and leave the draft open. 3. Switch to `Ledger` and create a payment request. 4. Restart the application and reopen `Ledger/address`. 5. Save its request for `0.001 BTC`, then pay the address selected in step 2. The saved request uses a different address. Core credits the payment to `Ledger/address`, but the request remains **Awaiting payment**, with zero received, including after confirmation and another restart. The reservation survives restart when step 3 is omitted. It also survives the equivalent sequence with the non-colliding name `Ledger/invoices`. Clearing one wallet’s reservation should never remove another wallet’s reservation. This is in the QML persistence layer: the [key includes the raw wallet name](https://github.com/bitcoin-core/gui-qml/blob/6e54a48ab571cb46b813eb1d98a301401089192f/qml/models/walletqmlmodel.cpp#L3333), and [clearing the reservation](https://github.com/bitcoin-core/gui-qml/blob/6e54a48ab571cb46b813eb1d98a301401089192f/qml/models/walletqmlmodel.cpp#L1282) removes a hierarchical QSettings key containing the nested wallet’s entry. Reproduced on merged `qt6` at `6e54a48ab571`, macOS / Qt 6.9, with offscreen regtest fixtures and isolated INI settings. Native preference backends were not tested. The payment remained in the correct wallet. Related to [#972](https://github.com/bitcoin-core/gui-qml/issues/972).
Sign in to join this conversation.
No description provided.