mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
kivy fx: make sure displayed fiat values get updated
This commit is contained in:
parent
3e3d387161
commit
fffec71fb3
2 changed files with 6 additions and 4 deletions
|
@ -486,7 +486,8 @@ class FxThread(ThreadJob):
|
|||
return bool(self.config.get('use_exchange_rate'))
|
||||
|
||||
def set_enabled(self, b):
|
||||
return self.config.set_key('use_exchange_rate', bool(b))
|
||||
self.config.set_key('use_exchange_rate', bool(b))
|
||||
self.trigger.set()
|
||||
|
||||
def get_history_config(self):
|
||||
return bool(self.config.get('history_rates'))
|
||||
|
@ -541,8 +542,8 @@ class FxThread(ThreadJob):
|
|||
if self.network:
|
||||
self.network.trigger_callback('on_history')
|
||||
|
||||
def exchange_rate(self):
|
||||
'''Returns None, or the exchange rate as a Decimal'''
|
||||
def exchange_rate(self) -> Decimal:
|
||||
"""Returns the exchange rate as a Decimal"""
|
||||
rate = self.exchange.quotes.get(self.ccy)
|
||||
if rate is None:
|
||||
return Decimal('NaN')
|
||||
|
|
|
@ -156,6 +156,7 @@ class ElectrumWindow(App):
|
|||
|
||||
def on_quotes(self, d):
|
||||
Logger.info("on_quotes")
|
||||
self._trigger_update_status()
|
||||
self._trigger_update_history()
|
||||
|
||||
def on_history(self, d):
|
||||
|
|
Loading…
Add table
Reference in a new issue