diff --git a/frontend/components/account/AccountCenter.tsx b/frontend/components/account/AccountCenter.tsx index dae95610..10d634dd 100644 --- a/frontend/components/account/AccountCenter.tsx +++ b/frontend/components/account/AccountCenter.tsx @@ -102,6 +102,7 @@ export function AccountCenter() { lastPaymentStartedAt, telegramBindOpening, telegramBindUrl, + telegramBindCommand, manualPayment, manualTxHash, txValidation, @@ -175,6 +176,7 @@ export function AccountCenter() { submitManualPaymentTx, validateTxHash, handleOverlayCheckout, + createTelegramBotBindCommand, openTelegramBotBindLink, } = useAccountPayment({ isEn, @@ -497,9 +499,7 @@ export function AccountCenter() { : monthlyReferralLimit * referralRewardPoints; // ── Telegram bind command ────────────────────────────── - const bindCommand = userId - ? `/bind ${userId}${email ? ` ${email}` : ""}` - : "/bind "; + const bindCommand = telegramBindCommand || copy.telegramBindCommandPlaceholder; // ── Copy handler ────────────────────────────────────── const handleCopy = (text: string) => { @@ -509,6 +509,13 @@ export function AccountCenter() { }); }; + const handleCopyTelegramBindCommand = async () => { + if (!isAuthenticated || telegramBindOpening) return; + const command = await createTelegramBotBindCommand(); + if (!command) return; + handleCopy(command); + }; + const applyReferralCode = useCallback(async () => { const code = referralCodeInput.trim(); if (!code || referralApplying) return; @@ -1040,8 +1047,9 @@ export function AccountCenter() { : copy.telegramBotBindLink}