fixed buggy lnurl checks

This commit is contained in:
Ben Arc 2022-02-01 21:22:20 +00:00
parent 3f0a855526
commit 3927545e32
2 changed files with 2 additions and 3 deletions

View File

@ -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 = {}

View File

@ -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)