From ae2ef5f7c417f77da545c7b03f7bc127ea6377cf Mon Sep 17 00:00:00 2001 From: dadofsambonzuki Date: Thu, 25 Jun 2026 14:30:45 +0000 Subject: [PATCH] fix: add state field to lookup_invoice and list_transactions responses --- tasks.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tasks.py b/tasks.py index 8dffedb..f6d12a8 100644 --- a/tasks.py +++ b/tasks.py @@ -363,8 +363,10 @@ async def _on_lookup_invoice( "created_at": timestamp, "expires_at": expiry, "settled_at": timestamp if is_settled else None, + "state": "settled" if is_settled else "pending", "metadata": {}, } + if invoice_data.description_hash: res["description_hash"] = invoice_data.description_hash # await log_nwc(pubkey, payload) @@ -438,6 +440,7 @@ async def _on_list_transactions( "fees_paid": p.fee, "created_at": timestamp, "settled_at": timestamp if is_settled else None, + "state": "settled" if is_settled else "pending", "metadata": {}, } )