You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
wowstash/wowstash/blueprints/account/routes.py

29 lines
1.1 KiB

from flask import request, render_template, session
from flask import redirect, url_for, current_app
from wowstash.blueprints.account import account_bp
@account_bp.route("/account")
def overview():
if session.get("public_address"):
return render_template("account.html",
session_data=session,
h=daemon.get_height(),
wallet=wallet)
else:
return redirect(url_for("index"))
@account_bp.route("/account/wallet")
def connect_wallet():
if session.get("public_address"):
wallet.init(host=current_app.config['DAEMON_HOST'],
port=current_app.config['DAEMON_PORT'],
public_view_key=session['public_view_key'],
wallet_password=session['wallet_password'],
mnemonic_seed=session['seed'],
restore_height=daemon.get_height(),
path=current_app.config['BINARY_PATH'])
return redirect(url_for("account.overview"))
else:
return redirect(url_for("index"))