rework context
This commit is contained in:
@@ -2,18 +2,17 @@ import {writable, derived} from 'svelte/store'
|
||||
import {withGetter} from '@welshman/store'
|
||||
import {type Zapper} from '@welshman/util'
|
||||
import {type SubscribeRequest} from "@welshman/net"
|
||||
import {uniq, identity, bech32ToHex, tryCatch, uniqBy, batcher, postJson} from '@welshman/lib'
|
||||
import {AppContext} from './core'
|
||||
import {ctx, uniq, identity, bech32ToHex, tryCatch, uniqBy, batcher, postJson} from '@welshman/lib'
|
||||
import {collection} from './collection'
|
||||
import {deriveProfile} from './profiles'
|
||||
|
||||
export const zappers = withGetter(writable<Zapper[]>([]))
|
||||
|
||||
export const fetchZappers = (lnurls: string[]) => {
|
||||
const base = AppContext.dufflepudUrl!
|
||||
const base = ctx.app.dufflepudUrl!
|
||||
|
||||
if (!base) {
|
||||
throw new Error("AppContext.dufflepudUrl is required to fetch zapper info")
|
||||
throw new Error("ctx.app.dufflepudUrl is required to fetch zapper info")
|
||||
}
|
||||
|
||||
const zappersByLnurl = new Map<string, Zapper>()
|
||||
|
||||
Reference in New Issue
Block a user