fix: enhance insufficient funds message and update subscription controls logic
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user