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。",
);
}
if (
walletConnectProviderCache &&
walletConnectProviderChainId === chainId
) {
if (walletConnectProviderCache && walletConnectProviderChainId === chainId) {
return walletConnectProviderCache;
}
const { EthereumProvider } = await import(
"@walletconnect/ethereum-provider"
);
const { EthereumProvider } = await import("@walletconnect/ethereum-provider");
const rpcMap: Record<number, string> = {
[chainId]: rpcUrl || WALLETCONNECT_POLYGON_RPC_URL,
};
@@ -1543,7 +1538,7 @@ export function AccountCenter() {
<Bot size={22} /> Telegram Bot
</h3>
<p className="text-slate-400 text-sm mb-6">
https://t.me/+nMG7SjziUKYyZmM1
polyweather机器人
</p>
<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">
@@ -1654,7 +1649,9 @@ export function AccountCenter() {
{!walletConnectEnabled && (
<p className="text-[11px] text-slate-500">
WalletConnect
<code className="mx-1">NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID</code>
<code className="mx-1">
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
</code>
</p>
)}
</div>
+1
View File
@@ -30,6 +30,7 @@
"@types/node": "^22.15.21",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@types/trusted-types": "^2.0.7",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.3",
"tailwindcss": "^3.4.17",
+1
View File
@@ -31,6 +31,7 @@
"@types/node": "^22.15.21",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@types/trusted-types": "^2.0.7",
"autoprefixer": "^10.4.20",
"postcss": "^8.5.3",
"tailwindcss": "^3.4.17",
+2 -1
View File
@@ -17,7 +17,8 @@
"paths": {
"@/*": ["./*"]
},
"plugins": [{ "name": "next" }]
"plugins": [{ "name": "next" }],
"typeRoots": ["./node_modules/@types"]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]