make all methods from all wallets async.

This commit is contained in:
fiatjaf
2021-03-24 01:01:09 -03:00
parent 42bd5ea989
commit d4d069fc77
15 changed files with 219 additions and 187 deletions
+5 -5
View File
@@ -11,7 +11,7 @@ from .base import (
class VoidWallet(Wallet):
def create_invoice(
async def create_invoice(
self,
amount: int,
memo: Optional[str] = None,
@@ -19,19 +19,19 @@ class VoidWallet(Wallet):
) -> InvoiceResponse:
raise Unsupported("")
def status(self) -> StatusResponse:
async def status(self) -> StatusResponse:
return StatusResponse(
"This backend does nothing, it is here just as a placeholder, you must configure an actual backend before being able to do anything useful with LNbits.",
0,
)
def pay_invoice(self, bolt11: str) -> PaymentResponse:
async def pay_invoice(self, bolt11: str) -> PaymentResponse:
raise Unsupported("")
def get_invoice_status(self, checking_id: str) -> PaymentStatus:
async def get_invoice_status(self, checking_id: str) -> PaymentStatus:
raise Unsupported("")
def get_payment_status(self, checking_id: str) -> PaymentStatus:
async def get_payment_status(self, checking_id: str) -> PaymentStatus:
raise Unsupported("")
async def paid_invoices_stream(self) -> AsyncGenerator[str, None]: