@renegade-fi/core
Version:
VanillaJS library for Renegade
24 lines • 931 B
JavaScript
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