mirror of
https://github.com/BEDOLAGA-DEV/remnawave-bedolaga-telegram-bot.git
synced 2026-03-21 16:50:16 +00:00
M-2: tariff_purchase.py — _apply_promo_discount delegates to PricingEngine,
_get_user_period_discount returns (group_pct, offer_pct, combined),
all ~15 call sites updated for display/charge price parity
M-4: miniapp switch_tariff — add FOR UPDATE lock on subscription,
commit=False for atomic balance+transaction, emit_transaction_side_effects
M-6: CryptoBot — defer status commit (commit=False) so webhook retry works
if fulfillment fails
WARNING: add lock_user_for_update before balance_kopeks mutations in
contest_attempt_service, wheel_service, admin/referrals,
account_merge_service, cabinet/routes/contests