show the date of the latest rate update on the monitor page

fixes #17
This commit is contained in:
2021-02-20 11:09:29 +01:00
parent 6cb7eb66d0
commit 059dafad60
5 changed files with 19 additions and 3 deletions
+3 -1
View File
@@ -59,6 +59,7 @@ class Calc:
def GetCurrentValue(self, userid, crypto, total_investment, current_value, total_tax_free):
amount_kept = 0
last_updated = None
out = {}
out["crypto"] = crypto
@@ -93,6 +94,7 @@ class Calc:
out["current_value"] = cv
out["amount_kept"] = amount_kept
out["rateEUR"] = rateEUR.rate
last_updated = rateEUR.datetime_valid
else:
out["current_value"] = None
out["amount_kept"] = None
@@ -134,4 +136,4 @@ class Calc:
out["value_tax_free"] = amount_available_to_sell * rateEUR.rate
total_tax_free += out["value_tax_free"]
return (total_investment, current_value, total_tax_free, rateEUR.rate, rateUSD.rate, out)
return (total_investment, current_value, total_tax_free, rateEUR.rate, rateUSD.rate, last_updated, out)