fix: fetch profile from current relays if user has no relay list

This commit is contained in:
codytseng 2025-11-03 09:52:11 +08:00
parent e556b83f5c
commit 1b7ec56c89
3 changed files with 20 additions and 9 deletions

View file

@ -1,3 +1,4 @@
import { BIG_RELAY_URLS } from '@/constants'
import { TRelayInfo } from '@/types'
export function checkAlgoRelay(relayInfo: TRelayInfo | undefined) {
@ -7,3 +8,7 @@ export function checkAlgoRelay(relayInfo: TRelayInfo | undefined) {
export function checkSearchRelay(relayInfo: TRelayInfo | undefined) {
return relayInfo?.supported_nips?.includes(50)
}
export function filterOutBigRelays(relayUrls: string[]) {
return relayUrls.filter((url) => !BIG_RELAY_URLS.includes(url))
}