fix: Make output have breaks
This commit is contained in:
parent
67ee2e0ba6
commit
a3b3687da2
@ -51,7 +51,7 @@ functions = {
|
||||
"type": "text"
|
||||
},
|
||||
"xpub": {
|
||||
"name": "xPub of the account to generate addresses for (defaults to current account)",
|
||||
"name": "xPub of the account to check addresses for (defaults to current account)",
|
||||
"type": "text"
|
||||
}
|
||||
},
|
||||
@ -107,6 +107,8 @@ def generate(params, authentication):
|
||||
|
||||
if (xpub == None):
|
||||
xpub = account.getxPub(authentication)
|
||||
if (xpub == None):
|
||||
return {"result": "No xpub found"}
|
||||
|
||||
result = subprocess.run(["node", "generate-address.js", "--xpub", xpub, "--number", str(count), "--startIndex", str(startIndex)], capture_output=True, text=True, cwd=os.path.realpath("hns-address"))
|
||||
with open(f"{xpub}-addresses.txt", "w") as f:
|
||||
@ -124,13 +126,16 @@ def validate(params, authentication):
|
||||
|
||||
if (xpub == None):
|
||||
xpub = account.getxPub(authentication)
|
||||
print(f"xpub: {xpub}")
|
||||
if (xpub == None):
|
||||
return {"result": "No xpub found"}
|
||||
|
||||
if (address == None):
|
||||
return {"result": "Address is required"}
|
||||
|
||||
result = subprocess.run(["node", "find-address.js", "--xpub", xpub, "--address", address, "--end", "10000"], capture_output=True, text=True, cwd=os.path.realpath("hns-address"))
|
||||
|
||||
return {"result": result.stdout}
|
||||
return {"result": result.stdout.replace("\n", "<br>")}
|
||||
|
||||
if __name__ == "__main__":
|
||||
print(generate({
|
||||
|
Loading…
Reference in New Issue
Block a user