@pear-protocol/symmio-client 0.2.17 → 0.2.20
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/react/index.js +19 -7
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +19 -7
- package/dist/react/index.mjs.map +1 -1
- package/package.json +2 -1
package/dist/react/index.mjs
CHANGED
|
@@ -24688,7 +24688,15 @@ function useSymmPositions(params) {
|
|
|
24688
24688
|
const resolvedAddress = accountAddress ? void 0 : address;
|
|
24689
24689
|
const chainId = params.chainId ?? ctxChainId;
|
|
24690
24690
|
const internalEnabled = !!symmCoreClient && !!(accountAddress || resolvedAddress);
|
|
24691
|
-
|
|
24691
|
+
const enabled = internalEnabled && (params.query?.enabled ?? true);
|
|
24692
|
+
console.log({
|
|
24693
|
+
symmCoreClient,
|
|
24694
|
+
accountAddress,
|
|
24695
|
+
resolvedAddress,
|
|
24696
|
+
chainId,
|
|
24697
|
+
internalEnabled,
|
|
24698
|
+
enabled
|
|
24699
|
+
});
|
|
24692
24700
|
return useQuery({
|
|
24693
24701
|
...params.query,
|
|
24694
24702
|
queryKey: symmKeys.positions({
|
|
@@ -24696,12 +24704,16 @@ function useSymmPositions(params) {
|
|
|
24696
24704
|
address: resolvedAddress,
|
|
24697
24705
|
chainId
|
|
24698
24706
|
}),
|
|
24699
|
-
queryFn: () =>
|
|
24700
|
-
|
|
24701
|
-
|
|
24702
|
-
|
|
24703
|
-
|
|
24704
|
-
|
|
24707
|
+
queryFn: () => {
|
|
24708
|
+
const result = symmCoreClient.positions.getOpen({
|
|
24709
|
+
accountAddress,
|
|
24710
|
+
address: resolvedAddress,
|
|
24711
|
+
chainId
|
|
24712
|
+
});
|
|
24713
|
+
console.log({ result });
|
|
24714
|
+
return result;
|
|
24715
|
+
},
|
|
24716
|
+
enabled
|
|
24705
24717
|
});
|
|
24706
24718
|
}
|
|
24707
24719
|
function useSymmOpenOrders(params) {
|