timelock-sdk 0.0.62 → 0.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client.cjs +11 -4
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +397 -14
- package/dist/client.d.ts +456 -73
- package/dist/client.js +11 -4
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
package/dist/client.cjs
CHANGED
|
@@ -660,8 +660,12 @@ const useExtendOption = (marketAddr) => {
|
|
|
660
660
|
//#region src/hooks/market/useUserOperators.ts
|
|
661
661
|
const useUserOperators = (userAddr, marketAddr) => {
|
|
662
662
|
const { graphqlClient } = useTimelockConfig();
|
|
663
|
-
const { data } = (0, __tanstack_react_query.useQuery)({
|
|
664
|
-
queryKey: [
|
|
663
|
+
const { data,...rest } = (0, __tanstack_react_query.useQuery)({
|
|
664
|
+
queryKey: [
|
|
665
|
+
"userOperators",
|
|
666
|
+
userAddr || "--",
|
|
667
|
+
marketAddr || "--"
|
|
668
|
+
],
|
|
665
669
|
queryFn: async () => {
|
|
666
670
|
if (!userAddr || !marketAddr) return void 0;
|
|
667
671
|
return (await graphqlClient.GetUserMarketOperators({
|
|
@@ -673,9 +677,12 @@ const useUserOperators = (userAddr, marketAddr) => {
|
|
|
673
677
|
operatorAddr: operator.operator.address.toLowerCase()
|
|
674
678
|
}));
|
|
675
679
|
},
|
|
676
|
-
enabled: !!marketAddr && !!graphqlClient
|
|
680
|
+
enabled: !!userAddr && !!marketAddr && !!graphqlClient
|
|
677
681
|
});
|
|
678
|
-
return
|
|
682
|
+
return {
|
|
683
|
+
...rest,
|
|
684
|
+
data: data || {}
|
|
685
|
+
};
|
|
679
686
|
};
|
|
680
687
|
|
|
681
688
|
//#endregion
|