Compare commits
18 Commits
v1.2
...
d92cb7c743
| Author | SHA1 | Date | |
|---|---|---|---|
|
d92cb7c743
|
|||
|
fd1ba1d059
|
|||
|
6bbc294116
|
|||
|
80e380b183
|
|||
|
30f61f1505
|
|||
|
3bee713b9a
|
|||
|
7bd59a0fd6
|
|||
|
56016b1f6f
|
|||
|
3aff724b81
|
|||
|
afc227b5b4
|
|||
|
ab7749ef93
|
|||
|
a568abeb49
|
|||
|
4652af3a2d
|
|||
|
65eedff61c
|
|||
|
9aa061691d
|
|||
|
ce8c773db3
|
|||
|
461e2cdbe9
|
|||
|
12884fe696
|
2
.gitignore
vendored
2
.gitignore
vendored
@@ -14,3 +14,5 @@ plugins/signatures.json
|
||||
user_data/
|
||||
customPlugins/
|
||||
cache/
|
||||
build/
|
||||
dist/
|
||||
|
||||
Binary file not shown.
@@ -122,7 +122,7 @@ HSD_IP: HSD IP address
|
||||
THEME: Theme to use (dark-purple, black)
|
||||
SHOW_EXPIRED: Show expired domains (true/false)
|
||||
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)
|
||||
```
|
||||
|
||||
|
||||
93
account.py
93
account.py
@@ -51,11 +51,13 @@ EXCLUDE = ["primary"]
|
||||
if os.getenv("EXCLUDE") is not None:
|
||||
EXCLUDE = os.getenv("EXCLUDE").split(",")
|
||||
|
||||
|
||||
def hsdConnected():
|
||||
if hsdVersion() == -1:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def hsdVersion(format=True):
|
||||
info = hsd.getInfo()
|
||||
if 'error' in info:
|
||||
@@ -65,6 +67,7 @@ def hsdVersion(format=True):
|
||||
else:
|
||||
return info['version']
|
||||
|
||||
|
||||
def check_account(cookie: str):
|
||||
if cookie is None:
|
||||
return False
|
||||
@@ -80,6 +83,7 @@ def check_account(cookie: str):
|
||||
return False
|
||||
return account
|
||||
|
||||
|
||||
def check_password(cookie: str, password: str):
|
||||
account = check_account(cookie)
|
||||
if account == False:
|
||||
@@ -95,6 +99,7 @@ def check_password(cookie: str, password: str):
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
def createWallet(account: str, password: str):
|
||||
if not hsdConnected():
|
||||
return {
|
||||
@@ -104,7 +109,8 @@ def createWallet(account: str, password: str):
|
||||
}
|
||||
# Create the account
|
||||
# Python wrapper doesn't support this yet
|
||||
response = requests.put(f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}")
|
||||
response = requests.put(
|
||||
f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}")
|
||||
if response.status_code != 200:
|
||||
return {
|
||||
"error": {
|
||||
@@ -116,7 +122,6 @@ def createWallet(account: str, password: str):
|
||||
seed = hsw.getMasterHDKey(account)
|
||||
seed = seed['mnemonic']['phrase']
|
||||
|
||||
|
||||
# Encrypt the wallet (python wrapper doesn't support this yet)
|
||||
response = requests.post(f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/passphrase",
|
||||
json={"passphrase": password})
|
||||
@@ -127,6 +132,7 @@ def createWallet(account: str, password: str):
|
||||
"password": password
|
||||
}
|
||||
|
||||
|
||||
def importWallet(account: str, password: str, seed: str):
|
||||
if not hsdConnected():
|
||||
return {
|
||||
@@ -141,7 +147,8 @@ def importWallet(account: str, password: str,seed: str):
|
||||
"mnemonic": seed,
|
||||
}
|
||||
|
||||
response = requests.put(f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}",json=data)
|
||||
response = requests.put(
|
||||
f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}", json=data)
|
||||
if response.status_code != 200:
|
||||
return {
|
||||
"error": {
|
||||
@@ -168,6 +175,7 @@ def listWallets():
|
||||
return response
|
||||
return ['Wallet not connected']
|
||||
|
||||
|
||||
def selectWallet(account: str):
|
||||
# Select wallet
|
||||
response = hsw.rpc_selectWallet(account)
|
||||
@@ -178,6 +186,7 @@ def selectWallet(account: str):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def getBalance(account: str):
|
||||
# Get the total balance
|
||||
info = hsw.getBalance('default', account)
|
||||
@@ -200,13 +209,13 @@ def getBalance(account: str):
|
||||
total = total - (domainValue/1000000)
|
||||
locked = locked - (domainValue/1000000)
|
||||
|
||||
|
||||
# Only keep 2 decimal places
|
||||
total = round(total, 2)
|
||||
available = round(available, 2)
|
||||
|
||||
return {'available': available, 'total': total, 'locked': locked}
|
||||
|
||||
|
||||
def getBlockHeight():
|
||||
# Get the block height
|
||||
info = hsd.getInfo()
|
||||
@@ -214,6 +223,7 @@ def getBlockHeight():
|
||||
return 0
|
||||
return info['chain']['height']
|
||||
|
||||
|
||||
def getAddress(account: str):
|
||||
# Get the address
|
||||
info = hsw.getAccountInfo(account, 'default')
|
||||
@@ -221,6 +231,7 @@ def getAddress(account: str):
|
||||
return ''
|
||||
return info['receiveAddress']
|
||||
|
||||
|
||||
def getPendingTX(account: str):
|
||||
pending = 0
|
||||
page = 1
|
||||
@@ -237,11 +248,14 @@ def getPendingTX(account: str):
|
||||
break
|
||||
return pending
|
||||
|
||||
|
||||
def getDomains(account, own=True):
|
||||
if own:
|
||||
response = requests.get(f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/name?own=true")
|
||||
response = requests.get(
|
||||
f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/name?own=true")
|
||||
else:
|
||||
response = requests.get(f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/name")
|
||||
response = requests.get(
|
||||
f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/name")
|
||||
info = response.json()
|
||||
|
||||
if SHOW_EXPIRED:
|
||||
@@ -256,9 +270,9 @@ def getDomains(account,own=True):
|
||||
continue
|
||||
domains.append(domain)
|
||||
|
||||
|
||||
return domains
|
||||
|
||||
|
||||
def getPageTXCache(account, page, size=100):
|
||||
page = f"{page}-{size}"
|
||||
if not os.path.exists(f'cache'):
|
||||
@@ -274,6 +288,7 @@ def getPageTXCache(account,page,size=100):
|
||||
return pageCache[page]['txid']
|
||||
return None
|
||||
|
||||
|
||||
def pushPageTXCache(account, page, txid, size=100):
|
||||
page = f"{page}-{size}"
|
||||
if not os.path.exists(f'cache/{account}_page.json'):
|
||||
@@ -291,6 +306,7 @@ def pushPageTXCache(account,page,txid,size=100):
|
||||
|
||||
return pageCache[page]['txid']
|
||||
|
||||
|
||||
def getTXFromPage(account, page, size=100):
|
||||
if page == 1:
|
||||
return getTransactions(account, 1, size)[-1]['hash']
|
||||
@@ -306,7 +322,6 @@ def getTXFromPage(account,page,size=100):
|
||||
return hash
|
||||
|
||||
|
||||
|
||||
def getTransactions(account, page=1, limit=100):
|
||||
# Get the transactions
|
||||
if hsdVersion() < 7:
|
||||
@@ -324,9 +339,11 @@ def getTransactions(account,page=1,limit=100):
|
||||
lastTX = getTXFromPage(account, page-1, limit)
|
||||
|
||||
if lastTX:
|
||||
response = requests.get(f'http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/tx/history?reverse=true&limit={limit}&after={lastTX}')
|
||||
response = requests.get(
|
||||
f'http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/tx/history?reverse=true&limit={limit}&after={lastTX}')
|
||||
elif page == 1:
|
||||
response = requests.get(f'http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/tx/history?reverse=true&limit={limit}')
|
||||
response = requests.get(
|
||||
f'http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}/wallet/{account}/tx/history?reverse=true&limit={limit}')
|
||||
else:
|
||||
return []
|
||||
|
||||
@@ -342,6 +359,7 @@ def getTransactions(account,page=1,limit=100):
|
||||
pushPageTXCache(account, page, data[-1]['hash'], limit)
|
||||
return data
|
||||
|
||||
|
||||
def getAllTransactions(account):
|
||||
# Get the transactions
|
||||
page = 0
|
||||
@@ -353,6 +371,7 @@ def getAllTransactions(account):
|
||||
page += 1
|
||||
return txs
|
||||
|
||||
|
||||
def check_address(address: str, allow_name: bool = True, return_address: bool = False):
|
||||
# Check if the address is valid
|
||||
if address.startswith('@'):
|
||||
@@ -399,7 +418,6 @@ def check_hip2(domain: str):
|
||||
return address
|
||||
|
||||
|
||||
|
||||
def send(account, address, amount):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -416,6 +434,7 @@ def send(account,address,amount):
|
||||
# response = requests.post(f"http://x:{APIKEY}@{ip}:{HSD_WALLET_PORT}/wallet/{account_name}/unlock",
|
||||
# json={"passphrase": password,"timeout": 10})
|
||||
if response['error'] is not None:
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
@@ -433,10 +452,10 @@ def send(account,address,amount):
|
||||
"tx": response['result']
|
||||
}
|
||||
|
||||
|
||||
def isOwnDomain(account, name: str):
|
||||
domains = getDomains(account)
|
||||
for domain in domains:
|
||||
print(domain)
|
||||
if domain['name'] == name:
|
||||
return True
|
||||
return False
|
||||
@@ -453,6 +472,7 @@ def getDomain(domain: str):
|
||||
}
|
||||
return response['result']
|
||||
|
||||
|
||||
def renewDomain(account, domain):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -467,6 +487,7 @@ def renewDomain(account,domain):
|
||||
response = hsw.sendRENEW(account_name, password, domain)
|
||||
return response
|
||||
|
||||
|
||||
def getDNS(domain: str):
|
||||
# Get the DNS
|
||||
response = hsd.rpc_getNameResource(domain)
|
||||
@@ -485,6 +506,7 @@ def getDNS(domain: str):
|
||||
return []
|
||||
return response['result']['records']
|
||||
|
||||
|
||||
def setDNS(account, domain, records):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -529,10 +551,12 @@ def setDNS(account,domain,records):
|
||||
response = hsw.sendUPDATE(account_name, password, domain, data)
|
||||
return response
|
||||
|
||||
|
||||
def register(account, domain):
|
||||
# Maybe add default dns records?
|
||||
return setDNS(account, domain, '[]')
|
||||
|
||||
|
||||
def getNodeSync():
|
||||
response = hsd.getInfo()
|
||||
if 'error' in response:
|
||||
@@ -542,6 +566,7 @@ def getNodeSync():
|
||||
sync = round(sync, 2)
|
||||
return sync
|
||||
|
||||
|
||||
def getWalletStatus():
|
||||
response = hsw.rpc_getWalletInfo()
|
||||
if 'error' in response and response['error'] != None:
|
||||
@@ -560,7 +585,6 @@ def getWalletStatus():
|
||||
return "Error wallet ahead of node"
|
||||
|
||||
|
||||
|
||||
def getBids(account, domain="NONE"):
|
||||
if domain == "NONE":
|
||||
response = hsw.getWalletBids(account)
|
||||
@@ -578,9 +602,11 @@ def getBids(account, domain="NONE"):
|
||||
bids.append(bid)
|
||||
return bids
|
||||
|
||||
|
||||
def getReveals(account, domain):
|
||||
return hsw.getWalletRevealsByName(domain, account)
|
||||
|
||||
|
||||
def getPendingReveals(account):
|
||||
bids = getBids(account)
|
||||
domains = getDomains(account, False)
|
||||
@@ -627,6 +653,7 @@ def getPendingRedeems(account,password):
|
||||
|
||||
return pending
|
||||
|
||||
|
||||
def getPendingRegisters(account):
|
||||
bids = getBids(account)
|
||||
domains = getDomains(account, False)
|
||||
@@ -639,6 +666,7 @@ def getPendingRegisters(account):
|
||||
pending.append(bid)
|
||||
return pending
|
||||
|
||||
|
||||
def getPendingFinalizes(account, password):
|
||||
tx = createBatch(f'{account}:{password}', [["FINALIZE"]])
|
||||
if 'error' in tx:
|
||||
@@ -697,6 +725,7 @@ def revealAuction(account,domain):
|
||||
"error": str(e)
|
||||
}
|
||||
|
||||
|
||||
def revealAll(account):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -715,7 +744,12 @@ def revealAll(account):
|
||||
return
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
return
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
}
|
||||
}
|
||||
|
||||
return requests.post(f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}", json={"method": "sendbatch", "params": [[["REVEAL"]]]}).json()
|
||||
except Exception as e:
|
||||
@@ -725,6 +759,7 @@ def revealAll(account):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def redeemAll(account):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -743,7 +778,12 @@ def redeemAll(account):
|
||||
return
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
return
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
}
|
||||
}
|
||||
|
||||
return requests.post(f"http://x:{HSD_API}@{HSD_IP}:{HSD_WALLET_PORT}", json={"method": "sendbatch", "params": [[["REDEEM"]]]}).json()
|
||||
except Exception as e:
|
||||
@@ -753,6 +793,7 @@ def redeemAll(account):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def registerAll(account):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -777,6 +818,7 @@ def registerAll(account):
|
||||
batch.append(["UPDATE", domain['name'], {"records": []}])
|
||||
return sendBatch(account, batch)
|
||||
|
||||
|
||||
def finalizeAll(account):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -790,6 +832,7 @@ def finalizeAll(account):
|
||||
|
||||
return sendBatch(account, [["FINALIZE"]])
|
||||
|
||||
|
||||
def rescan_auction(account, domain):
|
||||
# Get height of the start of the auction
|
||||
response = hsw.rpc_selectWallet(account)
|
||||
@@ -854,7 +897,6 @@ def openAuction(account,domain):
|
||||
}
|
||||
|
||||
|
||||
|
||||
def transfer(account, domain, address):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -876,6 +918,7 @@ def transfer(account,domain,address):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def finalize(account, domain):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -897,6 +940,7 @@ def finalize(account,domain):
|
||||
}
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
@@ -911,6 +955,7 @@ def finalize(account,domain):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def cancelTransfer(account, domain):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -932,6 +977,7 @@ def cancelTransfer(account,domain):
|
||||
}
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
@@ -946,6 +992,7 @@ def cancelTransfer(account,domain):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def revoke(account, domain):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -967,6 +1014,7 @@ def revoke(account,domain):
|
||||
}
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
@@ -981,6 +1029,7 @@ def revoke(account,domain):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def sendBatch(account, batch):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -1002,6 +1051,7 @@ def sendBatch(account, batch):
|
||||
}
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
@@ -1028,6 +1078,7 @@ def sendBatch(account, batch):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def createBatch(account, batch):
|
||||
account_name = check_account(account)
|
||||
password = ":".join(account.split(":")[1:])
|
||||
@@ -1049,6 +1100,7 @@ def createBatch(account, batch):
|
||||
}
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
@@ -1088,6 +1140,7 @@ def rescan():
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def resendTXs():
|
||||
try:
|
||||
response = hsw.walletResend()
|
||||
@@ -1100,7 +1153,6 @@ def resendTXs():
|
||||
}
|
||||
|
||||
|
||||
|
||||
def zapTXs(account):
|
||||
age = 60 * 20 # 20 minutes
|
||||
|
||||
@@ -1137,9 +1189,7 @@ def getxPub(account):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try:
|
||||
print(account_name)
|
||||
response = hsw.getAccountInfo(account_name, "default")
|
||||
if 'error' in response:
|
||||
return {
|
||||
@@ -1169,7 +1219,6 @@ def signMessage(account,domain,message):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try:
|
||||
response = hsw.rpc_selectWallet(account_name)
|
||||
if response['error'] is not None:
|
||||
@@ -1180,6 +1229,7 @@ def signMessage(account,domain,message):
|
||||
}
|
||||
response = hsw.rpc_walletPassphrase(password, 10)
|
||||
if response['error'] is not None:
|
||||
if response['error']['message'] != "Wallet is not encrypted.":
|
||||
return {
|
||||
"error": {
|
||||
"message": response['error']['message']
|
||||
@@ -1194,6 +1244,7 @@ def signMessage(account,domain,message):
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def verifyMessageWithName(domain, signature, message):
|
||||
try:
|
||||
response = hsd.rpc_verifyMessageWithName(domain, signature, message)
|
||||
@@ -1215,6 +1266,7 @@ def verifyMessage(address,signature,message):
|
||||
|
||||
# endregion
|
||||
|
||||
|
||||
def generateReport(account, format="{name},{expiry},{value},{maxBid}"):
|
||||
domains = getDomains(account)
|
||||
|
||||
@@ -1240,5 +1292,6 @@ def generateReport(account,format="{name},{expiry},{value},{maxBid}"):
|
||||
|
||||
return lines
|
||||
|
||||
|
||||
def convertHNS(value: int):
|
||||
return value/1000000
|
||||
@@ -2,4 +2,4 @@ HSD_API=123480615465636893475aCwyaae6s45
|
||||
HSD_IP=localhost
|
||||
THEME=black
|
||||
SHOW_EXPIRED=false
|
||||
EXPLORER_TX=https://niami.io/tx/
|
||||
EXPLORER_TX=https://shakeshift.com/transaction/
|
||||
36
main.py
36
main.py
@@ -1,6 +1,7 @@
|
||||
import io
|
||||
import json
|
||||
import random
|
||||
import sys
|
||||
from flask import Flask, make_response, redirect, request, jsonify, render_template, send_from_directory,send_file
|
||||
import os
|
||||
import dotenv
|
||||
@@ -55,7 +56,7 @@ def index():
|
||||
commit = info['commit']
|
||||
if commit != latestVersion(branch):
|
||||
print("New version available",flush=True)
|
||||
plugins += render_template('components/dashboard-plugin.html', name='Update', output='New version available')
|
||||
plugins += render_template('components/dashboard-alert.html', name='Update', output='A new version of FireWallet is available')
|
||||
|
||||
return render_template("index.html", account=account, plugins=plugins)
|
||||
|
||||
@@ -177,7 +178,15 @@ def sendConfirmed():
|
||||
address = request.args.get("address")
|
||||
amount = float(request.args.get("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("/success?tx=" + response['tx'])
|
||||
@@ -550,7 +559,6 @@ def finalize(domain: str):
|
||||
return redirect("/logout")
|
||||
|
||||
domain = domain.lower()
|
||||
print(domain)
|
||||
response = account_module.finalize(request.cookies.get("account"),domain)
|
||||
if response['error'] != None:
|
||||
print(response)
|
||||
@@ -569,7 +577,6 @@ def cancelTransfer(domain: str):
|
||||
return redirect("/logout")
|
||||
|
||||
domain = domain.lower()
|
||||
print(domain)
|
||||
response = account_module.cancelTransfer(request.cookies.get("account"),domain)
|
||||
if 'error' in response:
|
||||
if response['error'] != None:
|
||||
@@ -884,7 +891,6 @@ def auction(domain):
|
||||
# Get TX
|
||||
revealInfo = account_module.getRevealTX(reveal)
|
||||
reveal['bid'] = revealInfo
|
||||
print(revealInfo)
|
||||
bids = render.bids(bids,reveals)
|
||||
|
||||
|
||||
@@ -946,7 +952,6 @@ def rescan_auction(domain):
|
||||
domain = domain.lower()
|
||||
|
||||
response = account_module.rescan_auction(account,domain)
|
||||
print(response)
|
||||
return redirect("/auction/" + domain)
|
||||
|
||||
@app.route('/auction/<domain>/bid')
|
||||
@@ -1022,7 +1027,7 @@ def bid_confirm(domain):
|
||||
response = account_module.bid(request.cookies.get("account"),domain,
|
||||
float(bid),
|
||||
float(blind))
|
||||
print(response)
|
||||
|
||||
if 'error' in response:
|
||||
return redirect("/auction/" + domain + "?error=" + response['error']['message'])
|
||||
|
||||
@@ -1044,7 +1049,7 @@ def open_auction(domain):
|
||||
if 'error' in response:
|
||||
if response['error'] != None:
|
||||
return redirect("/auction/" + domain + "?error=" + response['error']['message'])
|
||||
print(response)
|
||||
|
||||
return redirect("/success?tx=" + response['hash'])
|
||||
|
||||
@app.route('/auction/<domain>/reveal')
|
||||
@@ -1111,8 +1116,7 @@ def settings():
|
||||
# import to time from format "2024-02-13 11:24:03"
|
||||
last_commit = datetime.datetime.strptime(last_commit, "%Y-%m-%d %H:%M:%S")
|
||||
version = f'{last_commit.strftime("%y-%m-%d")} {branch}'
|
||||
|
||||
if info['commit'] != latestVersion(branch):
|
||||
if info['commit'] != latestVersion(info['refs']):
|
||||
version += ' (New version available)'
|
||||
return render_template("settings.html", account=account,
|
||||
hsd_version=account_module.hsdVersion(False),
|
||||
@@ -1220,7 +1224,6 @@ def login_post():
|
||||
wallets = account_module.listWallets()
|
||||
wallets = render.wallets(wallets)
|
||||
return render_template("login.html",
|
||||
|
||||
error="Invalid account",wallets=wallets)
|
||||
|
||||
account = account + ":" + password
|
||||
@@ -1474,7 +1477,6 @@ def plugin_function(ptype,plugin,function):
|
||||
return render_template("plugin-output.html", account=account,name=data['name'],
|
||||
description=data['description'],output=response)
|
||||
|
||||
|
||||
else:
|
||||
return jsonify({"error": "Function not found"})
|
||||
|
||||
@@ -1594,8 +1596,6 @@ def try_path(path):
|
||||
if not account_module.hsdConnected():
|
||||
return redirect("/login?message=Node not connected")
|
||||
|
||||
|
||||
|
||||
if os.path.isfile("templates/" + path + ".html"):
|
||||
return render_template(path + ".html")
|
||||
else:
|
||||
@@ -1609,4 +1609,10 @@ def page_not_found(e):
|
||||
#endregion
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run(debug=True,host='0.0.0.0')
|
||||
# Check to see if --debug is in the command line arguments
|
||||
debug = "--debug" in sys.argv
|
||||
port = 5000
|
||||
if "--port" in sys.argv:
|
||||
port = int(sys.argv[sys.argv.index("--port")+1])
|
||||
app.run(debug=True,host='0.0.0.0',port=port)
|
||||
|
||||
21
plugin.py
21
plugin.py
@@ -6,12 +6,19 @@ import hashlib
|
||||
import subprocess
|
||||
|
||||
|
||||
def import_module(module_name):
|
||||
if module_name in sys.modules:
|
||||
return importlib.reload(sys.modules[module_name])
|
||||
else:
|
||||
return importlib.import_module(module_name)
|
||||
|
||||
|
||||
def listPlugins(update=False):
|
||||
plugins = []
|
||||
for file in os.listdir("plugins"):
|
||||
if file.endswith(".py"):
|
||||
if file != "main.py":
|
||||
plugin = importlib.import_module("plugins."+file[:-3])
|
||||
plugin = import_module("plugins."+file[:-3])
|
||||
if "info" not in dir(plugin):
|
||||
continue
|
||||
details = plugin.info
|
||||
@@ -42,7 +49,7 @@ def listPlugins(update=False):
|
||||
for file in os.listdir(f"customPlugins/{importPath}"):
|
||||
if file.endswith(".py"):
|
||||
if file != "main.py":
|
||||
plugin = importlib.import_module(f"customPlugins.{importPath}."+file[:-3])
|
||||
plugin = import_module(f"customPlugins.{importPath}."+file[:-3])
|
||||
if "info" not in dir(plugin):
|
||||
continue
|
||||
details = plugin.info
|
||||
@@ -106,7 +113,7 @@ def hashPlugin(plugin: str):
|
||||
|
||||
|
||||
def getPluginData(pluginStr: str):
|
||||
plugin = importlib.import_module(pluginStr.replace("/","."))
|
||||
plugin = import_module(pluginStr.replace("/","."))
|
||||
|
||||
# Check if the plugin is verified
|
||||
signatures = []
|
||||
@@ -141,12 +148,12 @@ def getPluginData(pluginStr: str):
|
||||
|
||||
|
||||
def getPluginFunctions(plugin: str):
|
||||
plugin = importlib.import_module(plugin.replace("/","."))
|
||||
plugin = import_module(plugin.replace("/","."))
|
||||
return plugin.functions
|
||||
|
||||
|
||||
def runPluginFunction(plugin: str, function: str, params: dict, authentication: str):
|
||||
plugin_module = importlib.import_module(plugin.replace("/","."))
|
||||
plugin_module = import_module(plugin.replace("/","."))
|
||||
if function not in plugin_module.functions:
|
||||
return {"error": "Function not found"}
|
||||
|
||||
@@ -182,12 +189,12 @@ def runPluginFunction(plugin: str, function: str, params: dict, authentication:
|
||||
|
||||
|
||||
def getPluginFunctionInputs(plugin: str, function: str):
|
||||
plugin = importlib.import_module(plugin.replace("/","."))
|
||||
plugin = import_module(plugin.replace("/","."))
|
||||
return plugin.functions[function]["params"]
|
||||
|
||||
|
||||
def getPluginFunctionReturns(plugin: str, function: str):
|
||||
plugin = importlib.import_module(plugin.replace("/","."))
|
||||
plugin = import_module(plugin.replace("/","."))
|
||||
return plugin.functions[function]["returns"]
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ import os
|
||||
info = {
|
||||
"name": "Batching Functions",
|
||||
"description": "This is a plugin that provides multiple functions to batch transactions",
|
||||
"version": "1.0",
|
||||
"version": "1.1",
|
||||
"author": "Nathan.Woodburn/"
|
||||
}
|
||||
# https://hsd-dev.org/api-docs/?shell--cli#sendbatch
|
||||
@@ -394,7 +394,6 @@ def bid(params, authentication):
|
||||
for domain in domains:
|
||||
batch.append(['BID', domain, bid, blind])
|
||||
|
||||
print(batch)
|
||||
response = sendBatch(batch, authentication)
|
||||
if 'error' in response:
|
||||
return {
|
||||
|
||||
@@ -8,7 +8,7 @@ import os
|
||||
# Get Explorer URL
|
||||
TX_EXPLORER_URL = os.getenv("EXPLORER_TX")
|
||||
if TX_EXPLORER_URL is None:
|
||||
TX_EXPLORER_URL = "https://niami.io/tx/"
|
||||
TX_EXPLORER_URL = "https://shakeshift.com/transaction/"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,3 +9,4 @@ requests-doh
|
||||
Flask-QRcode
|
||||
PySocks
|
||||
python-git-info
|
||||
waitress
|
||||
38
server.py
38
server.py
@@ -1,10 +1,14 @@
|
||||
from flask import Flask
|
||||
from main import app
|
||||
import main
|
||||
from gunicorn.app.base import BaseApplication
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
from main import app
|
||||
from waitress import serve
|
||||
|
||||
|
||||
threads = 4
|
||||
|
||||
def gunicornServer():
|
||||
from gunicorn.app.base import BaseApplication
|
||||
class GunicornApp(BaseApplication):
|
||||
def __init__(self, app, options=None):
|
||||
self.options = options or {}
|
||||
@@ -18,21 +22,23 @@ class GunicornApp(BaseApplication):
|
||||
|
||||
def load(self):
|
||||
return self.application
|
||||
|
||||
if __name__ == '__main__':
|
||||
workers = 1
|
||||
threads = 2
|
||||
if workers is None:
|
||||
workers = 1
|
||||
if threads is None:
|
||||
threads = 2
|
||||
workers = int(workers)
|
||||
threads = int(threads)
|
||||
options = {
|
||||
'bind': '0.0.0.0:5000',
|
||||
'workers': workers,
|
||||
'workers': 2,
|
||||
'threads': threads,
|
||||
}
|
||||
gunicorn_app = GunicornApp(app, options)
|
||||
print('Starting server with ' + str(workers) + ' workers and ' + str(threads) + ' threads', flush=True)
|
||||
print(f'Starting server with Gunicorn on {platform.system()} with {threads} threads...', flush=True)
|
||||
gunicorn_app.run()
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Check if --gunicorn is in the command line arguments
|
||||
if "--gunicorn" in sys.argv:
|
||||
gunicornServer()
|
||||
sys.exit()
|
||||
|
||||
print(f'Starting server with Waitress on {platform.system()} with {threads} threads...', flush=True)
|
||||
print(f'Press Ctrl+C to stop the server', flush=True)
|
||||
print(f'Serving on http://0.0.0.0:5000/', flush=True)
|
||||
serve(app, host="0.0.0.0", port=5000, threads=threads)
|
||||
|
||||
2
templates/assets/js/script.min.js
vendored
2
templates/assets/js/script.min.js
vendored
@@ -1 +1 @@
|
||||
async function request(e){try{const t=await fetch(`/api/v1/${e}`);if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);const n=await t.json();return void 0!==n.error?`Error: ${n.error}`:n.result}catch(e){return console.error("Request failed:",e),"Error"}}function sortTable(e,t=!1){const n=document.getElementById("data-table"),a=n.querySelector("tbody"),l=Array.from(a.querySelectorAll("tr")),r=n.querySelectorAll("th");let o=n.getAttribute("data-sort-order")||"asc",d=n.getAttribute("data-sort-column")||"-1";o=t||d!=e?"asc":"asc"===o?"desc":"asc",n.setAttribute("data-sort-order",o),n.setAttribute("data-sort-column",e),l.sort(((t,n)=>{let a=t.cells[e].innerText.trim(),l=n.cells[e].innerText.trim(),r=parseFloat(a.replace(/[^0-9.,]/g,"").replace(/,/g,"")),d=parseFloat(l.replace(/[^0-9.,]/g,"").replace(/,/g,""));return isNaN(r)||isNaN(d)?"asc"===o?a.localeCompare(l):l.localeCompare(a):"asc"===o?r-d:d-r})),a.innerHTML="",l.forEach((e=>a.appendChild(e))),updateSortIndicators(r,e,o)}function updateSortIndicators(e,t,n){e.forEach(((e,a)=>{let l=e.querySelector(".sort-indicator");l.innerHTML=a===t?"asc"===n?" ▲":" ▼":""}))}window.addEventListener("load",(async()=>{const e=["hsd-sync","hsd-version","hsd-height","wallet-sync","wallet-available","wallet-total","wallet-locked","wallet-pending","wallet-domainCount","wallet-bidCount","wallet-pendingReveal","wallet-pendingRegister","wallet-pendingRedeem"],t=["wallet-available","wallet-total","wallet-locked"],n=["wallet-pendingReveal","wallet-pendingRegister","wallet-pendingRedeem"];for(const a of e){const e=document.getElementById(a);if(e){const l=a.replace(/-/g,"/");let r=await request(l);n.includes(a)&&"Error"!=r&&(r=r.length),t.includes(a)&&(r=Number(r).toFixed(2)),r=r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),e.innerHTML=r}}})),document.addEventListener("DOMContentLoaded",(function(){fetch("/api/v1/wallet/domains").then((e=>e.json())).then((e=>{const t=document.querySelector("#data-table tbody");t&&(t.innerHTML="",e.result.forEach((e=>{const n=document.createElement("tr"),a=document.createElement("td");a.textContent=e.name,n.appendChild(a);var l="Unknown";"stats"in e&&"daysUntilExpire"in e.stats&&(l=e.stats.daysUntilExpire);const r=document.createElement("td");r.textContent=`${l} days`,n.appendChild(r);const o=document.createElement("td");o.textContent=`${(e.value/1e6).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",")} HNS`,n.appendChild(o);const d=document.createElement("td");d.innerHTML=e.registered?"<a href='/manage/"+e.name+"'>Manage</a>":"<a href='/auction/"+e.name+"/register'>Register</a>",n.appendChild(d),t.appendChild(n)})),sortTable(0,!0))})).catch((e=>console.error("Error fetching data:",e)))})),setInterval((async function(){const e=["hsd-sync","hsd-height","wallet-sync","wallet-pending","wallet-available","wallet-total"];for(const t of e){const e=document.getElementById(t);if(e){const n=t.replace(/-/g,"/");let a=await request(n);["wallet-available","wallet-total"].includes(t)&&(a=Number(a).toFixed(2)),a=a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),e.innerHTML=a}}}),2e4),function(){"use strict";var e=document.querySelector(".sidebar"),t=document.querySelectorAll("#sidebarToggle, #sidebarToggleTop");if(e){e.querySelector(".collapse");var n=[].slice.call(document.querySelectorAll(".sidebar .collapse")).map((function(e){return new bootstrap.Collapse(e,{toggle:!1})}));for(var a of t)a.addEventListener("click",(function(t){if(document.body.classList.toggle("sidebar-toggled"),e.classList.toggle("toggled"),e.classList.contains("toggled"))for(var a of n)a.hide()}));window.addEventListener("resize",(function(){if(Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<768)for(var e of n)e.hide()}))}var l=document.querySelector("body.fixed-nav .sidebar");l&&l.on("mousewheel DOMMouseScroll wheel",(function(e){if(Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)>768){var t=e.originalEvent,n=t.wheelDelta||-t.detail;this.scrollTop+=30*(n<0?1:-1),e.preventDefault()}}));var r=document.querySelector(".scroll-to-top");r&&window.addEventListener("scroll",(function(){var e=window.pageYOffset;r.style.display=e>100?"block":"none"}))}();
|
||||
async function request(e){try{const t=await fetch(`/api/v1/${e}`);if(!t.ok)throw new Error(`HTTP error! Status: ${t.status}`);const n=await t.json();return void 0!==n.error?`Error: ${n.error}`:n.result}catch(e){return console.error("Request failed:",e),"Error"}}function sortTable(e,t=!1){const n=document.getElementById("data-table"),a=n.querySelector("tbody"),l=Array.from(a.querySelectorAll("tr")),r=n.querySelectorAll("th");let o=n.getAttribute("data-sort-order")||"asc",i=n.getAttribute("data-sort-column")||"-1";o=t||i!=e?"asc":"asc"===o?"desc":"asc",n.setAttribute("data-sort-order",o),n.setAttribute("data-sort-column",e);const c=determineColumnDataType(l,e);l.sort(((t,n)=>{let a=t.cells[e].innerText.trim(),l=n.cells[e].innerText.trim();if("number"===c){let e=parseFloat(a.replace(/[^0-9.,]/g,"").replace(/,/g,"")),t=parseFloat(l.replace(/[^0-9.,]/g,"").replace(/,/g,""));return"asc"===o?e-t:t-e}if("date"===c){let e=new Date(a),t=new Date(l);return"asc"===o?e-t:t-e}return"asc"===o?a.localeCompare(l,void 0,{sensitivity:"base"}):l.localeCompare(a,void 0,{sensitivity:"base"})})),a.innerHTML="",l.forEach((e=>a.appendChild(e))),updateSortIndicators(r,e,o)}function determineColumnDataType(e,t){const n=Math.min(5,e.length);let a=0,l=0;for(let r=0;r<n&&!(r>=e.length);r++){const n=e[r].cells[t].innerText.trim(),o=parseFloat(n.replace(/[^0-9.,]/g,"").replace(/,/g,""));if(!isNaN(o)&&n.replace(/[^0-9.,\s$%]/g,"").length===n.length){a++;continue}const i=new Date(n);isNaN(i)||"Invalid Date"===i.toString()||l++}return a>=n/2?"number":l>=n/2?"date":"text"}function updateSortIndicators(e,t,n){e.forEach(((e,a)=>{let l=e.querySelector(".sort-indicator");l.innerHTML=a===t?"asc"===n?" ▲":" ▼":""}))}window.addEventListener("load",(async()=>{const e=["hsd-sync","hsd-version","hsd-height","wallet-sync","wallet-available","wallet-total","wallet-locked","wallet-pending","wallet-domainCount","wallet-bidCount","wallet-pendingReveal","wallet-pendingRegister","wallet-pendingRedeem"],t=["wallet-available","wallet-total","wallet-locked"],n=["wallet-pendingReveal","wallet-pendingRegister","wallet-pendingRedeem"];for(const a of e){const e=document.getElementById(a);if(e){const l=a.replace(/-/g,"/");let r=await request(l);n.includes(a)&&"Error"!=r&&(r=r.length),t.includes(a)&&(r=Number(r).toFixed(2)),r=r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),e.innerHTML=r}}})),document.addEventListener("DOMContentLoaded",(function(){fetch("/api/v1/wallet/domains").then((e=>e.json())).then((e=>{const t=document.querySelector("#data-table tbody");t&&(t.innerHTML="",e.result.forEach((e=>{const n=document.createElement("tr"),a=document.createElement("td");a.textContent=e.name,n.appendChild(a);var l="Unknown";"stats"in e&&"daysUntilExpire"in e.stats&&(l=e.stats.daysUntilExpire);const r=document.createElement("td");r.textContent=`${l} days`,n.appendChild(r);const o=document.createElement("td");o.textContent=`${(e.value/1e6).toFixed(2).replace(/\B(?=(\d{3})+(?!\d))/g,",")} HNS`,n.appendChild(o);const i=document.createElement("td");i.innerHTML=e.registered?"<a href='/manage/"+e.name+"'>Manage</a>":"<a href='/auction/"+e.name+"/register'>Register</a>",n.appendChild(i),t.appendChild(n)})),sortTable(0,!0))})).catch((e=>console.error("Error fetching data:",e)))})),setInterval((async function(){const e=["hsd-sync","hsd-height","wallet-sync","wallet-pending","wallet-available","wallet-total"];for(const t of e){const e=document.getElementById(t);if(e){const n=t.replace(/-/g,"/");let a=await request(n);["wallet-available","wallet-total"].includes(t)&&(a=Number(a).toFixed(2)),a=a.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),e.innerHTML=a}}}),2e4),function(){"use strict";var e=document.querySelector(".sidebar"),t=document.querySelectorAll("#sidebarToggle, #sidebarToggleTop");if(e){e.querySelector(".collapse");var n=[].slice.call(document.querySelectorAll(".sidebar .collapse")).map((function(e){return new bootstrap.Collapse(e,{toggle:!1})}));for(var a of t)a.addEventListener("click",(function(t){if(document.body.classList.toggle("sidebar-toggled"),e.classList.toggle("toggled"),e.classList.contains("toggled"))for(var a of n)a.hide()}));window.addEventListener("resize",(function(){if(Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)<768)for(var e of n)e.hide()}))}var l=document.querySelector("body.fixed-nav .sidebar");l&&l.on("mousewheel DOMMouseScroll wheel",(function(e){if(Math.max(document.documentElement.clientWidth||0,window.innerWidth||0)>768){var t=e.originalEvent,n=t.wheelDelta||-t.detail;this.scrollTop+=30*(n<0?1:-1),e.preventDefault()}}));var r=document.querySelector(".scroll-to-top");r&&window.addEventListener("scroll",(function(){var e=window.pageYOffset;r.style.display=e>100?"block":"none"}))}();
|
||||
8
templates/components/dashboard-alert.html
Normal file
8
templates/components/dashboard-alert.html
Normal file
@@ -0,0 +1,8 @@
|
||||
<div class="col-md-6 col-xl-3 mb-4">
|
||||
<div class="card shadow border-start-warning py-2">
|
||||
<div class="card-body">
|
||||
<div class="text-uppercase fw-bold text-xs mb-1"><span style="color: var(--bs-dark);">{{name}}</span></div>
|
||||
<div class="text-dark fw-bold h5 mb-0"><span>{{output | safe}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2,4 +2,4 @@
|
||||
<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">Cymon.de</a>
|
||||
<a class="card-link" href="https://shakeshift.com/transaction/{{tx}}" target="_blank">ShakeShift</a>
|
||||
@@ -74,7 +74,8 @@
|
||||
<div class="container-fluid" style="margin-top: 50px;">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h4 class="card-title" style="display: inline-block;">DNS</h4><a class="btn btn-primary" role="button" style="position: absolute; right:16px;" href="/manage/{{domain}}/edit?dns={{raw_dns}}">Edit</a><div class="table-responsive">
|
||||
<h4 class="card-title" style="display: inline-block;">DNS</h4>
|
||||
<div style="width: fit-content;position: absolute;right: 0px;top: 16px;"><a class="btn btn-primary" role="button" href="https://tools.c.woodburn.au/?domain={{domain}}&url=https://{{domain}}" style="margin: 0px 16px;" target="_blank">Debug</a><a class="btn btn-primary" role="button" href="/manage/{{domain}}/edit?dns={{raw_dns}}" style="margin: 0px 16px;">Edit</a></div><div class="table-responsive">
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
</nav>
|
||||
<div class="container-fluid" style="margin-bottom: 20px;">
|
||||
<h3 class="text-dark mb-1">{{name}}</h3>
|
||||
<h4 class="text-dark mb-1">{{description}}</h4>{{output|safe}}
|
||||
<h4 class="text-dark mb-1">{{description|safe}}</h4>{{output|safe}}
|
||||
</div>
|
||||
</div>
|
||||
<footer class="sticky-footer" style="background: var(--bs-primary-text-emphasis);">
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
</div>
|
||||
<div class="card" style="max-width: 500px;margin: auto;margin-top: 50px;">
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user