Compare commits
3 Commits
feat/WALLE
...
49e378803d
| Author | SHA1 | Date | |
|---|---|---|---|
|
49e378803d
|
|||
|
1c53547047
|
|||
|
080c4402d8
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,3 +16,4 @@ customPlugins/
|
|||||||
cache/
|
cache/
|
||||||
build/
|
build/
|
||||||
dist/
|
dist/
|
||||||
|
hsd/
|
||||||
|
|||||||
@@ -408,6 +408,10 @@ def check_hip2(domain: str):
|
|||||||
if not check_address(address, False, True):
|
if not check_address(address, False, True):
|
||||||
return 'Hip2: Lookup succeeded but address is invalid'
|
return 'Hip2: Lookup succeeded but address is invalid'
|
||||||
return address
|
return address
|
||||||
|
|
||||||
|
# Check if DISABLE_WALLETDNS is set
|
||||||
|
if os.getenv("DISABLE_WALLETDNS","").lower() in ["1","true","yes"]:
|
||||||
|
return "No HIP2 record found for this domain"
|
||||||
# Try using WALLET TXT record
|
# Try using WALLET TXT record
|
||||||
address = domainLookup.wallet_txt(domain)
|
address = domainLookup.wallet_txt(domain)
|
||||||
if not address.startswith("hs1"):
|
if not address.startswith("hs1"):
|
||||||
|
|||||||
@@ -3,3 +3,5 @@ HSD_IP=localhost
|
|||||||
THEME=black
|
THEME=black
|
||||||
SHOW_EXPIRED=false
|
SHOW_EXPIRED=false
|
||||||
EXPLORER_TX=https://shakeshift.com/transaction/
|
EXPLORER_TX=https://shakeshift.com/transaction/
|
||||||
|
DISABLE_WALLETDNS=false
|
||||||
|
INTERNAL_HSD=false
|
||||||
27
render.py
27
render.py
@@ -6,30 +6,7 @@ from domainLookup import punycode_to_emoji
|
|||||||
import os
|
import os
|
||||||
from handywrapper import api
|
from handywrapper import api
|
||||||
import threading
|
import threading
|
||||||
|
import account
|
||||||
HSD_API = os.getenv("HSD_API","")
|
|
||||||
HSD_IP = os.getenv("HSD_IP","localhost")
|
|
||||||
|
|
||||||
HSD_NETWORK = os.getenv("HSD_NETWORK")
|
|
||||||
HSD_WALLET_PORT = 12039
|
|
||||||
HSD_NODE_PORT = 12037
|
|
||||||
|
|
||||||
if not HSD_NETWORK:
|
|
||||||
HSD_NETWORK = "main"
|
|
||||||
else:
|
|
||||||
HSD_NETWORK = HSD_NETWORK.lower()
|
|
||||||
|
|
||||||
if HSD_NETWORK == "simnet":
|
|
||||||
HSD_WALLET_PORT = 15039
|
|
||||||
HSD_NODE_PORT = 15037
|
|
||||||
elif HSD_NETWORK == "testnet":
|
|
||||||
HSD_WALLET_PORT = 13039
|
|
||||||
HSD_NODE_PORT = 13037
|
|
||||||
elif HSD_NETWORK == "regtest":
|
|
||||||
HSD_WALLET_PORT = 14039
|
|
||||||
HSD_NODE_PORT = 14037
|
|
||||||
|
|
||||||
hsd = api.hsd(HSD_API, HSD_IP, HSD_NODE_PORT)
|
|
||||||
|
|
||||||
# Get Explorer URL
|
# Get Explorer URL
|
||||||
TX_EXPLORER_URL = os.getenv("EXPLORER_TX")
|
TX_EXPLORER_URL = os.getenv("EXPLORER_TX")
|
||||||
@@ -559,7 +536,7 @@ def renderDomainAsync(namehash: str) -> None:
|
|||||||
if namehash in cache:
|
if namehash in cache:
|
||||||
return
|
return
|
||||||
# Fetch the name outside the lock (network call)
|
# Fetch the name outside the lock (network call)
|
||||||
name = hsd.rpc_getNameByHash(namehash)
|
name = account.hsd.rpc_getNameByHash(namehash)
|
||||||
if name["error"] is None:
|
if name["error"] is None:
|
||||||
name = name["result"]
|
name = name["result"]
|
||||||
rendered = renderDomain(name)
|
rendered = renderDomain(name)
|
||||||
|
|||||||
Reference in New Issue
Block a user