This commit is contained in:
Black Coffee 2022-11-14 14:07:26 +00:00
parent a0a7ae9be1
commit df56b84ad2

View file

@ -351,27 +351,27 @@ async def get_onchain_dashboard(gerty):
)
text = []
stat = round(r.json()["progressPercent"])
text.append(get_text_item_dict("Progress through current epoch", 12))
text.append(get_text_item_dict("Progress through epoch", 12))
text.append(get_text_item_dict("{0}%".format(stat), 60))
areas.append(text)
text = []
stat = r.json()["estimatedRetargetDate"]
dt = datetime.fromtimestamp(stat / 1000).strftime("%e %b %Y at %H:%M")
text.append(get_text_item_dict("Date of next difficulty adjustment", 12))
text.append(get_text_item_dict("Date of next adjustment", 12))
text.append(get_text_item_dict(dt, 20))
areas.append(text)
text = []
stat = r.json()["remainingBlocks"]
text.append(get_text_item_dict("Blocks until next adjustment", 12))
text.append(get_text_item_dict("Blocks until adjustment", 12))
text.append(get_text_item_dict("{0}".format(format_number(stat)), 60))
areas.append(text)
text = []
stat = r.json()["remainingTime"]
text.append(get_text_item_dict("Blocks until next adjustment", 12))
text.append(get_text_item_dict(get_time_remaining(stat / 1000, 4), 60))
text.append(get_text_item_dict("Time until adjustment", 12))
text.append(get_text_item_dict(get_time_remaining(stat / 1000, 4), 20))
areas.append(text)
return areas