prevent posting if wallet account is being reused

This commit is contained in:
lza_menace 2022-02-18 14:20:05 -08:00
parent af87610e60
commit 8c546a07eb
1 changed files with 4 additions and 0 deletions

View File

@ -87,6 +87,10 @@ def create():
try: try:
wallet = wownero.Wallet() wallet = wownero.Wallet()
account_index = wallet.new_account() account_index = wallet.new_account()
in_use = Post.select().where(Post.account_index == account_index).first()
if in_use:
flash("Suchwow wallet is fucked up! Try again later.", "is-danger")
return redirect(request.url)
except: except:
flash("Suchwow wallet is fucked up! Try again later.", "is-danger") flash("Suchwow wallet is fucked up! Try again later.", "is-danger")
return redirect(request.url) return redirect(request.url)