@pear-protocol/symmio-client 0.2.15 → 0.2.17

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.
@@ -24688,6 +24688,7 @@ 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
+ console.log({ accountAddress, resolvedAddress, chainId, internalEnabled });
24691
24692
  return useQuery({
24692
24693
  ...params.query,
24693
24694
  queryKey: symmKeys.positions({
@@ -25311,13 +25312,7 @@ function useSymmWs(params = {}) {
25311
25312
  );
25312
25313
  if (executionsUnsub) unsubscribers.push(executionsUnsub);
25313
25314
  return () => {
25314
- if (unsubscribers.length > 2) {
25315
- unsubscribers.forEach((unsubscribe) => unsubscribe());
25316
- } else {
25317
- removeOnConnect();
25318
- removeOnDisconnect();
25319
- ws.unsubscribeAll();
25320
- }
25315
+ unsubscribers.forEach((unsubscribe) => unsubscribe());
25321
25316
  };
25322
25317
  }, [symmCoreClient, accountAddress, chainId, queryClient, setConnected]);
25323
25318
  return { isConnected };