From c28874bb1c9c6a92cb5aa05d9af3c6c0544f10da Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Tue, 13 Feb 2024 09:56:46 +1100 Subject: [PATCH] fix: Check that domains are closed before including their value --- account.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/account.py b/account.py index 16e12ec..521294f 100644 --- a/account.py +++ b/account.py @@ -134,7 +134,8 @@ def getBalance(account: str): domains = getDomains(account) domainValue = 0 for domain in domains: - domainValue += domain['value'] + if domain['state'] == "CLOSED": + domainValue += domain['value'] total = total - (domainValue/1000000) # Only keep 2 decimal places