removed unnecesary scripts
This commit is contained in:
parent
1590c38136
commit
9057e1e293
@ -1,13 +0,0 @@
|
||||
from mnemonic import Mnemonic
|
||||
|
||||
def generate_seed(seed_length):
|
||||
try:
|
||||
if seed_length == "12" or seed_length == "24":
|
||||
entropy_bits = 128 if seed_length == "12" else 256
|
||||
mnemonic = Mnemonic("english")
|
||||
seed_words = mnemonic.generate(entropy_bits)
|
||||
return seed_words
|
||||
else:
|
||||
return "Invalid choice. Please choose 12 or 24."
|
||||
except Exception as e:
|
||||
return "An error occurred: " + str(e)
|
@ -1,25 +0,0 @@
|
||||
from flask import render_template
|
||||
|
||||
from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException
|
||||
from src.read_rpc_config import read_rpc_config
|
||||
|
||||
|
||||
def list_wallets():
|
||||
try:
|
||||
rpc_host, rpc_port, rpc_user, rpc_password = read_rpc_config()
|
||||
|
||||
rpc_connection = AuthServiceProxy(
|
||||
f"http://{rpc_user}:{rpc_password}@{rpc_host}:{rpc_port}"
|
||||
)
|
||||
|
||||
wallet_list = rpc_connection.listwallets()
|
||||
|
||||
return render_template("index.html", wallets=wallet_list)
|
||||
|
||||
except JSONRPCException as json_exception:
|
||||
error_message = "A JSON RPC Exception occurred: " + str(json_exception)
|
||||
return render_template("error.html", error=error_message)
|
||||
|
||||
except Exception as general_exception:
|
||||
error_message = "An Exception occurred: " + str(general_exception)
|
||||
return render_template("error.html", error=error_message)
|
Loading…
Reference in New Issue
Block a user