From f8cdd6475cc60d15791db7e0fd6de665496f2812 Mon Sep 17 00:00:00 2001 From: "A. Schueler" Date: Sat, 22 May 2021 13:43:33 +0200 Subject: [PATCH] Reduce warnings when waiting for coingecko backoff --- freqtrade/rpc/fiat_convert.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/freqtrade/rpc/fiat_convert.py b/freqtrade/rpc/fiat_convert.py index 4987f8ce1..c4c5b5e25 100644 --- a/freqtrade/rpc/fiat_convert.py +++ b/freqtrade/rpc/fiat_convert.py @@ -143,10 +143,13 @@ class CryptoToFiatConverter: if crypto_symbol == fiat_symbol: return 1.0 - if self._cryptomap == {} and self._backoff <= datetime.datetime.now().timestamp(): - self._load_cryptomap() - # return 0.0 if we still dont have data to check, no reason to proceed - if self._cryptomap == {}: + if self._cryptomap == {}: + if self._backoff <= datetime.datetime.now().timestamp(): + self._load_cryptomap() + # return 0.0 if we still dont have data to check, no reason to proceed + if self._cryptomap == {}: + return 0.0 + else: return 0.0 if crypto_symbol not in self._cryptomap: