fix: enhance insufficient funds message and update subscription controls logic

This commit is contained in:
2026-05-03 07:03:53 +07:00
parent ac61cec78c
commit e9f84d9377
5 changed files with 18 additions and 76 deletions

View File

@@ -176,7 +176,7 @@ async def proceed_to_checkout(
if effective_balance < amount:
await cb.message.edit_text(
INSUFFICIENT_FUNDS.format(balance=user.balance, amount=amount), reply_markup=deposit_kb
INSUFFICIENT_FUNDS.format(balance=user.balance, amount=amount, diff=abs(amount-user.balance)), reply_markup=deposit_kb
)
return

View File

@@ -149,7 +149,7 @@ async def sub_info(
deps.user_service.format_subscription_message(
rw_user, link=user.subscription_link, autorenew=sub.autorenew
),
reply_markup=subscription_controls(sub.autorenew),
reply_markup=subscription_controls(show_autorenew=bool(rw_user), current_autorenewal_status=sub.autorenew),
)
@@ -183,5 +183,5 @@ async def toggle_autorenewal(
deps.user_service.format_subscription_message(
rw_user, link=user.subscription_link, autorenew=sub.autorenew
),
reply_markup=subscription_controls(sub.autorenew),
reply_markup=subscription_controls(show_autorenew=bool(rw_user), current_autorenewal_status=sub.autorenew),
)