From 3927545e326eed0f38c01ab17a1850347736a743 Mon Sep 17 00:00:00 2001 From: Ben Arc Date: Tue, 1 Feb 2022 21:22:20 +0000 Subject: [PATCH] fixed buggy lnurl checks --- lnbits/core/views/api.py | 4 ++-- lnbits/wallets/fake.py | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 4543afbec..664710867 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -289,13 +289,13 @@ async def api_payments_pay_lnurl( if invoice.amount_msat != data.amount: raise HTTPException( status_code=HTTPStatus.BAD_REQUEST, - detail=f"{domain} returned an invalid invoice. Expected {data['amount']} msat, got {invoice.amount_msat}.", + detail=f"{domain} returned an invalid invoice. Expected {data.amount} msat, got {invoice.amount_msat}.", ) if invoice.description_hash != data.description_hash: raise HTTPException( status_code=HTTPStatus.BAD_REQUEST, - detail=f"{domain} returned an invalid invoice. Expected description_hash == {data['description_hash']}, got {invoice.description_hash}.", + detail=f"{domain} returned an invalid invoice. Expected description_hash == {data.description_hash}, got {invoice.description_hash}.", ) extra = {} diff --git a/lnbits/wallets/fake.py b/lnbits/wallets/fake.py index 409e4fba3..d47f2e674 100644 --- a/lnbits/wallets/fake.py +++ b/lnbits/wallets/fake.py @@ -57,7 +57,6 @@ class FakeWallet(Wallet): ).hexdigest() data["paymenthash"] = randomHash payment_request = encode(data) - print(payment_request) checking_id = randomHash return InvoiceResponse(True, checking_id, payment_request)