mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
exchange_rate: fix #5495
This commit is contained in:
parent
16f56ccbf0
commit
40e2b1d6e7
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Reference in a new issue