diff --git a/make_post_sell/lib/crypto_watcher.py b/make_post_sell/lib/crypto_watcher.py index 696f4eb..bc056ca 100644 --- a/make_post_sell/lib/crypto_watcher.py +++ b/make_post_sell/lib/crypto_watcher.py @@ -641,11 +641,7 @@ def process_payment( ) sweep_success = auto_sweep_payment(client, crypto_payment) if sweep_success and crypto_payment.is_swept: - # Mark as finalized so it's excluded from future processing - crypto_payment.status = "swept" - logger.info( - f"Payment {crypto_payment.id} swept successfully - marked as finalized" - ) + logger.info(f"Payment {crypto_payment.id} swept successfully") else: logger.debug( f"Payment {crypto_payment.id} confirmed but funds not yet unlocked" @@ -667,17 +663,13 @@ def run_once(env, interval): with request.tm: db = request.dbsession - q = ( - db.query(CryptoPayment) - .filter( - CryptoPayment.status.in_( - ["pending", "received", "confirmed", "confirmed_overpaid"] - ) - ) - .filter( - # Exclude payments that are already swept (finalized and done) - CryptoPayment.swept_tx_hash.is_(None) - ) + q = db.query(CryptoPayment).filter( + CryptoPayment.status.in_( + ["pending", "received", "confirmed", "confirmed_overpaid"] + ), + CryptoPayment.swept_tx_hash.is_( + None + ), # Only process payments that are not swept ) payments = q.all()