python code styling (#739)

This commit is contained in:
Tiago Vasconcelos
2022-07-15 19:11:11 +02:00
committed by GitHub
parent 37c7553c19
commit 348033da1b
10 changed files with 12 additions and 11 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
webhook = None
data = None
if "copilot" != payment.extra.get("tag"):
if payment.extra.get("tag") != "copilot":
# not an copilot invoice
return
+1 -1
View File
@@ -16,7 +16,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "jukebox" != payment.extra.get("tag"):
if payment.extra.get("tag") != "jukebox":
# not a jukebox invoice
return
await update_jukebox_payment(payment.payment_hash, paid=True)
+1 -1
View File
@@ -22,7 +22,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "livestream" != payment.extra.get("tag"):
if payment.extra.get("tag") != "livestream":
# not a livestream invoice
return
+2 -2
View File
@@ -43,13 +43,13 @@ async def call_webhook_on_paid(payment_hash):
async def on_invoice_paid(payment: Payment) -> None:
if "lnaddress" == payment.extra.get("tag"):
if payment.extra.get("tag") == "lnaddress":
await payment.set_pending(False)
await set_address_paid(payment_hash=payment.payment_hash)
await call_webhook_on_paid(payment_hash=payment.payment_hash)
elif "renew lnaddress" == payment.extra.get("tag"):
elif payment.extra.get("tag") == "renew lnaddress":
await payment.set_pending(False)
await set_address_renewed(
+1 -1
View File
@@ -18,7 +18,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "lnticket" != payment.extra.get("tag"):
if payment.extra.get("tag") != "lnticket":
# not a lnticket invoice
return
+2 -1
View File
@@ -1,5 +1,6 @@
import asyncio
import json
import httpx
from lnbits.core import db as core_db
@@ -19,7 +20,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "lnurlp" != payment.extra.get("tag"):
if payment.extra.get("tag") != "lnurlp":
# not an lnurlp invoice
return
+1 -1
View File
@@ -19,7 +19,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "charge" != payment.extra.get("tag"):
if payment.extra.get("tag") != "charge":
# not a charge invoice
return
+1 -1
View File
@@ -22,7 +22,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "splitpayments" == payment.extra.get("tag") or payment.extra.get("splitted"):
if payment.extra.get("tag") == "splitpayments" or payment.extra.get("splitted"):
# already splitted, ignore
return
+1 -1
View File
@@ -19,7 +19,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "lnsubdomain" != payment.extra.get("tag"):
if payment.extra.get("tag") != "lnsubdomain":
# not an lnurlp invoice
return
+1 -1
View File
@@ -20,7 +20,7 @@ async def wait_for_paid_invoices():
async def on_invoice_paid(payment: Payment) -> None:
if "tpos" == payment.extra.get("tag") and payment.extra.get("tipSplitted"):
if payment.extra.get("tag") == "tpos" and payment.extra.get("tipSplitted"):
# already splitted, ignore
return