mirror of
https://github.com/aljazceru/nutshell.git
synced 2025-12-20 18:44:20 +01:00
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:
@@ -76,12 +76,14 @@ class LedgerFeatures(SupportsBackends):
|
||||
|
||||
# specify which websocket features are supported
|
||||
# these two are supported by default
|
||||
websocket_features: List[Dict[str, Union[str, List[str]]]] = []
|
||||
websocket_features: Dict[str, List[Dict[str, Union[str, List[str]]]]] = {
|
||||
"supported": []
|
||||
}
|
||||
# we check the backend to see if "bolt11_mint_quote" is supported as well
|
||||
for method, unit_dict in self.backends.items():
|
||||
if method == Method["bolt11"]:
|
||||
for unit in unit_dict.keys():
|
||||
websocket_features.append(
|
||||
websocket_features["supported"].append(
|
||||
{
|
||||
"method": method.name,
|
||||
"unit": unit.name,
|
||||
@@ -90,11 +92,11 @@ class LedgerFeatures(SupportsBackends):
|
||||
)
|
||||
if unit_dict[unit].supports_incoming_payment_stream:
|
||||
supported_features: List[str] = list(
|
||||
websocket_features[-1]["commands"]
|
||||
websocket_features["supported"][-1]["commands"]
|
||||
)
|
||||
websocket_features["supported"][-1]["commands"] = (
|
||||
supported_features + ["bolt11_mint_quote"]
|
||||
)
|
||||
websocket_features[-1]["commands"] = supported_features + [
|
||||
"bolt11_mint_quote"
|
||||
]
|
||||
|
||||
if websocket_features:
|
||||
mint_features[WEBSOCKETS_NUT] = websocket_features
|
||||
|
||||
Reference in New Issue
Block a user