Use leaf instead of collect in balance retrieve from api

This commit is contained in:
nolash 2021-04-12 13:10:57 +02:00
parent 7dee7de26e
commit 1ddaea8acb
Signed by untrusted user who does not match committer: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -241,9 +241,7 @@ class TrafficProvisioner:
#callback_queue=queue,
)
t = api.balance(account, token.symbol())
r = t.get()
for c in t.collect():
r = c[1]
r = t.get_leaf()
assert t.successful()
#return r[0]['balance_network'] - r[0]['balance_outgoing']
return r[0]