diff --git a/frontend/components/account/AccountCenter.tsx b/frontend/components/account/AccountCenter.tsx
index 5d3fd1f7..6f88482c 100644
--- a/frontend/components/account/AccountCenter.tsx
+++ b/frontend/components/account/AccountCenter.tsx
@@ -233,7 +233,7 @@ const WALLETCONNECT_POLYGON_RPC_URL = String(
process.env.NEXT_PUBLIC_WALLETCONNECT_POLYGON_RPC_URL ||
"https://polygon-bor-rpc.publicnode.com",
).trim();
-const TELEGRAM_GROUP_URL = "https://t.me/+8vel7rwjZagxODUx";
+const TELEGRAM_GROUP_URL = "https://t.me/+Se93RpNQ58FhYmZh";
const TELEGRAM_BOT_URL = String(
process.env.NEXT_PUBLIC_TELEGRAM_BOT_URL || "https://t.me/WeatherQuant_bot",
).trim();
@@ -298,7 +298,9 @@ const InfoRow = ({
{Icon && }
- {label}
+
+ {label}
+
(null);
+ const [manualPayment, setManualPayment] = useState<
+ CreatedIntent["direct_payment"] | null
+ >(null);
const [manualTxHash, setManualTxHash] = useState("");
const [lastPaymentStartedAt, setLastPaymentStartedAt] = useState(0);
const [showSecondarySections, setShowSecondarySections] = useState(false);
@@ -1346,17 +1348,13 @@ export function AccountCenter() {
const parsed = JSON.parse(raw) as PaymentRecoveryState;
const userId = String(parsed?.userId || "").trim();
const intentId = String(parsed?.intentId || "").trim();
- const txHash = String(parsed?.txHash || "").trim().toLowerCase();
+ const txHash = String(parsed?.txHash || "")
+ .trim()
+ .toLowerCase();
const createdAt = Number(parsed?.createdAt || 0);
const expired =
!createdAt || Date.now() - createdAt > PAYMENT_RECOVERY_TTL_MS;
- if (
- expired ||
- !intentId ||
- !txHash ||
- !userId ||
- userId !== authUserId
- ) {
+ if (expired || !intentId || !txHash || !userId || userId !== authUserId) {
clearStoredPaymentRecovery();
return;
}
@@ -1543,7 +1541,9 @@ export function AccountCenter() {
);
const hasQueuedExtension = Boolean(isSubscribed && queuedExtensionDays > 0);
const displayExpiryRaw = isSubscribed ? totalExpiryRaw : currentExpiryRaw;
- const reminderExpiryRaw = isSubscribed ? totalExpiryRaw : currentExpiryRaw || totalExpiryRaw;
+ const reminderExpiryRaw = isSubscribed
+ ? totalExpiryRaw
+ : currentExpiryRaw || totalExpiryRaw;
const expiryInfo = parseSubscriptionExpiry(reminderExpiryRaw);
const expiryFormatted = formatTime(displayExpiryRaw, locale);
const currentExpiryFormatted = formatTime(currentExpiryRaw, locale);
@@ -1555,16 +1555,18 @@ export function AccountCenter() {
: copy.noProSubscription;
const showExpiringSoon = Boolean(
isSubscribed &&
- !hasQueuedExtension &&
- expiryInfo &&
- !expiryInfo.expired &&
- expiryInfo.daysLeft <= 3,
+ !hasQueuedExtension &&
+ expiryInfo &&
+ !expiryInfo.expired &&
+ expiryInfo.daysLeft <= 3,
+ );
+ const showExpiredReminder = Boolean(
+ !isSubscribed && expiryInfo && expiryInfo.expired,
);
- const showExpiredReminder = Boolean(!isSubscribed && expiryInfo && expiryInfo.expired);
const paymentFeatureReady = paymentReadyForRecovery;
const canOpenCheckoutOverlay = Boolean(
paymentFeatureReady &&
- (!isSubscribed || isTrialPlan || showExpiringSoon || showExpiredReminder),
+ (!isSubscribed || isTrialPlan || showExpiringSoon || showExpiredReminder),
);
const subscriptionStatusTitle = showExpiredReminder
? isTrialPlan
@@ -1607,12 +1609,12 @@ export function AccountCenter() {
});
}, [
isAuthenticated,
- canOpenCheckoutOverlay,
- planCode,
- showExpiredReminder,
- showExpiringSoon,
- showOverlay,
- ]);
+ canOpenCheckoutOverlay,
+ planCode,
+ showExpiredReminder,
+ showExpiringSoon,
+ showOverlay,
+ ]);
// Points Logic
const backendPointsRaw = Number(backend?.points);
@@ -2472,7 +2474,9 @@ export function AccountCenter() {
}
const created = (await createRes.json()) as CreatedIntent;
const direct = created.direct_payment;
- const intentId = String(created.intent?.intent_id || direct?.intent_id || "");
+ const intentId = String(
+ created.intent?.intent_id || direct?.intent_id || "",
+ );
if (!intentId || !direct?.receiver_address || !direct?.amount_usdc) {
throw new Error("manual payment payload invalid");
}
@@ -2498,8 +2502,12 @@ export function AccountCenter() {
};
const submitManualPaymentTx = async () => {
- const txHashNorm = String(manualTxHash || "").trim().toLowerCase();
- const intentId = String(lastIntentId || manualPayment?.intent_id || "").trim();
+ const txHashNorm = String(manualTxHash || "")
+ .trim()
+ .toLowerCase();
+ const intentId = String(
+ lastIntentId || manualPayment?.intent_id || "",
+ ).trim();
if (!intentId || !manualPayment) {
setPaymentError("请先创建手动转账订单。");
return;
@@ -2512,20 +2520,26 @@ export function AccountCenter() {
setPaymentError("");
try {
const authHeaders = await buildAuthedHeaders(true, false);
- const submitRes = await fetch(`/api/payments/intents/${intentId}/submit`, {
- method: "POST",
- headers: authHeaders,
- body: JSON.stringify({ tx_hash: txHashNorm }),
- });
+ const submitRes = await fetch(
+ `/api/payments/intents/${intentId}/submit`,
+ {
+ method: "POST",
+ headers: authHeaders,
+ body: JSON.stringify({ tx_hash: txHashNorm }),
+ },
+ );
if (!submitRes.ok) {
const raw = (await submitRes.text()).slice(0, 350);
throw new Error(`submit tx failed: ${raw}`);
}
- const confirmRes = await fetch(`/api/payments/intents/${intentId}/confirm`, {
- method: "POST",
- headers: authHeaders,
- body: JSON.stringify({ tx_hash: txHashNorm }),
- });
+ const confirmRes = await fetch(
+ `/api/payments/intents/${intentId}/confirm`,
+ {
+ method: "POST",
+ headers: authHeaders,
+ body: JSON.stringify({ tx_hash: txHashNorm }),
+ },
+ );
if (!confirmRes.ok) {
const raw = (await confirmRes.text()).slice(0, 350);
const lowerRaw = raw.toLowerCase();
@@ -2535,7 +2549,9 @@ export function AccountCenter() {
(lowerRaw.includes("confirmations not enough") ||
lowerRaw.includes("tx indexed partially")));
if (maybePending) {
- setPaymentInfo(`交易已提交: ${shortAddress(txHashNorm)},等待链上确认中...`);
+ setPaymentInfo(
+ `交易已提交: ${shortAddress(txHashNorm)},等待链上确认中...`,
+ );
await pollIntentUntilConfirmed(intentId, authHeaders, txHashNorm);
return;
}
@@ -2627,17 +2643,17 @@ export function AccountCenter() {
- {!showOverlay && canOpenCheckoutOverlay && (
-
- )}
+ {!showOverlay && canOpenCheckoutOverlay && (
+
+ )}
@@ -2826,7 +2842,8 @@ export function AccountCenter() {
- 积分规则:群内有效发言(自动防刷检测)+ 每日首条发言额外奖励。每周一零点结算周榜,所有活跃用户均享参与奖。
+ 积分规则:群内有效发言(自动防刷检测)+
+ 每日首条发言额外奖励。每周一零点结算周榜,所有活跃用户均享参与奖。
@@ -2843,9 +2860,9 @@ export function AccountCenter() {
{/* Subscription Info & Paywall */}
-
+ >
{copy.membershipDetails}
@@ -2968,11 +2985,13 @@ export function AccountCenter() {
Telegram 群成员价格
- 已验证群成员身份,当前会员价 {backend.telegram_pricing.amount_usdc ?? "5"}U。
+ 已验证群成员身份,当前会员价{" "}
+ {backend.telegram_pricing.amount_usdc ?? "5"}U。
- 当前价格: {backend.telegram_pricing.amount_usdc ?? "5"}U · 群成员
+ 当前价格: {backend.telegram_pricing.amount_usdc ?? "5"}U
+ · 群成员
@@ -3125,7 +3144,8 @@ export function AccountCenter() {
手动转账(无需绑定钱包)
- 先创建订单,向唯一收款地址转账,完成后提交 tx hash 自动开通。请不要和钱包支付同时使用。
+ 先创建订单,向唯一收款地址转账,完成后提交 tx hash
+ 自动开通。请不要和钱包支付同时使用。