Files
solace-bg-dubai/frontend/lib/web3/walletconnect.ts
defiQUG a03417be98
All checks were successful
CI / lint-and-test (push) Successful in 9m52s
chore: consolidate local WIP (repo cleanup 20260707)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-07 09:41:38 -07:00

18 lines
572 B
TypeScript

const PLACEHOLDER_PROJECT_IDS = new Set([
"",
"temp_project_id_replace_me",
"your_walletconnect_project_id",
]);
export function isValidWalletConnectProjectId(projectId: string | undefined): boolean {
if (!projectId?.trim()) return false;
const normalized = projectId.trim();
if (PLACEHOLDER_PROJECT_IDS.has(normalized)) return false;
if (/replace_me|your_/i.test(normalized)) return false;
return normalized.length >= 32;
}
export function getWalletConnectProjectId(): string {
return process.env.NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID?.trim() ?? "";
}