From 01ca102dcc94f8a58488e3808cd0aea14d0076e9 Mon Sep 17 00:00:00 2001 From: en Date: Fri, 21 Feb 2025 14:39:53 +0100 Subject: [PATCH] fix(profile): add npub to hex conversion in link --- src/components/ProfileSection.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/components/ProfileSection.tsx b/src/components/ProfileSection.tsx index 36d6b64..0899910 100644 --- a/src/components/ProfileSection.tsx +++ b/src/components/ProfileSection.tsx @@ -587,18 +587,17 @@ type ProfileLinkProps = { } export const ProfileLink = ({ pubkey, nip05 }: ProfileLinkProps) => { const { ndk } = useNDKContext() - console.log(`[debug]`, pubkey, nip05) const [hexPubkey, setHexPubkey] = useState() const profile = useProfile(hexPubkey, { cacheUsage: NDKSubscriptionCacheUsage.PARALLEL }) useEffect(() => { if (pubkey) { - setHexPubkey(pubkey) + setHexPubkey(npubToHex(pubkey)!) } else if (nip05) { NDKUser.fromNip05(nip05, ndk).then((user) => { if (user?.pubkey) { - setHexPubkey(user.pubkey) + setHexPubkey(npubToHex(user.pubkey)!) } }) }