From 2a974f7b07e831ccd44e76f9e6dc1f2fc19268dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Tue, 2 Apr 2024 15:49:23 +0200 Subject: [PATCH] chore: renaming of `PaymentFailure` https://github.com/lnbits/lnbits/pull/2377 --- config.json | 2 +- models.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index 7f59f3d..985fac4 100644 --- a/config.json +++ b/config.json @@ -3,5 +3,5 @@ "short_description": "Connect a Bleskomat ATM to an lnbits", "tile": "/bleskomat/static/image/bleskomat.png", "contributors": ["chill117"], - "min_lnbits_version": "0.11.0" + "min_lnbits_version": "0.12.5" } diff --git a/models.py b/models.py index 5aec796..8009aed 100644 --- a/models.py +++ b/models.py @@ -7,7 +7,7 @@ from pydantic import BaseModel, validator from lnbits import bolt11 -from lnbits.core.services import PaymentFailure, pay_invoice +from lnbits.core.services import PaymentError, pay_invoice from . import db from .exchange_rates import exchange_rate_providers, fiat_currencies @@ -122,7 +122,7 @@ async def execute_action(self, query): await pay_invoice( wallet_id=self.wallet, payment_request=query["pr"] ) - except (ValueError, PermissionError, PaymentFailure) as e: + except (ValueError, PermissionError, PaymentError) as e: raise LnurlValidationError("Failed to pay invoice: " + str(e)) except Exception as e: logger.error(str(e))