feat: implement user account center with subscription and EVM wallet payment integration, along with initial project configuration files.

This commit is contained in:
2569718930@qq.com
2026-03-13 18:06:08 +08:00
parent 08217deefb
commit 80acade251
4 changed files with 10 additions and 10 deletions
@@ -246,15 +246,10 @@ async function getWalletConnectProvider(
"WalletConnect 未配置:缺少 NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID。", "WalletConnect 未配置:缺少 NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID。",
); );
} }
if ( if (walletConnectProviderCache && walletConnectProviderChainId === chainId) {
walletConnectProviderCache &&
walletConnectProviderChainId === chainId
) {
return walletConnectProviderCache; return walletConnectProviderCache;
} }
const { EthereumProvider } = await import( const { EthereumProvider } = await import("@walletconnect/ethereum-provider");
"@walletconnect/ethereum-provider"
);
const rpcMap: Record<number, string> = { const rpcMap: Record<number, string> = {
[chainId]: rpcUrl || WALLETCONNECT_POLYGON_RPC_URL, [chainId]: rpcUrl || WALLETCONNECT_POLYGON_RPC_URL,
}; };
@@ -1543,7 +1538,7 @@ export function AccountCenter() {
<Bot size={22} /> Telegram Bot <Bot size={22} /> Telegram Bot
</h3> </h3>
<p className="text-slate-400 text-sm mb-6"> <p className="text-slate-400 text-sm mb-6">
https://t.me/+nMG7SjziUKYyZmM1 polyweather机器人
</p> </p>
<div className="flex gap-2"> <div className="flex gap-2">
<code className="flex-grow bg-black/40 border border-white/10 p-4 rounded-xl font-mono text-xs text-blue-300 overflow-hidden text-ellipsis whitespace-nowrap"> <code className="flex-grow bg-black/40 border border-white/10 p-4 rounded-xl font-mono text-xs text-blue-300 overflow-hidden text-ellipsis whitespace-nowrap">
@@ -1654,7 +1649,9 @@ export function AccountCenter() {
{!walletConnectEnabled && ( {!walletConnectEnabled && (
<p className="text-[11px] text-slate-500"> <p className="text-[11px] text-slate-500">
WalletConnect WalletConnect
<code className="mx-1">NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID</code> <code className="mx-1">
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
</code>
</p> </p>
)} )}
</div> </div>
+1
View File
@@ -30,6 +30,7 @@
"@types/node": "^22.15.21", "@types/node": "^22.15.21",
"@types/react": "^19.0.10", "@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4", "@types/react-dom": "^19.0.4",
"@types/trusted-types": "^2.0.7",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"postcss": "^8.5.3", "postcss": "^8.5.3",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
+1
View File
@@ -31,6 +31,7 @@
"@types/node": "^22.15.21", "@types/node": "^22.15.21",
"@types/react": "^19.0.10", "@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4", "@types/react-dom": "^19.0.4",
"@types/trusted-types": "^2.0.7",
"autoprefixer": "^10.4.20", "autoprefixer": "^10.4.20",
"postcss": "^8.5.3", "postcss": "^8.5.3",
"tailwindcss": "^3.4.17", "tailwindcss": "^3.4.17",
+2 -1
View File
@@ -17,7 +17,8 @@
"paths": { "paths": {
"@/*": ["./*"] "@/*": ["./*"]
}, },
"plugins": [{ "name": "next" }] "plugins": [{ "name": "next" }],
"typeRoots": ["./node_modules/@types"]
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"] "exclude": ["node_modules"]