fix: consume promo offer in miniapp tariff-mode renewal path

The tariff-mode renewal in miniapp applied promo_offer_discount_percent
to final_total but never passed consume_promo_offer to subtract_user_balance,
allowing infinite reuse of first-purchase-only promo discounts via miniapp.
This commit is contained in:
Fringg
2026-03-05 07:15:41 +03:00
parent 5f2d855702
commit b8857e789e
+1
View File
@@ -5328,6 +5328,7 @@ async def submit_subscription_renewal_endpoint(
# Списываем баланс (subtract_user_balance делает commit и обновляет user.balance_kopeks)
success = await subtract_user_balance(
db, user, final_total, description,
consume_promo_offer=promo_offer_discount_percent > 0,
mark_as_paid_subscription=True,
)
if not success: