Fix bug of balances not disappearing

This commit is contained in:
Matthias 2020-09-22 19:37:31 +02:00
parent 4b06c9e0ae
commit 6b46a35b19
1 changed files with 5 additions and 0 deletions

View File

@ -2,6 +2,7 @@
""" Wallet """
import logging
from copy import deepcopy
from typing import Any, Dict, NamedTuple
import arrow
@ -93,6 +94,10 @@ class Wallets:
balances[currency].get('used', None),
balances[currency].get('total', None)
)
# Remove currencies no longer in get_balances output
for currency in deepcopy(self._wallets):
if currency not in balances:
del self._wallets[currency]
def update(self, require_update: bool = True) -> None:
"""