fix: Check that domains are closed before including their value
All checks were successful
Build Docker / Build Image (push) Successful in 29s

This commit is contained in:
Nathan Woodburn 2024-02-13 09:56:46 +11:00
parent 6e382b0e6e
commit c28874bb1c
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1

View File

@ -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