Speed up profile loading

This commit is contained in:
Jon Staab
2024-09-10 09:51:03 -07:00
parent 77e8243d8b
commit bece689530
7 changed files with 44 additions and 22 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import {writable, derived} from 'svelte/store'
import {withGetter} from '@welshman/store'
import {type SubscribeRequest} from "@welshman/net"
import {type SubscribeRequestWithHandlers} from "@welshman/net"
import {ctx, tryCatch, fetchJson, uniq, batcher, postJson, last} from '@welshman/lib'
import {collection} from './collection'
import {deriveProfile} from './profiles'
@@ -97,7 +97,7 @@ export const {
}),
})
export const deriveHandleForPubkey = (pubkey: string, request: Partial<SubscribeRequest> = {}) =>
export const deriveHandleForPubkey = (pubkey: string, request: Partial<SubscribeRequestWithHandlers> = {}) =>
derived(
[handlesByNip05, deriveProfile(pubkey, request)],
([$handlesByNip05, $profile]) => {