Fix wallet calls

closes #4810  #4812
This commit is contained in:
Matthias 2021-04-26 14:12:52 +02:00
parent 929c49a62e
commit 3f84c37a79

View File

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