mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-09-03 20:35:13 +00:00
fix #3912
This commit is contained in:
parent
cd6067f383
commit
945ba8decf
1 changed files with 4 additions and 0 deletions
|
@ -107,6 +107,8 @@ class ExchangeBase(PrintError):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
def historical_rate(self, ccy, d_t):
|
def historical_rate(self, ccy, d_t):
|
||||||
|
if d_t is None:
|
||||||
|
return None
|
||||||
return self.history.get(ccy, {}).get(d_t.strftime('%Y-%m-%d'))
|
return self.history.get(ccy, {}).get(d_t.strftime('%Y-%m-%d'))
|
||||||
|
|
||||||
def get_currencies(self):
|
def get_currencies(self):
|
||||||
|
@ -519,6 +521,8 @@ class FxThread(ThreadJob):
|
||||||
return _("No data")
|
return _("No data")
|
||||||
|
|
||||||
def history_rate(self, d_t):
|
def history_rate(self, d_t):
|
||||||
|
if d_t is None:
|
||||||
|
return None
|
||||||
rate = self.exchange.historical_rate(self.ccy, d_t)
|
rate = self.exchange.historical_rate(self.ccy, d_t)
|
||||||
# Frequently there is no rate for today, until tomorrow :)
|
# Frequently there is no rate for today, until tomorrow :)
|
||||||
# Use spot quotes in that case
|
# Use spot quotes in that case
|
||||||
|
|
Loading…
Add table
Reference in a new issue