swaps: more robust parsing

This commit is contained in:
SomberNight
2025-08-19 12:57:23 +00:00
parent 5b8569e814
commit 81be0554a3
3 changed files with 96 additions and 53 deletions

View File

@@ -210,6 +210,8 @@ class CosignerWallet(Logger):
continue
try:
message = json_decode(message)
if not isinstance(message, dict):
raise Exception("malformed message, not dict")
tx_hex = message.get('tx')
label = message.get('label', '')
tx = tx_from_any(tx_hex)