only sweep if balance is enough

This commit is contained in:
lza_menace 2021-07-08 12:20:54 -07:00
parent 113af08502
commit c4dc5cd49a
1 changed files with 1 additions and 1 deletions

View File

@ -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)