From d352daf246ace1ab29467d9f95e42360d47309fa Mon Sep 17 00:00:00 2001 From: Cherik Date: Sat, 4 Jan 2025 13:01:36 +0330 Subject: [PATCH] fix warpcast handle --- src/helpers/url.tsx | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/helpers/url.tsx b/src/helpers/url.tsx index 4fc2092f9d..21fa2656f0 100644 --- a/src/helpers/url.tsx +++ b/src/helpers/url.tsx @@ -198,11 +198,18 @@ export const getSocialMediaHandle = ( /discord\.gg\/([^\/]+)/, ); case 'farcaster': - // Assuming Farcaster uses a pattern like 'farcaster.xyz/username' - return extractUsernameFromPattern( - cleanedUrl, - /farcaster\.xyz\/([^\/]+)/, - ); + const isWrapCast = cleanedUrl.includes('warpcast'); + if (isWrapCast) { + return extractUsernameFromPattern( + cleanedUrl, + /warpcast\.com\/([^\/]+)/, + ); + } else { + return extractUsernameFromPattern( + cleanedUrl, + /farcaster\.xyz\/([^\/]+)/, + ); + } case 'lens': // Assuming Lens uses a pattern like 'lens.xyz/username' return extractUsernameFromPattern(