Merge pull request #3798 from freqtrade/fix/wallets_dont_reset

Fix wallets dont reset
This commit is contained in:
Matthias
2020-09-24 19:22:14 +02:00
committed by GitHub
2 changed files with 13 additions and 1 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:
"""