From 171b4e2ab4b9c72d84446bf1a7a12afc6a66a60f Mon Sep 17 00:00:00 2001 From: Egor Date: Wed, 14 Jan 2026 02:51:57 +0300 Subject: [PATCH] Update main.py --- app/handlers/balance/main.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/handlers/balance/main.py b/app/handlers/balance/main.py index 7d57e0c7..10e68d1f 100644 --- a/app/handlers/balance/main.py +++ b/app/handlers/balance/main.py @@ -142,10 +142,9 @@ def get_quick_amount_buttons(language: str, user: User) -> list: periods = periods[:6] # Limit to 6 periods for period in periods: - price_attr = f"PRICE_{period}_DAYS" - if hasattr(settings, price_attr): - base_price_kopeks = getattr(settings, price_attr) - + from app.config import PERIOD_PRICES + base_price_kopeks = PERIOD_PRICES.get(period, 0) + if base_price_kopeks > 0: # Calculate price with user's promo group discount using unified system price_info = calculate_user_price(user, base_price_kopeks, period, "period")