@orderly.network/hooks 3.0.0-beta.0 → 3.0.0-beta.1
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 +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
package/dist/index.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import useSWR5__default, { mutate } from 'swr';
|
|
|
4
4
|
import * as useSWR5 from 'swr';
|
|
5
5
|
export { useSWR5 as swr };
|
|
6
6
|
export { unstable_serialize, default as useSWR, useSWRConfig } from 'swr';
|
|
7
|
-
import { TesnetTokenFallback, ArbitrumSepoliaTokenInfo, SolanaDevnetTokenInfo, OrderType, OrderSide, MarginMode, SDKError, TrackerEventName, AccountStatusEnum, AlgoOrderType, AlgoOrderRootType, OrderStatus, ArbitrumSepoliaChainInfo, SolanaDevnetChainInfo, EMPTY_LIST, EMPTY_OBJECT, isNativeTokenChecker, nativeTokenAddress, ChainKey, chainsInfoMap, ARBITRUM_TESTNET_CHAINID, ARBITRUM_MAINNET_CHAINID, ChainNamespace, MaxUint256, DEPOSIT_FEE_RATE, ETHEREUM_MAINNET_CHAINID, LedgerWalletKey, SOLANA_TESTNET_CHAINID, MONAD_TESTNET_CHAINID, ABSTRACT_TESTNET_CHAINID, BSC_TESTNET_CHAINID, SolanaChains, PositionType, DistributionType, TriggerPriceType } from '@orderly.network/types';
|
|
8
7
|
import { usePluginScope } from '@orderly.network/plugin-core';
|
|
8
|
+
import { TesnetTokenFallback, ArbitrumSepoliaTokenInfo, SolanaDevnetTokenInfo, OrderType, OrderSide, MarginMode, SDKError, TrackerEventName, AccountStatusEnum, AlgoOrderType, AlgoOrderRootType, OrderStatus, ArbitrumSepoliaChainInfo, SolanaDevnetChainInfo, EMPTY_LIST, EMPTY_OBJECT, isNativeTokenChecker, nativeTokenAddress, ChainKey, chainsInfoMap, ARBITRUM_TESTNET_CHAINID, ARBITRUM_MAINNET_CHAINID, ChainNamespace, MaxUint256, DEPOSIT_FEE_RATE, ETHEREUM_MAINNET_CHAINID, LedgerWalletKey, SOLANA_TESTNET_CHAINID, MONAD_TESTNET_CHAINID, ABSTRACT_TESTNET_CHAINID, BSC_TESTNET_CHAINID, SolanaChains, PositionType, DistributionType, TriggerPriceType } from '@orderly.network/types';
|
|
9
9
|
import { zero, windowGuard, getTimestamp, getGlobalObject, Decimal, timeConvertString, isTestnet, getPrecisionByNumber, getBBOType, camelCaseToUnderscoreCase, commify, todpIfNeed, getTPSLDirection } from '@orderly.network/utils';
|
|
10
10
|
import useSWRMutation from 'swr/mutation';
|
|
11
11
|
import useConstant from 'use-constant';
|
|
@@ -39,9 +39,9 @@ var __export = (target, all) => {
|
|
|
39
39
|
// src/version.ts
|
|
40
40
|
if (typeof window !== "undefined") {
|
|
41
41
|
window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
|
|
42
|
-
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "3.0.0-beta.
|
|
42
|
+
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "3.0.0-beta.1";
|
|
43
43
|
}
|
|
44
|
-
var version_default = "3.0.0-beta.
|
|
44
|
+
var version_default = "3.0.0-beta.1";
|
|
45
45
|
var fetcher = (url, init2 = {}, queryOptions) => get(url, init2, queryOptions?.formatter);
|
|
46
46
|
var noCacheConfig = {
|
|
47
47
|
dedupingInterval: 0,
|
|
@@ -72,6 +72,8 @@ function useConfig(key, defaultValue) {
|
|
|
72
72
|
}
|
|
73
73
|
return configStore;
|
|
74
74
|
}
|
|
75
|
+
|
|
76
|
+
// src/useQuery.ts
|
|
75
77
|
var PLUGIN_ID_HEADER = "X-Orderly-Plugin-Id";
|
|
76
78
|
var useQuery = (query, options) => {
|
|
77
79
|
const apiBaseUrl = useConfig("apiBaseUrl");
|