diff --git a/core/app.cpython-312-x86_64-linux-gnu.so b/core/app.cpython-312-x86_64-linux-gnu.so index ad106863..7f845e32 100644 Binary files a/core/app.cpython-312-x86_64-linux-gnu.so and b/core/app.cpython-312-x86_64-linux-gnu.so differ diff --git a/core/infra.cpython-312-x86_64-linux-gnu.so b/core/infra.cpython-312-x86_64-linux-gnu.so index 99e2d8cb..e2e9660c 100644 Binary files a/core/infra.cpython-312-x86_64-linux-gnu.so and b/core/infra.cpython-312-x86_64-linux-gnu.so differ diff --git a/handlers/keys/key_renew.py b/handlers/keys/key_renew.py index 99021fff..eac7f743 100644 --- a/handlers/keys/key_renew.py +++ b/handlers/keys/key_renew.py @@ -886,18 +886,22 @@ async def complete_key_renewal( if hook_commands: builder = insert_hook_buttons(builder, hook_commands) + renewal_media_path = "img/pic_renewed.jpg" + try: if callback_query: await edit_or_send_message( target_message=callback_query.message, text=response_message, reply_markup=builder.as_markup(), + media_path=renewal_media_path, ) elif waiting_message: await edit_or_send_message( target_message=waiting_message, text=response_message, reply_markup=builder.as_markup(), + media_path=renewal_media_path, ) else: await bot.send_message(tg_id, response_message, reply_markup=builder.as_markup()) diff --git a/handlers/payments/currency_rates.py b/handlers/payments/currency_rates.py index 99c0a62e..8363ede0 100644 --- a/handlers/payments/currency_rates.py +++ b/handlers/payments/currency_rates.py @@ -138,13 +138,15 @@ def pick_currency( def fmt_money(amount: Decimal, currency: str, language_code: str | None) -> str: - q = _round2(amount) if currency == "USD": + q = _round2(amount) s = f"{q:,.2f}" if (language_code or "").startswith("ru"): s = s.replace(",", " ") return f"${s}" - s = f"{q:,.2f}".replace(",", " ") + + q = amount.quantize(Decimal("1"), rounding=ROUND_HALF_UP) + s = f"{q:,.0f}".replace(",", " ") return f"{s} ₽" @@ -159,7 +161,7 @@ async def display_price( cur = pick_currency(language_code, user_currency=user_currency, force_currency=force_currency) if cur == "RUB": - val = _round2(Decimal(str(amount_rub))) + val = Decimal(str(amount_rub)).quantize(Decimal("1"), rounding=ROUND_HALF_UP) else: val = await convert_from_rub(Decimal(str(amount_rub)), cur, session=session) diff --git a/handlers/payments/fast_payment_flow.py b/handlers/payments/fast_payment_flow.py index cd9561bd..e8c021b1 100644 --- a/handlers/payments/fast_payment_flow.py +++ b/handlers/payments/fast_payment_flow.py @@ -148,7 +148,7 @@ async def try_fast_payment_flow( required_amount, getattr(callback_query.from_user, "language_code", None), ) - text = f"{lead_text}.\n\n{FAST_PAY_CHOOSE_CURRENCY}" + text = f"{lead_text}\n\n{FAST_PAY_CHOOSE_CURRENCY}" await state.update_data( temp_key=temp_key, temp_payload=temp_payload, @@ -211,7 +211,7 @@ async def try_fast_payment_flow( ) await edit_or_send_message( target_message=callback_query.message, - text=f"{lead_text}.\n\n{FAST_PAY_CHOOSE_PROVIDER}", + text=f"{lead_text}\n\n{FAST_PAY_CHOOSE_PROVIDER}", reply_markup=keyboard.as_markup(), ) return True @@ -280,7 +280,7 @@ async def choose_payment_currency(callback_query: CallbackQuery, state: FSMConte getattr(callback_query.from_user, "language_code", None), force_currency=currency, ) - text = f"{lead_text}.\n\nВалюта: {currency_label(currency)}\n{FAST_PAY_CHOOSE_PROVIDER}" + text = f"{lead_text}\n\nВалюта: {currency_label(currency)}\n{FAST_PAY_CHOOSE_PROVIDER}" await edit_or_send_message( target_message=callback_query.message, text=text, diff --git a/handlers/payments/gift.cpython-312-x86_64-linux-gnu.so b/handlers/payments/gift.cpython-312-x86_64-linux-gnu.so index 243f36ee..26e68c53 100644 Binary files a/handlers/payments/gift.cpython-312-x86_64-linux-gnu.so and b/handlers/payments/gift.cpython-312-x86_64-linux-gnu.so differ