@orderly.network/hooks 1.1.4-alpha.7 → 1.1.4-alpha.8

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/index.d.mts CHANGED
@@ -25,7 +25,7 @@ declare global {
25
25
  };
26
26
  }
27
27
  }
28
- declare const _default: "1.1.4-alpha.7";
28
+ declare const _default: "1.1.4-alpha.8";
29
29
 
30
30
  type useQueryOptions<T> = SWRConfiguration & {
31
31
  formatter?: (data: any) => T;
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ declare global {
25
25
  };
26
26
  }
27
27
  }
28
- declare const _default: "1.1.4-alpha.7";
28
+ declare const _default: "1.1.4-alpha.8";
29
29
 
30
30
  type useQueryOptions<T> = SWRConfiguration & {
31
31
  formatter?: (data: any) => T;
package/dist/index.js CHANGED
@@ -28,9 +28,9 @@ var useSWRSubscription__default = /*#__PURE__*/_interopDefault(useSWRSubscriptio
28
28
  // src/version.ts
29
29
  if (typeof window !== "undefined") {
30
30
  window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
31
- window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "1.1.4-alpha.7";
31
+ window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "1.1.4-alpha.8";
32
32
  }
33
- var version_default = "1.1.4-alpha.7";
33
+ var version_default = "1.1.4-alpha.8";
34
34
  var fetcher = (url, init = {}, queryOptions) => net.get(url, init, queryOptions?.formatter);
35
35
  var OrderlyContext = React.createContext({
36
36
  // configStore: new MemoryConfigStore(),
@@ -447,7 +447,7 @@ var useWS = () => {
447
447
  if (nextState.status === types.AccountStatusEnum.EnableTrading && nextState.accountId) {
448
448
  websocketClient.openPrivate(nextState.accountId);
449
449
  } else {
450
- websocketClient.closePrivate();
450
+ websocketClient.closePrivate(1e3, "switch account");
451
451
  }
452
452
  });
453
453
  if (typeof window !== "undefined") {
@@ -4192,6 +4192,7 @@ var useChains = (networkId, options = {}) => {
4192
4192
  const chains = React.useMemo(() => {
4193
4193
  let orderlyChainsArr = [];
4194
4194
  const orderlyChainIds = /* @__PURE__ */ new Set();
4195
+ let testnetArr = [...types.TestnetChains];
4195
4196
  orderlyChains?.forEach((item) => {
4196
4197
  item.chain_details.forEach((chain) => {
4197
4198
  const chainId = Number(chain.chain_id);
@@ -4230,7 +4231,6 @@ var useChains = (networkId, options = {}) => {
4230
4231
  orderlyChainsArr.push(_chain);
4231
4232
  });
4232
4233
  });
4233
- let testnetArr = [...types.TestnetChains];
4234
4234
  testnetArr.forEach((chain) => {
4235
4235
  map.current.set(chain.network_infos?.chain_id, chain);
4236
4236
  });