def cashout(acc_hash): ip_addr = str(request.remote_addr) withdraw_addr = request.form['coinbase_email'] acc_hash = request.form['acc_hash'] acc = MicroAcc(connect_db(), acc_hash, ip_addr).cashout() return withdraw(acc_hash)
def withdraw(acc_hash): acc = MicroAcc(connect_db(), acc_hash) return render_template('withdraw.html', acc_hash=acc.get_acc_hash(), balance=acc.get_balance())
def account(acc_hash): acc = MicroAcc(connect_db(), acc_hash) return render_template('index.html', acc_hash=acc.get_acc_hash(), balance=acc.get_balance())
def give(acc_hash): acc = MicroAcc(connect_db(), acc_hash) acc.give(str(request.remote_addr)) # ip address return render_template('index.html', acc_hash=acc.get_acc_hash(), balance=acc.get_balance())
def index(): ip_addr = str(request.remote_addr) acc = MicroAcc(connect_db(), "NoHash", ip_addr) return render_template('index.html', acc_hash=acc.get_acc_hash(), balance=acc.get_balance())