diff --git a/electrum/exchange_rate.py b/electrum/exchange_rate.py index d19a7dcd0..2f26ff5d1 100644 --- a/electrum/exchange_rate.py +++ b/electrum/exchange_rate.py @@ -615,11 +615,11 @@ class FxThread(ThreadJob): rate = self.exchange.historical_rate(self.ccy, d_t) # Frequently there is no rate for today, until tomorrow :) # Use spot quotes in that case - if rate == 'NaN' and (datetime.today().date() - d_t.date()).days <= 2: + if rate in ('NaN', None) and (datetime.today().date() - d_t.date()).days <= 2: rate = self.exchange.quotes.get(self.ccy, 'NaN') - if rate is None: - rate = 'NaN' self.history_used_spot = True + if rate is None: + rate = 'NaN' return Decimal(rate) def historical_value_str(self, satoshis, d_t):