avoid voidwallet crash

This commit is contained in:
Tiago vasconcelos 2022-01-17 15:38:03 +00:00 committed by fiatjaf
parent 918e9be7ed
commit 09bfa35cd5

View File

@ -1,12 +1,12 @@
from typing import Optional, AsyncGenerator from typing import AsyncGenerator, Optional
from .base import ( from .base import (
StatusResponse,
InvoiceResponse, InvoiceResponse,
PaymentResponse, PaymentResponse,
PaymentStatus, PaymentStatus,
Wallet, StatusResponse,
Unsupported, Unsupported,
Wallet,
) )
@ -20,8 +20,9 @@ class VoidWallet(Wallet):
raise Unsupported("") raise Unsupported("")
async def status(self) -> StatusResponse: async def status(self) -> StatusResponse:
print("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.")
return 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.", None,
0, 0,
) )