1
0
mirror of https://github.com/romanz/electrs.git synced 2024-11-19 01:43:29 +01:00

Fix RPC results sort in history.py

Traceback (most recent call last):
  File "history.py", line 148, in <module>
    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'
This commit is contained in:
Roman Zeyde 2021-09-16 10:29:40 +03:00
parent 844723f5f4
commit 1fa77aefa6

View File

@ -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"]: