fix(profile): on login fetch profile from relays only

This commit is contained in:
en 2025-02-03 17:03:39 +01:00
parent a5c1f1db74
commit 52edaf5eca

View File

@ -22,7 +22,7 @@ import { npubToHex } from '../utils'
import logo from '../assets/img/DEG Mods Logo With Text.svg'
import placeholder from '../assets/img/DEG Mods Default PP.png'
import { resetUserWot } from 'store/reducers/wot'
import { NDKNip07Signer } from '@nostr-dev-kit/ndk'
import { NDKNip07Signer, NDKSubscriptionCacheUsage } from '@nostr-dev-kit/ndk'
export const Header = () => {
const dispatch = useAppDispatch()
@ -66,7 +66,9 @@ export const Header = () => {
})
)
ndk.signer = new NDKNip07Signer()
findMetadata(npub).then((userProfile) => {
findMetadata(npub, {
cacheUsage: NDKSubscriptionCacheUsage.ONLY_RELAY
}).then((userProfile) => {
if (userProfile) {
dispatch(
setUser({