@pear-protocol/symmio-client 0.2.22 → 0.2.25

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.
@@ -8658,9 +8658,7 @@ declare function useSymmMarkets(params?: {
8658
8658
  chainId?: number;
8659
8659
  searchText?: string;
8660
8660
  query?: SymmQueryConfig;
8661
- }): _tanstack_react_query.UseQueryResult<{
8662
- markets?: unknown[];
8663
- }, Error>;
8661
+ }): _tanstack_react_query.UseQueryResult<_pear_protocol_symm_core.MarketsResponse, Error>;
8664
8662
 
8665
8663
  /**
8666
8664
  * Use case: Fetch hedger market details by numeric market id.
@@ -8658,9 +8658,7 @@ declare function useSymmMarkets(params?: {
8658
8658
  chainId?: number;
8659
8659
  searchText?: string;
8660
8660
  query?: SymmQueryConfig;
8661
- }): _tanstack_react_query.UseQueryResult<{
8662
- markets?: unknown[];
8663
- }, Error>;
8661
+ }): _tanstack_react_query.UseQueryResult<_pear_protocol_symm_core.MarketsResponse, Error>;
8664
8662
 
8665
8663
  /**
8666
8664
  * Use case: Fetch hedger market details by numeric market id.
@@ -24694,14 +24694,6 @@ function useSymmPositions(params) {
24694
24694
  const chainId = params.chainId ?? ctxChainId;
24695
24695
  const internalEnabled = !!symmCoreClient && !!(accountAddress || resolvedAddress);
24696
24696
  const enabled = internalEnabled && (params.query?.enabled ?? true);
24697
- console.log({
24698
- symmCoreClient,
24699
- accountAddress,
24700
- resolvedAddress,
24701
- chainId,
24702
- internalEnabled,
24703
- enabled
24704
- });
24705
24697
  return reactQuery.useQuery({
24706
24698
  ...params.query,
24707
24699
  queryKey: symmKeys.positions({
@@ -24709,17 +24701,12 @@ function useSymmPositions(params) {
24709
24701
  address: resolvedAddress,
24710
24702
  chainId
24711
24703
  }),
24712
- queryFn: () => {
24713
- const result = symmCoreClient.positions.getOpen({
24714
- accountAddress,
24715
- address: resolvedAddress,
24716
- chainId
24717
- });
24718
- console.log({ result });
24719
- return result;
24720
- },
24721
- enabled,
24722
- refetchInterval: params.query?.refetchInterval ?? 3e3
24704
+ queryFn: () => symmCoreClient.positions.getOpen({
24705
+ accountAddress,
24706
+ address: resolvedAddress,
24707
+ chainId
24708
+ }),
24709
+ enabled
24723
24710
  });
24724
24711
  }
24725
24712
  function useSymmOpenOrders(params) {
@@ -24949,11 +24936,10 @@ function useSymmMarkets(params) {
24949
24936
  ...params?.query,
24950
24937
  queryKey: symmKeys.markets(chainId, searchText),
24951
24938
  queryFn: () => {
24952
- const marketsApi = symmCoreClient.markets;
24953
24939
  if (searchText) {
24954
- return marketsApi.search(searchText, chainId);
24940
+ return symmCoreClient.markets.search(searchText, { chainId });
24955
24941
  }
24956
- return marketsApi.list({ pageSize: "500", chainId });
24942
+ return symmCoreClient.markets.list({ pageSize: "1000", chainId });
24957
24943
  },
24958
24944
  enabled: internalEnabled && (params?.query?.enabled ?? true)
24959
24945
  });