From c4dc5cd49a60303819e9b98b1f712f1e8d078d29 Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 8 Jul 2021 12:20:54 -0700 Subject: [PATCH] only sweep if balance is enough --- suchwow/app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/suchwow/app.py b/suchwow/app.py index 881edb1..7431f92 100644 --- a/suchwow/app.py +++ b/suchwow/app.py @@ -125,7 +125,7 @@ def payout_users(): submitter = Profile.get(username=post.submitter) balances = wallet.balances(post.account_index) url = url_for('post.read', id=post.id, _external=True) - if balances[1] > 0: + if balances[1] > 0.1: print(f"Post #{post.id} has {balances[1]} funds unlocked and ready to send. Sweeping all funds to user's address ({submitter.address}).") sweep = wallet.sweep_all(account=post.account_index, dest_address=submitter.address) print(sweep)