copilot payments not triggering animations

listener issue
This commit is contained in:
benarc 2021-10-18 10:31:30 +01:00
parent 15cd84652e
commit 0cf11caaad
2 changed files with 2 additions and 8 deletions

View File

@ -57,7 +57,6 @@ async def lnurl_callback(
raise HTTPException(
status_code=HTTPStatus.NOT_FOUND, detail="Copilot not found"
)
print(cp)
amount_received = int(amount)
if amount_received < 10000:

View File

@ -26,15 +26,10 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
webhook = None
data = None
print("cunt")
if "copilot" != payment.extra.get("tag"):
# not an copilot invoice
return
if payment.extra.get("wh_status"):
# this webhook has already been sent
return
copilot = await get_copilot(payment.extra.get("copilot", -1))
if not copilot:
@ -71,8 +66,8 @@ async def on_invoice_paid(payment: Payment) -> None:
await mark_webhook_sent(payment, -1)
if 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: