diff --git a/make_post_sell/lib/crypto_watcher.py b/make_post_sell/lib/crypto_watcher.py index 42473dd..9b53c68 100644 --- a/make_post_sell/lib/crypto_watcher.py +++ b/make_post_sell/lib/crypto_watcher.py @@ -1531,21 +1531,8 @@ def process_payment( >= int(crypto_payment.confirmations_required) and crypto_payment.status == CryptoPayment.STATUS_RECEIVED ): - # Check if invoice needs finalization (products not unlocked yet) - invoice_needs_finalization = False - if crypto_payment.invoice and crypto_payment.invoice.line_items: - # Check if any products are still locked for this user - for line_item in crypto_payment.invoice.line_items: - if ( - line_item.product.get_userproduct_for_user( - crypto_payment.invoice.user - ) - is None - ): - invoice_needs_finalization = True - break - - if invoice_needs_finalization: + # ALWAYS finalize invoice when payment moves to confirmed + if crypto_payment.invoice: logger.info( f"Payment {crypto_payment.id} confirmed, finalizing invoice {crypto_payment.invoice.id}" )