Fix NUT-17 settings entry for NUT-06 (#587)

* Fix NUT-17 settings entry for NUT-06

* Wallet: fix mint info deserialization
This commit is contained in:
callebtc
2024-07-16 17:38:19 +02:00
committed by GitHub
parent 21f339ca2b
commit c6f236494f
2 changed files with 11 additions and 8 deletions

View File

@@ -43,9 +43,10 @@ class MintInfo(BaseModel):
if not self.nuts or not self.supports_nut(WEBSOCKETS_NUT):
return False
websocket_settings = self.nuts[WEBSOCKETS_NUT]
if not websocket_settings:
if not websocket_settings or "supported" not in websocket_settings:
return False
for entry in websocket_settings:
websocket_supported = websocket_settings["supported"]
for entry in websocket_supported:
if entry["method"] == method.name and entry["unit"] == unit.name:
if "bolt11_mint_quote" in entry["commands"]:
return True