From f8ff82fed1301996eca2b2537b932d9fb471bb1d Mon Sep 17 00:00:00 2001 From: bitcoin3us <115934595+bitcoin3us@users.noreply.github.com> Date: Wed, 27 May 2026 08:20:02 +0100 Subject: [PATCH 1/2] list_transactions: fall back to extra.comment / memo when BOLT11 description is empty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 #42. --- tasks.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tasks.py b/tasks.py index 70f3205..da3e0ad 100644 --- a/tasks.py +++ b/tasks.py @@ -425,7 +425,20 @@ async def _on_list_transactions( { "type": "outgoing" if p.is_out else "incoming", "invoice": p.bolt11, - "description": invoice_data.description, + # Fallback chain so a human-readable description reaches + # the NWC client even for LNURL-pay payments (where the + # BOLT11 description is just a SHA-256 hash, not text): + # 1. `extra.comment` — LUD-12 payer-supplied message + # 2. `invoice_data.description` — BOLT11 description + # when it carries the actual text rather than a hash + # 3. `p.memo` — Pay Link item description / generic memo + # Mirrors what `_on_lookup_invoice` already does, plus the + # LUD-12 source. See #42. + "description": ( + (p.extra or {}).get("comment") + or invoice_data.description + or p.memo + ), "description_hash": invoice_data.description_hash, "preimage": p.preimage if is_settled or p.is_in else None, "payment_hash": p.payment_hash, From a3e5ebd15df1ba6547128515f22812607813240b Mon Sep 17 00:00:00 2001 From: blackcoffeexbt <87530449+blackcoffeexbt@users.noreply.github.com> Date: Tue, 2 Jun 2026 10:36:03 +0100 Subject: [PATCH 2/2] Reduced verbose comment --- tasks.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tasks.py b/tasks.py index da3e0ad..412f2b5 100644 --- a/tasks.py +++ b/tasks.py @@ -426,14 +426,7 @@ async def _on_list_transactions( "type": "outgoing" if p.is_out else "incoming", "invoice": p.bolt11, # Fallback chain so a human-readable description reaches - # the NWC client even for LNURL-pay payments (where the - # BOLT11 description is just a SHA-256 hash, not text): - # 1. `extra.comment` — LUD-12 payer-supplied message - # 2. `invoice_data.description` — BOLT11 description - # when it carries the actual text rather than a hash - # 3. `p.memo` — Pay Link item description / generic memo - # Mirrors what `_on_lookup_invoice` already does, plus the - # LUD-12 source. See #42. + # the NWC client. Mirror of `_on_lookup_invoice` "description": ( (p.extra or {}).get("comment") or invoice_data.description