From 8d52b1b359f57d6983963a372e8504e7b118f720 Mon Sep 17 00:00:00 2001 From: callebtc <93376500+callebtc@users.noreply.github.com> Date: Tue, 19 Jul 2022 11:15:11 +0200 Subject: [PATCH] check description hash --- lnbits/core/views/api.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lnbits/core/views/api.py b/lnbits/core/views/api.py index 290fd402..f1a641a1 100644 --- a/lnbits/core/views/api.py +++ b/lnbits/core/views/api.py @@ -317,11 +317,11 @@ async def api_payments_pay_lnurl( 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}.", - # ) + 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}.", + ) extra = {}