mirror of
https://github.com/lnbits/lnbits.git
synced 2025-06-28 01:32:38 +02:00
make format
This commit is contained in:
parent
7316ef7dbb
commit
92a756b9bb
@ -44,7 +44,7 @@ async def on_invoice_paid(payment: Payment) -> None:
|
|||||||
# I REALLY HATE THIS DUPLICATION OF CODE!! CORE/VIEWS/API.PY, LINE 267
|
# I REALLY HATE THIS DUPLICATION OF CODE!! CORE/VIEWS/API.PY, LINE 267
|
||||||
domain = urlparse(data["callback"]).netloc
|
domain = urlparse(data["callback"]).netloc
|
||||||
rounded_amount = floor(payment.amount / 1000) * 1000
|
rounded_amount = floor(payment.amount / 1000) * 1000
|
||||||
|
|
||||||
async with httpx.AsyncClient() as client:
|
async with httpx.AsyncClient() as client:
|
||||||
try:
|
try:
|
||||||
r = await client.get(
|
r = await client.get(
|
||||||
@ -68,7 +68,7 @@ async def on_invoice_paid(payment: Payment) -> None:
|
|||||||
)
|
)
|
||||||
|
|
||||||
invoice = bolt11.decode(params["pr"])
|
invoice = bolt11.decode(params["pr"])
|
||||||
|
|
||||||
if invoice.amount_msat != rounded_amount:
|
if invoice.amount_msat != rounded_amount:
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.BAD_REQUEST,
|
status_code=HTTPStatus.BAD_REQUEST,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user