fix: Add SPV support for getDNS()
All checks were successful
Build Docker / Build Image (push) Successful in 55s
All checks were successful
Build Docker / Build Image (push) Successful in 55s
This commit is contained in:
12
account.py
12
account.py
@@ -774,7 +774,6 @@ def getDomain(domain: str):
|
|||||||
"message": response['error']['message']
|
"message": response['error']['message']
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return response['result']
|
return response['result']
|
||||||
|
|
||||||
def isKnownDomain(domain: str) -> bool:
|
def isKnownDomain(domain: str) -> bool:
|
||||||
@@ -817,6 +816,17 @@ def renewDomain(account, domain):
|
|||||||
|
|
||||||
def getDNS(domain: str):
|
def getDNS(domain: str):
|
||||||
# Get the DNS
|
# Get the DNS
|
||||||
|
|
||||||
|
if isSPV():
|
||||||
|
response = requests.get(f"https://hsd.hns.au/api/v1/nameresource/{domain}")
|
||||||
|
if response.status_code != 200:
|
||||||
|
return {
|
||||||
|
"error": f"Error fetching DNS records: {response.status_code}"
|
||||||
|
}
|
||||||
|
response = response.json()
|
||||||
|
return response.get('records', [])
|
||||||
|
|
||||||
|
|
||||||
response = hsd.rpc_getNameResource(domain)
|
response = hsd.rpc_getNameResource(domain)
|
||||||
if response['error'] is not None:
|
if response['error'] is not None:
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user