parent
929c49a62e
commit
3f84c37a79
@ -99,12 +99,13 @@ class Wallets:
|
|||||||
balances = self._exchange.get_balances()
|
balances = self._exchange.get_balances()
|
||||||
|
|
||||||
for currency in balances:
|
for currency in balances:
|
||||||
self._wallets[currency] = Wallet(
|
if isinstance(balances[currency], dict):
|
||||||
currency,
|
self._wallets[currency] = Wallet(
|
||||||
balances[currency].get('free', None),
|
currency,
|
||||||
balances[currency].get('used', None),
|
balances[currency].get('free', None),
|
||||||
balances[currency].get('total', None)
|
balances[currency].get('used', None),
|
||||||
)
|
balances[currency].get('total', None)
|
||||||
|
)
|
||||||
# Remove currencies no longer in get_balances output
|
# Remove currencies no longer in get_balances output
|
||||||
for currency in deepcopy(self._wallets):
|
for currency in deepcopy(self._wallets):
|
||||||
if currency not in balances:
|
if currency not in balances:
|
||||||
|
Loading…
Reference in New Issue
Block a user