@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.js
CHANGED
|
@@ -24690,7 +24690,15 @@ function useSymmPositions(params) {
|
|
|
24690
24690
|
const resolvedAddress = accountAddress ? void 0 : address;
|
|
24691
24691
|
const chainId = params.chainId ?? ctxChainId;
|
|
24692
24692
|
const internalEnabled = !!symmCoreClient && !!(accountAddress || resolvedAddress);
|
|
24693
|
-
|
|
24693
|
+
const enabled = internalEnabled && (params.query?.enabled ?? true);
|
|
24694
|
+
console.log({
|
|
24695
|
+
symmCoreClient,
|
|
24696
|
+
accountAddress,
|
|
24697
|
+
resolvedAddress,
|
|
24698
|
+
chainId,
|
|
24699
|
+
internalEnabled,
|
|
24700
|
+
enabled
|
|
24701
|
+
});
|
|
24694
24702
|
return reactQuery.useQuery({
|
|
24695
24703
|
...params.query,
|
|
24696
24704
|
queryKey: symmKeys.positions({
|
|
@@ -24698,12 +24706,16 @@ function useSymmPositions(params) {
|
|
|
24698
24706
|
address: resolvedAddress,
|
|
24699
24707
|
chainId
|
|
24700
24708
|
}),
|
|
24701
|
-
queryFn: () =>
|
|
24702
|
-
|
|
24703
|
-
|
|
24704
|
-
|
|
24705
|
-
|
|
24706
|
-
|
|
24709
|
+
queryFn: () => {
|
|
24710
|
+
const result = symmCoreClient.positions.getOpen({
|
|
24711
|
+
accountAddress,
|
|
24712
|
+
address: resolvedAddress,
|
|
24713
|
+
chainId
|
|
24714
|
+
});
|
|
24715
|
+
console.log({ result });
|
|
24716
|
+
return result;
|
|
24717
|
+
},
|
|
24718
|
+
enabled
|
|
24707
24719
|
});
|
|
24708
24720
|
}
|
|
24709
24721
|
function useSymmOpenOrders(params) {
|