From 8c546a07eb5b6df491cca6132408eaf8e68634aa Mon Sep 17 00:00:00 2001 From: lza_menace Date: Fri, 18 Feb 2022 14:20:05 -0800 Subject: [PATCH] prevent posting if wallet account is being reused --- suchwow/routes/post.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/suchwow/routes/post.py b/suchwow/routes/post.py index aceea1f..3540549 100644 --- a/suchwow/routes/post.py +++ b/suchwow/routes/post.py @@ -87,6 +87,10 @@ def create(): try: wallet = wownero.Wallet() 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: flash("Suchwow wallet is fucked up! Try again later.", "is-danger") return redirect(request.url)