UNPKG

@renegade-fi/core

Version:
24 lines 931 B
import { getBackOfQueueWallet, } from "../actions/getBackOfQueueWallet.js"; import { ConfigRequiredError } from "../errors/base.js"; import { filterQueryOptions } from "./utils.js"; export function getBackOfQueueWalletQueryOptions(config, options = {}) { return { async queryFn({ queryKey }) { const { scopeKey: _, ...parameters } = queryKey[1]; if (!config) throw new ConfigRequiredError("getBackOfQueueWallet"); const wallet = await getBackOfQueueWallet(config, { ...parameters, }); return wallet ?? null; }, queryKey: getBackOfQueueWalletQueryKey({ scopeKey: config?.state.id, ...options, }), }; } export function getBackOfQueueWalletQueryKey(options = {}) { return ["backOfQueueWallet", filterQueryOptions(options)]; } //# sourceMappingURL=getBackOfQueueWallet.js.map