fix(autorenewal): remove duplicated response handling in toggle_autorenewal
This commit is contained in:
@@ -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
|
||||
),
|
||||
)
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user