From 360ca7bfe9595ebf31ff3a95c7431aca3161c877 Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Mon, 12 Feb 2024 21:18:05 +1100 Subject: [PATCH] fix: Finally get around to having an accurate total HNS count --- account.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/account.py b/account.py index ed6e0ac..16e12ec 100644 --- a/account.py +++ b/account.py @@ -131,6 +131,12 @@ def getBalance(account: str): total = total / 1000000 available = available / 1000000 + domains = getDomains(account) + domainValue = 0 + for domain in domains: + domainValue += domain['value'] + total = total - (domainValue/1000000) + # Only keep 2 decimal places total = round(total, 2) available = round(available, 2)