encointer / encointer-node

encointer node and cli client
Apache License 2.0
23 stars 8 forks source link

fetch-account-history.py broken since Kigali Aslah was registered #273

Closed brenzi closed 1 year ago

brenzi commented 2 years ago
>./fetch-account-history.py <apikey>

scanning block 1689688 (44.32497013142174%) page : 0 - nr of events: 1, eta 0.14980362937617495h
Traceback (most recent call last):
  File "./fetch-account-history.py", line 85, in <module>
    cid = cid_raw['geohash'] + b58encode(bytearray.fromhex(cid_raw['digest'][2:])).decode("utf-8")
ValueError: non-hexadecimal number found in fromhex() arg at position 0

The reason is https://github.com/encointer/encointer-parachain/issues/155

The fix should be: Make decoding conditional based on 0x prefix here: https://github.com/encointer/encointer-node/blob/c1c4b6571ca2a4d23561db8b4520fa147f2f6346/client/fetch-account-history.py#L79