diff --git a/README.md b/README.md index e797401..0823e09 100644 --- a/README.md +++ b/README.md @@ -1 +1,24 @@ # FireWalletBrowser + + +## Installation + +```bash +git clone https://github.com/Nathanwoodburn/firewalletbrowser.git +cd firewalletbrowser +python3 -m pip install -r requirements.txt +cp example.env .env +# Edit .env to include your HSD API key +``` + +## Usage + +Make sure HSD is running then run the following commands: + +```bash +python3 server.py +# Or for more verbose output +python3 main.py +``` + +Then access the wallet at http://localhost:5000 \ No newline at end of file diff --git a/example.env b/example.env new file mode 100644 index 0000000..bdaabb4 --- /dev/null +++ b/example.env @@ -0,0 +1 @@ +hsd_api=123480615465636893475aCwyaae6s45 \ No newline at end of file diff --git a/main.py b/main.py index b7e9288..c676095 100644 --- a/main.py +++ b/main.py @@ -881,12 +881,16 @@ def settings_action(action): #region Account @app.route('/login') def login(): + wallets = account_module.listWallets() + wallets = render.wallets(wallets) + + if 'message' in request.args: return render_template("login.html", sync=account_module.getNodeSync(), - error=request.args.get("message")) + error=request.args.get("message"),wallets=wallets) - - return render_template("login.html") + return render_template("login.html", sync=account_module.getNodeSync(), + wallets=wallets) @app.route('/login', methods=["POST"]) def login_post(): diff --git a/render.py b/render.py index f0b83df..49e9a0e 100644 --- a/render.py +++ b/render.py @@ -171,4 +171,11 @@ def bids(bids,reveals): else: html += "Unknown" html += "" + return html + + +def wallets(wallets): + html = '' + for wallet in wallets: + html += f'' return html \ No newline at end of file diff --git a/templates/login.html b/templates/login.html index b55e0f9..1ea980d 100644 --- a/templates/login.html +++ b/templates/login.html @@ -31,7 +31,9 @@

Welcome Back!

-
+