blitz_api/app
Justin Sharp 84a888f0ba fix: use decode instead of deprecated decodepay in CLN backends
CLN deprecated decodepay in favor of decode in v24.11, now rejects it by
default (observed on v25.12.1: JSON-RPC -32601 "Command decodepay is
deprecated") and removes it entirely in v26.04. Both CLN implementations
still called decodepay in decode_pay_request(), so on current CLN every
call fails, list_all_tx() propagates the failure, and the
/lightning/list-all-tx endpoint returns HTTP 500 — permanently breaking
the Transactions view in the web UI.

Switch both cln_jrpc.py and cln_grpc.py to decode (the CLI fallback
keyword changes from bolt11= to string=). For bolt11 invoices decode
returns a superset of decodepay fields, so PaymentRequest.from_cln_json
is unchanged. decode reports recognized-but-invalid strings as a normal
result with valid=false + warning_* fields instead of an RPC error, so
both backends now map that case to a clear 400 rather than crashing in
from_cln_json the way #307 did.

Reproduced on RaspiBlitz v1.12.1 with Core Lightning v25.12.1; verified
on the same node that decode returns every field the parser consumes and
that the Transactions view loads after the patch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 13:03:06 -06:00
..
api refactor(api): hoist api_startup_status into a shared leaf module 2026-07-12 18:41:18 +02:00
apps feat(api): normalize all error responses to the ErrorMessage shape 2026-07-12 18:41:18 +02:00
auth fix(api): replace deprecated asyncio.get_event_loop() 2026-07-03 22:34:44 +02:00
bitcoind chore(api): remove SSE transport and unused SSE stream endpoints 2026-07-12 18:41:18 +02:00
external chore(api): remove SSE transport and unused SSE stream endpoints 2026-07-12 18:41:18 +02:00
lightning fix: use decode instead of deprecated decodepay in CLN backends 2026-07-20 13:03:06 -06:00
setup feat: replace call_script func with better func 2025-05-06 09:16:46 +02:00
system feat(api): implement GET /system/health readiness endpoint (#145) 2026-07-12 18:41:18 +02: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 refactor(api): handle warmup fetch errors explicitly in _handle (#245) 2026-07-12 19:13:56 +02:00
server.py chore(nix): migrate flake from poetry2nix to uv2nix 2026-07-03 16:00:42 +02:00