Upgrade chainlib

This commit is contained in:
nolash
2021-10-28 12:17:32 +02:00
parent 6ee3ea4638
commit 5f9634d5a4
5 changed files with 11 additions and 8 deletions

View File

@@ -63,8 +63,12 @@ send = config.true('_RPC_SEND')
def balance(address, id_generator):
o = gas_balance(address, id_generator=id_generator)
r = conn.do(o)
hx = strip_0x(r)
return int(hx, 16)
try:
balance = int(r)
except ValueError:
balance = strip_0x(r)
balance = int(balance, 16)
return balance
def main():