移除所有用户可见的 Matic 过时引用,统一使用 Polygon / POL

Polygon 已于 2021 年从 Matic 更名,2024 年 token 从 MATIC 迁移为 POL。
- polygonChain 标签: "Polygon (Matic) Network" → "Polygon Network"
- chainIdToDisplayName: "Polygon (Matic)" → "Polygon"
- paymentGasWarning: "POL/MATIC" → "POL"
- chainSwitchPrompt: "Polygon (Matic)" → "Polygon"
- 错误检测正则保留 matic 关键字以兼容旧钱包

Tested: tsc --noEmit
This commit is contained in:
2569718930@qq.com
2026-05-21 13:04:37 +08:00
parent 982d192499
commit 8022464e78
@@ -245,10 +245,10 @@ const WALLET_REQUEST_TIMEOUT_MS = 60_000;
const WALLET_TRANSACTION_REQUEST_TIMEOUT_MS = 120_000;
function chainIdToDisplayName(chainId: number | undefined | null): string {
if (chainId === 137) return "Polygon (Matic)";
if (chainId === 137) return "Polygon";
if (chainId === 1) return "Ethereum Mainnet";
if (chainId) return `Chain ID ${chainId}`;
return "Polygon (Matic)";
return "Polygon";
}
let walletConnectProviderCache: EvmProvider | null = null;
@@ -795,7 +795,7 @@ export function AccountCenter() {
paymentNetwork: isEn ? "Payment Network" : "支付网络",
paymentHost: isEn ? "Payment Host" : "支付域名",
primary: "Primary",
polygonChain: isEn ? "Polygon (Matic) Network" : "Polygon (Matic) 网络",
polygonChain: isEn ? "Polygon Network" : "Polygon 网络",
noWallet: isEn ? "No payment wallet bound yet." : "未绑定任何付款钱包",
bindExt: isEn
? "Bind Browser Wallet (EVM Extension)"
@@ -883,8 +883,8 @@ export function AccountCenter() {
? "Option 1: Bind your EVM wallet (e.g. MetaMask extension or WalletConnect QR scan) to sign and pay via smart contract. Credits are credited instantly."
: "方式一:绑定您的 EVM 钱包(如 MetaMask 扩展或 WalletConnect 扫码),通过智能合约自动签名付款,额度即时到账。",
paymentGasWarning: isEn
? "Your wallet needs a small amount of Polygon POL/MATIC for gas fees; USDC alone may not complete authorization or payment. Please confirm your wallet is on Polygon network and keep some POL/MATIC before paying."
: "钱包里需要少量 Polygon POL/MATIC 作为 gas 手续费;只有 USDC 可能无法完成授权或支付。请确认当前钱包在 Polygon 网络,并预留一点 POL/MATIC 后再支付。",
? "Your wallet needs a small amount of POL for gas fees; USDC alone may not complete authorization or payment. Please confirm your wallet is on Polygon network and keep some POL before paying."
: "钱包里需要少量 POL 作为 gas 手续费;只有 USDC 可能无法完成授权或支付。请确认当前钱包在 Polygon 网络,并预留一点 POL 后再支付。",
paymentManualDesc: isEn
? "Option 2: Transfer directly to the platform's receiver contract without binding a wallet. After the transfer, submit the transaction hash (Tx Hash) and the system will verify and activate Pro automatically."
: "方式二:无需将钱包绑定到账号,直接向平台收款合约转账。转账完成后提交交易哈希(Tx Hash)系统会自动验签并开通 Pro。",
@@ -906,8 +906,8 @@ export function AccountCenter() {
chainSwitchError: isEn ? "Switch wallet network" : "切换钱包网络",
chainAddPolygon: isEn ? "Add Polygon network" : "添加 Polygon 网络",
chainSwitchPrompt: isEn
? "Please manually switch to Polygon (Matic) network in your wallet and try again."
: "请在钱包中手动切换到 Polygon (Matic) 网络后再试。",
? "Please manually switch to Polygon network in your wallet and try again."
: "请在钱包中手动切换到 Polygon 网络后再试。",
}),
[isEn],
);