Don't fail on leverage tier loading error

closes #8512
This commit is contained in:
Matthias
2023-04-18 18:01:12 +02:00
parent ea566c6eb7
commit caf524c685

View File

@@ -2431,6 +2431,7 @@ class Exchange:
def load_cached_leverage_tiers(self, stake_currency: str) -> Optional[Dict[str, List[Dict]]]:
filename = self._config['datadir'] / "futures" / f"leverage_tiers_{stake_currency}.json"
if filename.is_file():
try:
tiers = file_load_json(filename)
updated = tiers.get('updated')
if updated:
@@ -2439,6 +2440,8 @@ class Exchange:
logger.info("Cached leverage tiers are outdated. Will update.")
return None
return tiers['data']
except Exception:
logger.exception("Error loading cached leverage tiers. Refreshing.")
return None
def fill_leverage_tiers(self) -> None: