fix: Add new better method of validating domain owner
All checks were successful
Build Docker / Build Image (push) Successful in 1m16s

This commit is contained in:
2025-07-12 13:50:30 +10:00
parent 2fab7b3bc0
commit 63e0b1c2f2

View File

@@ -449,12 +449,14 @@ def isOwnDomain(account, name: str):
domain_info = getDomain(name)
owner = getAddressFromCoin(domain_info['info']['owner']['hash'],domain_info['info']['owner']['index'])
# Select the account
print(hsw.rpc_selectWallet(account))
print(hsw.rpc_getAccount(owner))
hsw.rpc_selectWallet(account)
account = hsw.rpc_getAccount(owner)
domains = getDomains(account)
for domain in domains:
if domain['name'] == name:
if 'error' in account and account['error'] is not None:
return False
if 'result' not in account:
return False
if account['result'] == 'default':
return True
return False