mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2025-03-10 17:26:15 +01:00
make format
This commit is contained in:
parent
7316ef7dbb
commit
92a756b9bb
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue