mirror of
https://github.com/lnbits/lnbits.git
synced 2025-09-27 20:36:16 +02:00
copilot payments not triggering animations
listener issue
This commit is contained in:
@@ -57,7 +57,6 @@ async def lnurl_callback(
|
|||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=HTTPStatus.NOT_FOUND, detail="Copilot not found"
|
status_code=HTTPStatus.NOT_FOUND, detail="Copilot not found"
|
||||||
)
|
)
|
||||||
print(cp)
|
|
||||||
amount_received = int(amount)
|
amount_received = int(amount)
|
||||||
|
|
||||||
if amount_received < 10000:
|
if amount_received < 10000:
|
||||||
|
@@ -26,15 +26,10 @@ async def wait_for_paid_invoices():
|
|||||||
async def on_invoice_paid(payment: Payment) -> None:
|
async def on_invoice_paid(payment: Payment) -> None:
|
||||||
webhook = None
|
webhook = None
|
||||||
data = None
|
data = None
|
||||||
print("cunt")
|
|
||||||
if "copilot" != payment.extra.get("tag"):
|
if "copilot" != payment.extra.get("tag"):
|
||||||
# not an copilot invoice
|
# not an copilot invoice
|
||||||
return
|
return
|
||||||
|
|
||||||
if payment.extra.get("wh_status"):
|
|
||||||
# this webhook has already been sent
|
|
||||||
return
|
|
||||||
|
|
||||||
copilot = await get_copilot(payment.extra.get("copilot", -1))
|
copilot = await get_copilot(payment.extra.get("copilot", -1))
|
||||||
|
|
||||||
if not copilot:
|
if not copilot:
|
||||||
@@ -71,8 +66,8 @@ async def on_invoice_paid(payment: Payment) -> None:
|
|||||||
await mark_webhook_sent(payment, -1)
|
await mark_webhook_sent(payment, -1)
|
||||||
if payment.extra.get("comment"):
|
if payment.extra.get("comment"):
|
||||||
await updater(copilot.id, data, payment.extra.get("comment"))
|
await updater(copilot.id, data, payment.extra.get("comment"))
|
||||||
else:
|
|
||||||
await updater(copilot.id, data, "none")
|
await updater(copilot.id, data, "none")
|
||||||
|
|
||||||
|
|
||||||
async def mark_webhook_sent(payment: Payment, status: int) -> None:
|
async def mark_webhook_sent(payment: Payment, status: int) -> None:
|
||||||
|
Reference in New Issue
Block a user