add status() method to wallets to be used in initial check.

This commit is contained in:
fiatjaf
2020-10-12 22:30:19 -03:00
parent d5d85d16e6
commit b5a07c7ae7
12 changed files with 160 additions and 30 deletions
+7 -1
View File
@@ -1,6 +1,6 @@
from typing import Optional, AsyncGenerator
from .base import InvoiceResponse, PaymentResponse, PaymentStatus, Wallet, Unsupported
from .base import StatusResponse, InvoiceResponse, PaymentResponse, PaymentStatus, Wallet, Unsupported
class VoidWallet(Wallet):
@@ -9,6 +9,12 @@ class VoidWallet(Wallet):
) -> InvoiceResponse:
raise Unsupported("")
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:
raise Unsupported("")