Skip to content

Commit

Permalink
nuts optionsl mint
Browse files Browse the repository at this point in the history
 info
  • Loading branch information
callebtc committed May 22, 2024
1 parent 1c04e6a commit 87b6247
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cashu/wallet/mint_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MintInfo(BaseModel):
description_long: Optional[str]
contact: Optional[List[List[str]]]
motd: Optional[str]
nuts: Dict[int, Any]
nuts: Optional[Dict[int, Any]]

def __str__(self):
return f"{self.name} ({self.description})"
Expand All @@ -24,6 +24,8 @@ def supports_nut(self, nut: int) -> bool:
return nut in self.nuts

def supports_mpp(self, method: str, unit: Unit) -> bool:
if not self.nuts:
return False
nut_15 = self.nuts.get(15)
if not nut_15 or not self.supports_nut(15):
return False
Expand Down

0 comments on commit 87b6247

Please sign in to comment.