feat: Add support for test networks
All checks were successful
Build Docker / Build Image (push) Successful in 52s

This commit is contained in:
2025-01-31 11:01:10 +11:00
parent 26633c1c61
commit 8622400427
8 changed files with 127 additions and 46 deletions

View File

@@ -500,16 +500,15 @@ def advancedChangeLookahead(params, authentication):
lookahead = int(lookahead)
wallet = authentication.split(":")[0]
password = ":".join(authentication.split(":")[1:])
APIKEY = os.getenv("hsd_api")
ip = os.getenv("hsd_ip")
if ip is None:
ip = "localhost"
KEY = account.HSD_API
IP = account.HSD_IP
PORT = account.HSD_WALLET_PORT
# Unlock wallet
response = requests.post(f"http://x:{APIKEY}@{ip}:12039/wallet/{wallet}/unlock",
response = requests.post(f"http://x:{KEY}@{IP}:{PORT}/wallet/{wallet}/unlock",
json={"passphrase": password, "timeout": 10})
response = requests.patch(f"http://x:{APIKEY}@{ip}:12039/wallet/{wallet}/account/default",
response = requests.patch(f"http://x:{KEY}@{IP}:{PORT}/wallet/{wallet}/account/default",
json={"lookahead": lookahead})