mirror of
https://github.com/dergigi/boris.git
synced 2026-02-10 17:44:34 +01:00
fix: replace any types with proper NostrEvent types in relayListService
- Import NostrEvent type from nostr-tools - Replace any[] with NostrEvent[] for events array - Replace Map<string, any> with Map<string, NostrEvent> for eventsMap - Resolves ESLint warnings about explicit any usage
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { RelayPool } from 'applesauce-relay'
|
||||
import { NostrEvent } from 'nostr-tools'
|
||||
import { queryEvents } from './dataFetch'
|
||||
|
||||
export interface UserRelayInfo {
|
||||
@@ -24,8 +25,8 @@ export async function loadUserRelayList(
|
||||
const startTime = Date.now()
|
||||
|
||||
// Try querying with streaming callback for faster results
|
||||
const events: any[] = []
|
||||
const eventsMap = new Map<string, any>()
|
||||
const events: NostrEvent[] = []
|
||||
const eventsMap = new Map<string, NostrEvent>()
|
||||
|
||||
const result = await queryEvents(relayPool, {
|
||||
kinds: [10002],
|
||||
|
||||
Reference in New Issue
Block a user