diff --git a/client/src/lib/i18n.ts b/client/src/lib/i18n.ts index 66fbd52..0569bd1 100644 --- a/client/src/lib/i18n.ts +++ b/client/src/lib/i18n.ts @@ -102,6 +102,31 @@ export const translations = { trc20_step4: "Contact support with your TX hash if tokens are not received within 24 hours", trc20_warning: "⚠️ Only send USDT on the TRON network (TRC20). Sending other tokens or using a different network will result in permanent loss.", + // How to Buy Guide + guide_title: "How to Buy XIC", + guide_step1_title: "Step 1: Before Purchase", + guide_step1_1: "Visit the website and connect your wallet", + guide_step1_2: "Add XIC token (BSC network, contract: 0xc65e7A2738eD884dB8d26a6eb2fEcF7daCA2e90C)", + guide_step1_3: "Copy the token receiving address from the website", + guide_step2_title: "Step 2: Purchase", + guide_step2_1: "Paste the receiving address", + guide_step2_2: "Website automatically shows USDT amount", + guide_step2_3: "Enter the XIC quantity you want to buy", + guide_step2_4: "Click Buy — one wallet confirmation only", + guide_step3_title: "Step 3: After Purchase", + guide_step3_1: "Receive purchase receipt", + guide_step3_2: "Confirm payment is completed", + guide_step3_3: "Get transaction hash", + guide_step3_4: "XIC tokens automatically sent to your wallet", + // Add Token + add_token_btn: "Add XIC to Wallet", + add_token_success: "XIC token added to wallet!", + add_token_fail: "Failed to add token. Please add manually.", + // WhatsApp Support + support_whatsapp: "WhatsApp Support", + support_whatsapp_msg: "Didn't receive tokens? Contact us on WhatsApp, resolved within 24 hours", + support_whatsapp_btn: "Contact WhatsApp: +971 56 165 1888", + // Why NAC why_rwa_title: "Native RWA Chain", why_rwa_desc: "Purpose-built for Real World Asset tokenization with AI-native compliance", @@ -268,6 +293,31 @@ export const translations = { trc20_step4: "如24小时内未收到代币,请携带交易哈希联系客服", trc20_warning: "⚠️ 请仅在 TRON 网络(TRC20)上发送 USDT。发送其他代币或使用其他网络将导致永久损失。", + // How to Buy Guide + guide_title: "XIC 购买指南", + guide_step1_title: "第一步:购买前准备", + guide_step1_1: "访问网站并连接钱包", + guide_step1_2: "添加 XIC 代币(BSC 网络,合约:0xc65e7A2738eD884dB8d26a6eb2fEcF7daCA2e90C)", + guide_step1_3: "复制网站上的代币接收地址", + guide_step2_title: "第二步:购买操作", + guide_step2_1: "粘贴接收地址", + guide_step2_2: "网站自动显示 USDT 数量", + guide_step2_3: "在输入框填入购买 XIC 的数量", + guide_step2_4: "点击购买 — 只需钱包确认一次", + guide_step3_title: "第三步:购买后确认", + guide_step3_1: "收到购买回执", + guide_step3_2: "确认已完成支付", + guide_step3_3: "获取交易哈希", + guide_step3_4: "XIC 代币自动发放到您的钱包", + // Add Token + add_token_btn: "添加 XIC 到钱包", + add_token_success: "XIC 代币已添加到钱包!", + add_token_fail: "添加失败,请手动添加代币。", + // WhatsApp Support + support_whatsapp: "WhatsApp 客服", + support_whatsapp_msg: "没有收到代币?联系 WhatsApp 客服,24小时内给予解决", + support_whatsapp_btn: "联系 WhatsApp:+971 56 165 1888", + // Why NAC why_rwa_title: "原生 RWA 公链", why_rwa_desc: "专为现实世界资产代币化而生,内置 AI 合规审批", diff --git a/client/src/pages/Home.tsx b/client/src/pages/Home.tsx index 87c5c20..676e126 100644 --- a/client/src/pages/Home.tsx +++ b/client/src/pages/Home.tsx @@ -453,6 +453,31 @@ function EVMPurchasePanel({ network, lang, wallet }: { network: "BSC" | "ETH"; l } if (purchaseState.step === "success") { + const handleAddToken = async () => { + try { + const ethereum = (window as unknown as Record).ethereum as { request?: (args: { method: string; params?: unknown[] }) => Promise } | undefined; + if (!ethereum?.request) { + toast.error(t("add_token_fail")); + return; + } + await ethereum.request({ + method: 'wallet_watchAsset', + params: [{ + type: 'ERC20', + options: { + address: '0xc65e7A2738eD884dB8d26a6eb2fEcF7daCA2e90C', + symbol: 'XIC', + decimals: 18, + image: 'https://d2xsxph8kpxj0f.cloudfront.net/310519663287655625/Ngki3MumDNGduV3xJt3mga/nac-token-icon_382e5c30.png', + }, + }], + }); + toast.success(t("add_token_success")); + } catch { + toast.error(t("add_token_fail")); + } + }; + return (
🎉
@@ -472,6 +497,35 @@ function EVMPurchasePanel({ network, lang, wallet }: { network: "BSC" | "ETH"; l {t("buy_view_explorer")} )} + {/* Add XIC to Wallet Button */} + + {/* WhatsApp Support */} +
+

{t("support_whatsapp_msg")}

+ + + + + {t("support_whatsapp_btn")} + +
@@ -1208,6 +1262,58 @@ export default function Home() {
+ {/* How to Buy Guide — 3-Step Cards */} +
+

{t("guide_title")}

+
+ {/* Step 1 */} +
+
+
1
+ {t("guide_step1_title")} +
+
    + {[t("guide_step1_1"), t("guide_step1_2"), t("guide_step1_3")].map((item, i) => ( +
  • + + {item} +
  • + ))} +
+
+ {/* Step 2 */} +
+
+
2
+ {t("guide_step2_title")} +
+
    + {[t("guide_step2_1"), t("guide_step2_2"), t("guide_step2_3"), t("guide_step2_4")].map((item, i) => ( +
  • + + {item} +
  • + ))} +
+
+ {/* Step 3 */} +
+
+
3
+ {t("guide_step3_title")} +
+
    + {[t("guide_step3_1"), t("guide_step3_2"), t("guide_step3_3"), t("guide_step3_4")].map((item, i) => ( +
  • + + {item} +
  • + ))} +
+
+
+
+ {/* Network Selector */}

{t("buy_select_network")}