mypy fixes.
This commit is contained in:
@@ -32,7 +32,7 @@ class PaymentStatus(NamedTuple):
|
||||
|
||||
class Wallet(ABC):
|
||||
@abstractmethod
|
||||
def status() -> StatusResponse:
|
||||
def status(self) -> StatusResponse:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
|
||||
@@ -23,7 +23,7 @@ class LNPayWallet(Wallet):
|
||||
try:
|
||||
r = httpx.get(url, headers=self.auth)
|
||||
except (httpx.ConnectError, httpx.RequestError):
|
||||
return StatusResponse(f"Unable to connect to '{url}'")
|
||||
return StatusResponse(f"Unable to connect to '{url}'", 0)
|
||||
|
||||
if r.is_error:
|
||||
return StatusResponse(r.text[:250], 0)
|
||||
|
||||
@@ -24,7 +24,7 @@ class OpenNodeWallet(Wallet):
|
||||
try:
|
||||
r = httpx.get(f"{self.endpoint}/v1/account/balance", headers=self.auth)
|
||||
except (httpx.ConnectError, httpx.RequestError):
|
||||
return StatusResponse(f"Unable to connect to '{self.endpoint}'")
|
||||
return StatusResponse(f"Unable to connect to '{self.endpoint}'", 0)
|
||||
|
||||
data = r.json()["message"]
|
||||
if r.is_error:
|
||||
|
||||
Reference in New Issue
Block a user