From c4cd2bc443ccbc11c83e0a69a04929ee8061567a Mon Sep 17 00:00:00 2001 From: Nathan Woodburn Date: Thu, 18 Sep 2025 16:35:34 +1000 Subject: [PATCH] fix: Check if blocksSinceExpired to get expired domains --- account.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/account.py b/account.py index 181938c..dac3136 100644 --- a/account.py +++ b/account.py @@ -486,9 +486,14 @@ def getDomains(account, own: bool = True, expired: bool = SHOW_EXPIRED): # Remove any expired domains domains = [] for domain in info: - if 'stats' in domain: + if 'stats' in domain and domain['stats'] is not None: if 'daysUntilExpire' in domain['stats']: if domain['stats']['daysUntilExpire'] < 0: + logger.debug(f"Excluding expired domain: {domain['name']} due to daysUntilExpire") + continue + if 'blocksSinceExpired' in domain['stats']: + if domain['stats']['blocksSinceExpired'] > 0: + logger.debug(f"Excluding expired domain: {domain['name']} due to blocksSinceExpired") continue domains.append(domain) @@ -1571,9 +1576,9 @@ def getMempoolBids(): # region settingsAPIs -def rescan(): +def rescan(height:int = 0): try: - response = hsw.walletRescan(0) + response = hsw.walletRescan(height) if 'success' in response and response['success'] is False: return { "error": {