Merge branch 'dev'

Update shakeshift explorer and fix unencrypted wallets
This commit is contained in:
2025-05-08 12:09:53 +10:00
9 changed files with 283 additions and 221 deletions

Binary file not shown.

View File

@@ -122,7 +122,7 @@ HSD_IP: HSD IP address
THEME: Theme to use (dark-purple, black) THEME: Theme to use (dark-purple, black)
SHOW_EXPIRED: Show expired domains (true/false) SHOW_EXPIRED: Show expired domains (true/false)
EXCLUDE: Comma separated list of wallets to exclude from the wallet list (default primary) EXCLUDE: Comma separated list of wallets to exclude from the wallet list (default primary)
EXPLORER_TX: URL for exploring transactions (default https://niami.io/tx/) EXPLORER_TX: URL for exploring transactions (default https://shakeshift.com/transaction/)
HSD_NETWORK: Network to connect to (main, regtest, simnet) HSD_NETWORK: Network to connect to (main, regtest, simnet)
``` ```

File diff suppressed because it is too large Load Diff

View File

@@ -2,4 +2,4 @@ HSD_API=123480615465636893475aCwyaae6s45
HSD_IP=localhost HSD_IP=localhost
THEME=black THEME=black
SHOW_EXPIRED=false SHOW_EXPIRED=false
EXPLORER_TX=https://niami.io/tx/ EXPLORER_TX=https://shakeshift.com/transaction/

10
main.py
View File

@@ -178,7 +178,15 @@ def sendConfirmed():
address = request.args.get("address") address = request.args.get("address")
amount = float(request.args.get("amount")) amount = float(request.args.get("amount"))
response = account_module.send(request.cookies.get("account"),address,amount) response = account_module.send(request.cookies.get("account"),address,amount)
if 'error' in response: if 'error' in response and response['error'] != None:
# If error is a dict get the message
if isinstance(response['error'], dict):
if 'message' in response['error']:
return redirect("/send?message=" + response['error']['message'] + "&address=" + address + "&amount=" + str(amount))
else:
return redirect("/send?message=" + str(response['error']) + "&address=" + address + "&amount=" + str(amount))
# If error is a string
return redirect("/send?message=" + response['error'] + "&address=" + address + "&amount=" + str(amount)) return redirect("/send?message=" + response['error'] + "&address=" + address + "&amount=" + str(amount))
return redirect("/success?tx=" + response['tx']) return redirect("/success?tx=" + response['tx'])

View File

@@ -9,7 +9,7 @@ import os
info = { info = {
"name": "Batching Functions", "name": "Batching Functions",
"description": "This is a plugin that provides multiple functions to batch transactions", "description": "This is a plugin that provides multiple functions to batch transactions",
"version": "1.0", "version": "1.1",
"author": "Nathan.Woodburn/" "author": "Nathan.Woodburn/"
} }
# https://hsd-dev.org/api-docs/?shell--cli#sendbatch # https://hsd-dev.org/api-docs/?shell--cli#sendbatch
@@ -394,7 +394,6 @@ def bid(params, authentication):
for domain in domains: for domain in domains:
batch.append(['BID', domain, bid, blind]) batch.append(['BID', domain, bid, blind])
print(batch)
response = sendBatch(batch, authentication) response = sendBatch(batch, authentication)
if 'error' in response: if 'error' in response:
return { return {

View File

@@ -8,7 +8,7 @@ import os
# Get Explorer URL # Get Explorer URL
TX_EXPLORER_URL = os.getenv("EXPLORER_TX") TX_EXPLORER_URL = os.getenv("EXPLORER_TX")
if TX_EXPLORER_URL is None: if TX_EXPLORER_URL is None:
TX_EXPLORER_URL = "https://niami.io/tx/" TX_EXPLORER_URL = "https://shakeshift.com/transaction/"

View File

@@ -2,4 +2,4 @@
<span style="display: block;">Check your transaction on a block explorer</span> <span style="display: block;">Check your transaction on a block explorer</span>
<a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a> <a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a>
<a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a> <a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a>
<a class="card-link" href="https://hns.cymon.de/tx/{{tx}}" target="_blank">Cymon.de</a> <a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>

View File

@@ -67,7 +67,7 @@
</div> </div>
<div class="card" style="max-width: 500px;margin: auto;margin-top: 50px;"> <div class="card" style="max-width: 500px;margin: auto;margin-top: 50px;">
<div class="card-body"> <div class="card-body">
<h4 class="card-title">Your transaction has been sent and will be mined soon.</h4><span style="display: block;font-size: 12px;">TX: {{tx}}</span><span style="display: block;">Check your transaction on a block explorer</span><a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a><a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a><a class="card-link" href="https://hns.cymon.de/tx/{{tx}}" target="_blank">HNS.Cymon.de</a> <h4 class="card-title">Your transaction has been sent and will be mined soon.</h4><span style="display: block;font-size: 12px;">TX: {{tx}}</span><span style="display: block;">Check your transaction on a block explorer</span><a class="card-link" href="https://niami.io/tx/{{tx}}" target="_blank">Niami</a><a class="card-link" href="https://3xpl.com/handshake/transaction/{{tx}}" target="_blank">3xpl</a><a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>
</div> </div>
</div> </div>
</div> </div>