blitz_api/app
Justin Sharp d415fb30fd fix: handle missing bolt11 in CLN list_payments for keysend/BOLT12
Follow-up to #290 — same class of bug, different code path.

list_payments() in cln_jrpc.py unconditionally indexed p["bolt11"] for any
incomplete payment, causing a KeyError -> the function returned None and
then list_all_tx() crashed with `TypeError: 'NoneType' object is not
iterable`, returning HTTP 500 to the Transactions view.

CLN's `listpays` does not include `bolt11` for keysend payments or for
BOLT12 offer payments, so any node that has ever made one of those will
hit this on every Transactions load.

Fix: guard the bolt11 decode the same way #290 guards invoice fields —
only decode when bolt11 is present, and fall back to amount_sent_msat
when neither bolt11 nor amount_msat are available, so the payment still
shows up in the list.

Reproduced on RaspiBlitz v1.12.1 with Core Lightning v25.12.1 and a
keysend payment in history.
2026-05-12 19:01:33 +02:00
..
api chore: clean up imports; add better LND error logging 2026-02-03 11:05:19 +01:00
apps chore: clean up imports; add better LND error logging 2026-02-03 11:05:19 +01:00
auth feat: make config loading more flexible 2025-03-23 17:43:39 +01:00
bitcoind chore: small fixes and updates 2025-05-06 09:16:46 +02:00
external feat: update Python and Devenv deps 2026-02-03 11:04:41 +01:00
lightning fix: handle missing bolt11 in CLN list_payments for keysend/BOLT12 2026-05-12 19:01:33 +02:00
setup feat: replace call_script func with better func 2025-05-06 09:16:46 +02:00
system feat: update Python and Devenv deps 2026-02-03 11:04:41 +01:00
__init__.py feat: prepare for release 0.5.1beta 2023-02-05 21:24:31 +01:00
celery_app.py feat: fetch app status via a celery task 2025-05-06 09:16:46 +02:00
logging.py feat: make config loading more flexible 2025-03-23 17:43:39 +01:00
main.py feat: update Python and Devenv deps 2026-02-03 11:04:41 +01:00
server.py chore: small fixes and updates 2025-05-06 09:16:46 +02:00