fix: 🐛
This commit is contained in:
parent
c62a82f673
commit
6bc2fde314
5 changed files with 10 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,8 @@ class StorageService {
|
|||
this.activeRelaySetId = activeRelaySetId
|
||||
} else {
|
||||
this.relaySets = JSON.parse(relaySetsStr)
|
||||
this.activeRelaySetId = window.localStorage.getItem(StorageKey.ACTIVE_RELAY_SET_ID) ?? null
|
||||
const activeRelaySetIdStr = window.localStorage.getItem(StorageKey.ACTIVE_RELAY_SET_ID)
|
||||
this.activeRelaySetId = activeRelaySetIdStr ? JSON.parse(activeRelaySetIdStr) : null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue