fix: 🐛

This commit is contained in:
codytseng 2025-01-13 23:56:41 +08:00
parent c62a82f673
commit 6bc2fde314
5 changed files with 10 additions and 5 deletions

View file

@ -4,7 +4,7 @@ import {
getProfileFromProfileEvent,
getRelayListFromRelayListEvent
} from '@/lib/event'
import { userIdToPubkey } from '@/lib/pubkey'
import { formatPubkey, userIdToPubkey } from '@/lib/pubkey'
import { TDraftEvent, TProfile, TRelayInfo, TRelayList } from '@/types'
import { sha256 } from '@noble/hashes/sha2'
import DataLoader from 'dataloader'
@ -393,7 +393,7 @@ class ClientService extends EventTarget {
try {
const pubkey = userIdToPubkey(id)
return { pubkey, username: pubkey }
return { pubkey, username: formatPubkey(pubkey) }
} catch {
return undefined
}