From 1fa77aefa67cd6feb13e9d279e92bbb9f43d4525 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Thu, 16 Sep 2021 10:29:40 +0300 Subject: [PATCH] Fix RPC results sort in history.py Traceback (most recent call last): File "history.py", line 148, in main() File "history.py", line 70, in main for balance, addr in sorted(zip(balances, args.address)): TypeError: '<' not supported between instances of 'dict' and 'dict' --- contrib/history.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/history.py b/contrib/history.py index c1b58a1..149ab32 100755 --- a/contrib/history.py +++ b/contrib/history.py @@ -67,7 +67,7 @@ def main(): client.request('blockchain.scripthash.get_balance', script_hash) for script_hash in script_hashes ) - for balance, addr in sorted(zip(balances, args.address)): + for addr, balance in sorted(zip(args.address, balances), key=lambda v: v[0]): if balance["confirmed"]: log.info("{}: confirmed {:,.5f} mBTC", addr, balance["confirmed"] / 1e5) if balance["unconfirmed"]: