1
0

qml: add validators for BtcField and FiatField controls

This commit is contained in:
Sander van Grieken
2023-05-09 15:43:11 +02:00
parent cb9ba819ec
commit 4df6052567
5 changed files with 34 additions and 5 deletions

View File

@@ -567,6 +567,9 @@ class FxThread(ThreadJob, EventListener):
return text
return text[:dp_loc] + util.DECIMAL_POINT + text[dp_loc+1:]
def ccy_precision(self, ccy=None) -> int:
return CCY_PRECISIONS.get(self.ccy if ccy is None else ccy, 2)
async def run(self):
while True:
# every few minutes, refresh spot price