fix(autorenewal): remove duplicated response handling in toggle_autorenewal

This commit is contained in:
2026-06-04 13:44:09 +07:00
parent 4c5a16a3ca
commit 9552813f16
2 changed files with 1 additions and 17 deletions

View File

@@ -191,19 +191,3 @@ async def toggle_autorenewal(
show_autorenew=bool(rw_user), current_autorenewal_status=sub.autorenew
),
)
rw_user = await get_user_by_telegram_id(deps.rw_sdk, cb.from_user.id)
user: User | None = await deps.user_service.update_user_link(
session, cb.from_user.id, deps.rw_sdk
)
status_text = "включено" if new_autorenew else "отключено"
await cb.answer(f"Автопродление {status_text}")
await cb.message.edit_text(
deps.user_service.format_subscription_message(
rw_user, link=user.subscription_link, autorenew=sub.autorenew
),
reply_markup=subscription_controls(
show_autorenew=bool(rw_user), current_autorenewal_status=sub.autorenew
),
)

View File

@@ -66,7 +66,7 @@ def main():
gross_amount = args.amount * (1 + commission_rate)
commission = gross_amount - args.amount
print(f"customer pays fee:")
print("customer pays fee:")
print(f" Сумма заказа: {args.amount} RUB")
print(f" Комиссия: {commission:.2f} RUB")
print(f" Итого к оплате: {gross_amount:.2f} RUB")