Skip to content

Commit

Permalink
fix lnbitswallet
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Nov 21, 2023
1 parent 41244bc commit e1a9104
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cashu/lightning/lnbits.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ async def status(self) -> StatusResponse:
except Exception as exc:
return StatusResponse(
error_message=f"Failed to connect to {self.endpoint} due to: {exc}",
balance_msat=0,
balance=0,
)

try:
Expand All @@ -46,14 +46,14 @@ async def status(self) -> StatusResponse:
error_message=(
f"Failed to connect to {self.endpoint}, got: '{r.text[:200]}...'"
),
balance_msat=0,
balance=0,
)
if "detail" in data:
return StatusResponse(
error_message=f"LNbits error: {data['detail']}", balance_msat=0
error_message=f"LNbits error: {data['detail']}", balance=0
)

return StatusResponse(error_message=None, balance_msat=data["balance"])
return StatusResponse(error_message=None, balance=data["balance"])

async def create_invoice(
self,
Expand Down

0 comments on commit e1a9104

Please sign in to comment.