From 7b0f9f61fc2092f6dcf16a354d42e058e7e65c0c Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Wed, 21 Dec 2022 15:47:35 +0200 Subject: [PATCH] fix: remove double dict --- lnbits/extensions/withdraw/lnurl.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/lnbits/extensions/withdraw/lnurl.py b/lnbits/extensions/withdraw/lnurl.py index 17ef6464..7260df1e 100644 --- a/lnbits/extensions/withdraw/lnurl.py +++ b/lnbits/extensions/withdraw/lnurl.py @@ -164,13 +164,11 @@ async def api_lnurl_callback( r: httpx.Response = await client.post(link.webhook_url, **kwargs) await update_payment_extra( payment_hash, - dict( - { - "wh_success": r.is_success, - "wh_message": r.reason_phrase, - "wh_response": r.text, - } - ), + { + "wh_success": r.is_success, + "wh_message": r.reason_phrase, + "wh_response": r.text, + }, ) except Exception as exc: # webhook fails shouldn't cause the lnurlw to fail since invoice is already paid @@ -179,7 +177,7 @@ async def api_lnurl_callback( ) await update_payment_extra( payment_hash, - dict({"wh_success": False, "wh_message": str(exc)}), + {"wh_success": False, "wh_message": str(exc)}, ) return {"status": "OK"}