+
+
🔗
+
Connect your wallet to purchase XIC tokens with USDT
+
+
+
+ Supports MetaMask, Trust Wallet, and all EVM-compatible wallets
+
+
+ );
+ }
+
+ if (isWrongNetwork) {
+ return (
+
+ {/* Wallet info */}
+
+
+
+
{shortenAddress(wallet.address || "")}
+
+ {usdtBalance !== null && (
+
Balance: {usdtBalance.toFixed(2)} USDT
+ )}
+
+
+ {/* USDT Amount Input */}
+
+
+
+ setUsdtInput(e.target.value)}
+ min={PRESALE_CONFIG.minPurchaseUSDT}
+ max={PRESALE_CONFIG.maxPurchaseUSDT}
+ placeholder="Enter USDT amount"
+ className="input-nac w-full px-4 py-3 rounded-xl text-lg counter-digit pr-20"
+ disabled={isProcessing}
+ />
+ USDT
+
+
+ {[100, 500, 1000, 5000].map(amt => (
+
+ ))}
+
+
+
+ {/* Token Amount Preview */}
+
+
+
You receive
+
+
+ {formatNumber(tokenAmount)}
+
+ XIC
+
+
+
+ Price per token
+ $0.02 USDT
+
+
+
+ {/* Purchase Steps */}
+ {isProcessing && (
+
+
+
+ {purchaseState.step !== "approving" && ✓}
+
+ Step 1: Approve USDT
+
+
+
+ {(purchaseState.step as string) === "success" && ✓}
+
+ Step 2: Confirm Purchase
+
+
+ )}
+
+ {/* Buy Button */}
+
+
+
+ Min: ${PRESALE_CONFIG.minPurchaseUSDT} · Max: ${PRESALE_CONFIG.maxPurchaseUSDT.toLocaleString()} USDT
+
+
+ );
+}
+
+// ─── Main Page ────────────────────────────────────────────────────────────────
+export default function Home() {
+ const [activeNetwork, setActiveNetwork] = useState