Get rid of loadOne since it only works for id-based filters, not addresses

This commit is contained in:
Jon Staab
2024-09-04 17:29:31 -07:00
parent 8874884b9b
commit 25845dc837
6 changed files with 11 additions and 25 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import {MUTES, asDecryptedEvent, readList} from '@welshman/util'
import {type TrustedEvent, type PublishedList} from '@welshman/util'
import {type SubscribeRequest} from "@welshman/net"
import {deriveEventsMapped, withGetter} from '@welshman/store'
import {repository, loadOne} from './core'
import {repository, load} from './core'
import {collection} from './collection'
import {ensurePlaintext} from './plaintext'
@@ -28,5 +28,5 @@ export const {
store: mutes,
getKey: mute => mute.event.pubkey,
load: (pubkey: string, request: Partial<SubscribeRequest> = {}) =>
loadOne({...request, filters: [{kinds: [MUTES], authors: [pubkey]}]}),
load({...request, filters: [{kinds: [MUTES], authors: [pubkey]}]}),
})