diff --git a/cashu/lightning/strike.py b/cashu/lightning/strike.py index 15a47aa..cf35cb4 100644 --- a/cashu/lightning/strike.py +++ b/cashu/lightning/strike.py @@ -16,6 +16,8 @@ from .base import ( StatusResponse, ) +USDT = "USDT" + class StrikeWallet(LightningBackend): """https://docs.strike.me/api/""" @@ -67,6 +69,23 @@ class StrikeWallet(LightningBackend): ).amount, ) + # if no the unit is USD but no USD balance was found, we try USDT + if self.unit == Unit.usd: + for balance in data: + if balance["currency"] == USDT: + self.currency = USDT + return StatusResponse( + error_message=None, + balance=Amount.from_float( + float(balance["total"]), self.unit + ).amount, + ) + + return StatusResponse( + error_message=f"Could not find balance for currency {self.currency}", + balance=0, + ) + async def create_invoice( self, amount: Amount,