mirror of
https://github.com/bitcoin-core/gui-qml.git
synced 2026-12-02 07:42:38 +00:00
Activity: a receiving address's label is not shown on incoming payments unless a payment request exists for the address #1135
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#1135
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?
A label on a receiving address is not shown on the payments that address receives. The Activity row, the wallet's output in Transaction details and the CSV "Label" cell are blank unless a saved payment request with a Note to self exists for the address, while Activity's search still matches the label. Activity showed these labels before #915.
To reproduce:
getnewaddress "Rent Alice"in a wallet, pay that address 0.01 BTC from another wallet and mine a block.Rent Alicein the search field. One row stays, the same payment, still without a label.listtransactionsreturns the labelRent Alicefor the payment.getnewaddress <label>, before the app first ran or while it runssetlabelafter the payment confirmedsetlabelsetlabelSearching each label left exactly its payment's row, in every case. The same address gives two answers: its label is shown in details when the wallet spends from it, and not when it receives on it. Nothing is lost in the wallet.
The list takes a request's note when a request exists, and otherwise the address-book label for sends only:
github.com/bitcoin-core/gui-qml@2bd5a61e83/qml/models/transactionactivitymodel.cpp (L466-L470)Transaction details do the same for a wallet-owned output:
github.com/bitcoin-core/gui-qml@2bd5a61e83/qml/models/transactionactivitymodel.cpp (L630-L634)The rule came with #915, to close #852: a paid request's row was showing the request's public name, and at that time saving a request wrote that name into the address book. #932 then made the address label the private note and left this rule and its tests alone. So the label Activity now declines to show is, by the app's own definition, the private note. A unit test asserts the current behaviour, with a fixture that still calls the label a "Public address name":
github.com/bitcoin-core/gui-qml@2bd5a61e83/test/test_transactionactivitymodel.cpp (L1150-L1153)Bitcoin-Qt, by its source, shows the address-book label in its Label column, writes it to the CSV "Label" column and searches it.
Could a received payment fall back to the address label when no request exists for the address? #638 presupposes that Activity shows these labels, and #1111 is the neighbouring branch of the same title rule.
Reproduced on
qt6at2bd5a61e8304, macOS arm64 / Qt 6.9.0, isolated regtest, offscreen and native; the same offscreen ateed1f426fcb6. Clicks went through the test bridge, and labels in Addresses were typed with key events and committed through the bridge in place of Return. The export path went through the test path field, not the save dialog. Payments and the outside labels came over RPC. Bitcoin-Qt was not run; a request made in its Receive tab was stood in for by an in-app request with a Pay to name and no note. Not run: labelling an already paid address through "Show used addresses", coinbase receipts, grouped receives.