list_transactions: fall back to extra.comment / memo when BOLT11 description is empty#43
Merged
blackcoffeexbt merged 2 commits intoJun 2, 2026
Conversation
…ription is empty LNURL-pay payments use a SHA-256 description_hash, so invoice_data.description is None/empty and the LUD-12 payer comment + Pay Link item description never reach the NWC client. The new fallback chain — extra.comment → invoice_data.description → memo — matches what _on_lookup_invoice already does, plus prefers LUD-12 comments when present. Closes lnbits#42.
blackcoffeexbt
approved these changes
Jun 2, 2026
DoktorShift
added a commit
to DoktorShift/nwcprovider
that referenced
this pull request
Jun 2, 2026
- resolve tasks.py conflict (align with upstream lnbits#43) - keep comment fallback in lookup_invoice (null-safe)
DoktorShift
added a commit
to DoktorShift/nwcprovider
that referenced
this pull request
Jun 2, 2026
- resolve tasks.py conflict (align with upstream lnbits#43) - restore poetry.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #42.
Summary
_on_list_transactionsreturnsdescription: Nonefor LNURL-pay payments because the BOLT11descriptionis a SHA-256 hash (LUD-06description_hash), not human text. The actual content lives in:payment.extra.comment— the payer's LUD-12 messagepayment.memo— the Pay Link's "Item description"…both of which
list_transactionswas ignoring.lookup_invoicealready falls back topayment.memo; this PR mirrors that, plus prefers LUD-12 comments when present.Change
One field's value, in
tasks.py_on_list_transactions:Ordering rationale — when a payer typed a message via LUD-12, that's more informative for the receiver than the receiver's own Pay Link template. Falls back through both other sources for non-LUD-12 incoming payments and for outgoing ones, matching the existing
_on_lookup_invoiceshape.Test plan
_on_lookup_invoicebody (line ~356) — fallback chain is consistent with what lookup already does, plus theextra.commentsource.descriptioninlist_transactionsresponse equals the payer's comment string.invoice_data.description(if present) orp.memo.pay_invoice): confirmdescriptionstill populates frominvoice_data.description/p.memo.Happy to run any additional tests the maintainer wants. Verified on Lightning Piggy (ESP32 NWC display wallet, github.com/LightningPiggy/LightningPiggyApp) against an LNBits instance: with this change, payer-supplied comments now appear in the on-device transaction list; without it, every LNURL-pay row reads as bare-amount.