Fix ts errors

This commit is contained in:
Jon Staab
2025-03-31 12:49:28 -07:00
parent cfd2e3aac7
commit 1524d128e3
27 changed files with 357 additions and 448 deletions
+9 -5
View File
@@ -1,9 +1,9 @@
import {PINS, asDecryptedEvent, readList} from "@welshman/util"
import {type TrustedEvent, type PublishedList} from "@welshman/util"
import {type SubscribeRequestWithHandlers} from "@welshman/net"
import {TrustedEvent, PublishedList} from "@welshman/util"
import {load, MultiRequestOptions} from "@welshman/net"
import {deriveEventsMapped} from "@welshman/store"
import {repository} from "./core.js"
import {load} from "./subscribe.js"
import {Router} from "./router.js"
import {collection} from "./collection.js"
import {loadRelaySelections} from "./relaySelections.js"
@@ -21,8 +21,12 @@ export const {
name: "pins",
store: pins,
getKey: pins => pins.event.pubkey,
load: async (pubkey: string, request: Partial<SubscribeRequestWithHandlers> = {}) => {
load: async (pubkey: string, request: Partial<MultiRequestOptions> = {}) => {
await loadRelaySelections(pubkey, request)
await load({...request, filters: [{kinds: [PINS], authors: [pubkey]}]})
const filter = {kinds: [PINS], authors: [pubkey]}
const relays = Router.getInstance().FromPubkey(pubkey).getUrls()
await load({relays, ...request, filter})
},
})