@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 +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
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.
|
|
31
|
+
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "1.1.4-alpha.8";
|
|
32
32
|
}
|
|
33
|
-
var version_default = "1.1.4-alpha.
|
|
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
|
});
|