@orderly.network/hooks 2.0.4 → 2.0.5
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 +6 -10
- package/dist/index.d.ts +6 -10
- package/dist/index.js +18 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +20 -27
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
package/dist/index.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ import { WS } from '@orderly.network/net';
|
|
|
14
14
|
import * as react from 'react';
|
|
15
15
|
import { PropsWithChildren, FC } from 'react';
|
|
16
16
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
17
|
+
import { SolanaWalletProvider } from '@orderly.network/default-solana-adapter';
|
|
17
18
|
import { EIP1193Provider } from '@web3-onboard/common';
|
|
18
19
|
import * as swr_subscription from 'swr/subscription';
|
|
19
20
|
import * as _orderly_network_utils from '@orderly.network/utils';
|
|
@@ -28,7 +29,7 @@ declare global {
|
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
declare const _default: "2.0.
|
|
32
|
+
declare const _default: "2.0.5";
|
|
32
33
|
|
|
33
34
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
34
35
|
formatter?: (data: any) => T;
|
|
@@ -228,7 +229,7 @@ type WalletAccount = {
|
|
|
228
229
|
interface WalletState {
|
|
229
230
|
label: string;
|
|
230
231
|
icon: string;
|
|
231
|
-
provider: EIP1193Provider |
|
|
232
|
+
provider: EIP1193Provider | SolanaWalletProvider;
|
|
232
233
|
accounts: WalletAccount[];
|
|
233
234
|
chains: ConnectedChain[];
|
|
234
235
|
instance?: unknown;
|
|
@@ -669,8 +670,8 @@ declare const useDeposit: (options?: useDepositOptions) => {
|
|
|
669
670
|
symbol: string;
|
|
670
671
|
address: string | undefined;
|
|
671
672
|
decimals: number | undefined;
|
|
672
|
-
chainId: number;
|
|
673
|
-
network: string;
|
|
673
|
+
chainId: number | undefined;
|
|
674
|
+
network: string | undefined;
|
|
674
675
|
};
|
|
675
676
|
balance: string;
|
|
676
677
|
allowance: string;
|
|
@@ -888,11 +889,6 @@ type PositionActions = {
|
|
|
888
889
|
};
|
|
889
890
|
declare const usePositionActions: () => PositionActions;
|
|
890
891
|
|
|
891
|
-
declare const useStorageLedgerAddress: () => {
|
|
892
|
-
setLedgerAddress: (address: string) => void;
|
|
893
|
-
ledgerWallet: any;
|
|
894
|
-
};
|
|
895
|
-
|
|
896
892
|
type UseOrderEntryOptions = {
|
|
897
893
|
commify?: boolean;
|
|
898
894
|
watchOrderbook?: boolean;
|
|
@@ -1724,4 +1720,4 @@ interface IRestrictedAreasParams {
|
|
|
1724
1720
|
}
|
|
1725
1721
|
declare const useRestrictedAreas: (params: IRestrictedAreasParams) => RestrictedAreasReturns;
|
|
1726
1722
|
|
|
1727
|
-
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, AssetHistoryStatusEnum, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type IRestrictedAreasParams, MarketsStorageKey, MarketsType, type NewListing, type OrderBookItem, type OrderParams, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, OrderlyTrackerProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedAreasReturns, ScopeType, StatusContext, type StatusContextState, StatusProvider, type SymbolInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, type filteredChains$1 as filteredChains, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useBoolean, useChain, useChains, useCheckReferralCode, useCollateral, useCommission, useConfig, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useKeyStore, useLazyQuery, useLeverage, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxQty, useMediaQuery, useMutation, useNetworkInfo, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, usePositionActions, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedAreas, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily,
|
|
1723
|
+
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, AssetHistoryStatusEnum, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type IRestrictedAreasParams, MarketsStorageKey, MarketsType, type NewListing, type OrderBookItem, type OrderParams, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, OrderlyTrackerProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedAreasReturns, ScopeType, StatusContext, type StatusContextState, StatusProvider, type SymbolInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, type filteredChains$1 as filteredChains, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useBoolean, useChain, useChains, useCheckReferralCode, useCollateral, useCommission, useConfig, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useKeyStore, useLazyQuery, useLeverage, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxQty, useMediaQuery, useMutation, useNetworkInfo, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, usePositionActions, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedAreas, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily, useSymbolLeverage, useSymbolPriceRange, useSymbolsInfo, useTPSLOrder, useTickerStream, useWS, useWalletConnector, useWalletRewardsHistory, useWalletSubscription, useWithdraw, useWsStatus, index as utils, _default as version };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { WS } from '@orderly.network/net';
|
|
|
14
14
|
import * as react from 'react';
|
|
15
15
|
import { PropsWithChildren, FC } from 'react';
|
|
16
16
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
17
|
+
import { SolanaWalletProvider } from '@orderly.network/default-solana-adapter';
|
|
17
18
|
import { EIP1193Provider } from '@web3-onboard/common';
|
|
18
19
|
import * as swr_subscription from 'swr/subscription';
|
|
19
20
|
import * as _orderly_network_utils from '@orderly.network/utils';
|
|
@@ -28,7 +29,7 @@ declare global {
|
|
|
28
29
|
};
|
|
29
30
|
}
|
|
30
31
|
}
|
|
31
|
-
declare const _default: "2.0.
|
|
32
|
+
declare const _default: "2.0.5";
|
|
32
33
|
|
|
33
34
|
type useQueryOptions<T> = SWRConfiguration & {
|
|
34
35
|
formatter?: (data: any) => T;
|
|
@@ -228,7 +229,7 @@ type WalletAccount = {
|
|
|
228
229
|
interface WalletState {
|
|
229
230
|
label: string;
|
|
230
231
|
icon: string;
|
|
231
|
-
provider: EIP1193Provider |
|
|
232
|
+
provider: EIP1193Provider | SolanaWalletProvider;
|
|
232
233
|
accounts: WalletAccount[];
|
|
233
234
|
chains: ConnectedChain[];
|
|
234
235
|
instance?: unknown;
|
|
@@ -669,8 +670,8 @@ declare const useDeposit: (options?: useDepositOptions) => {
|
|
|
669
670
|
symbol: string;
|
|
670
671
|
address: string | undefined;
|
|
671
672
|
decimals: number | undefined;
|
|
672
|
-
chainId: number;
|
|
673
|
-
network: string;
|
|
673
|
+
chainId: number | undefined;
|
|
674
|
+
network: string | undefined;
|
|
674
675
|
};
|
|
675
676
|
balance: string;
|
|
676
677
|
allowance: string;
|
|
@@ -888,11 +889,6 @@ type PositionActions = {
|
|
|
888
889
|
};
|
|
889
890
|
declare const usePositionActions: () => PositionActions;
|
|
890
891
|
|
|
891
|
-
declare const useStorageLedgerAddress: () => {
|
|
892
|
-
setLedgerAddress: (address: string) => void;
|
|
893
|
-
ledgerWallet: any;
|
|
894
|
-
};
|
|
895
|
-
|
|
896
892
|
type UseOrderEntryOptions = {
|
|
897
893
|
commify?: boolean;
|
|
898
894
|
watchOrderbook?: boolean;
|
|
@@ -1724,4 +1720,4 @@ interface IRestrictedAreasParams {
|
|
|
1724
1720
|
}
|
|
1725
1721
|
declare const useRestrictedAreas: (params: IRestrictedAreasParams) => RestrictedAreasReturns;
|
|
1726
1722
|
|
|
1727
|
-
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, AssetHistoryStatusEnum, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type IRestrictedAreasParams, MarketsStorageKey, MarketsType, type NewListing, type OrderBookItem, type OrderParams, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, OrderlyTrackerProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedAreasReturns, ScopeType, StatusContext, type StatusContextState, StatusProvider, type SymbolInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, type filteredChains$1 as filteredChains, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useBoolean, useChain, useChains, useCheckReferralCode, useCollateral, useCommission, useConfig, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useKeyStore, useLazyQuery, useLeverage, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxQty, useMediaQuery, useMutation, useNetworkInfo, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, usePositionActions, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedAreas, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily,
|
|
1723
|
+
export { type APIKeyItem, type AccountRewardsHistory, type AccountRewardsHistoryRow, AssetHistoryStatusEnum, type Brokers, type Chain, type Chains, type CheckReferralCodeReturns, type CollateralOutputs, type ComputedAlgoOrder, type ConfigProviderProps, type ConnectedChain, type CurrentEpochEstimate, DefaultLayoutConfig, DistributionId, type DrawOptions, ENVType, type EpochInfoItem, type EpochInfoType, type ExclusiveConfigProviderProps, ExtendedConfigStore, type Favorite, type FavoriteTab, type IRestrictedAreasParams, MarketsStorageKey, MarketsType, type NewListing, type OrderBookItem, type OrderParams, type OrderbookData, type OrderbookOptions, type OrderlyConfigContextState, OrderlyConfigProvider, OrderlyContext, OrderlyProvider, OrderlyTrackerProvider, type PosterLayoutConfig, type PriceMode, type Recent, RefferalAPI, type RestrictedAreasReturns, ScopeType, StatusContext, type StatusContextState, StatusProvider, type SymbolInfo, TWType, type UseChainsOptions, type UseChainsReturnObject, type UseOrderEntryMetaState, WalletConnectorContext, type WalletRewards, type WalletRewardsHistoryReturns, type WalletRewardsItem, type WalletState, WsNetworkStatus, type chainFilter, type chainFilterFunc, checkNotional, cleanStringStyle, type filteredChains$1 as filteredChains, parseJSON, useAccount, useAccountInfo, useAccountInstance, useAccountRewardsHistory, useAllBrokers, useApiKeyManager, useAssetsHistory, useBoolean, useChain, useChains, useCheckReferralCode, useCollateral, useCommission, useConfig, useCurEpochEstimate, useDaily, useDeposit, useDistribution, useDistributionHistory, useEpochInfo, useEventEmitter, useFundingFeeHistory, useFundingRate, useFundingRateHistory, useFundingRates, useGetClaimed, useGetEnv, useGetReferralCode, useHoldingStream, useIndexPrice, useKeyStore, useLazyQuery, useLeverage, useLocalStorage, useMaintenanceStatus, useMarginRatio, useMarkPrice, useMarkPriceBySymbol, useMarkPricesStream, useMarket, useMarketTradeStream, useMarkets, useMarketsStore, useMarketsStream, useMaxQty, useMediaQuery, useMutation, useNetworkInfo, useOrderEntity, useOrderEntry, useOrderEntry$1 as useOrderEntry_deprecated, useOrderStore, useOrderStream, useOrderbookStream, usePositionActions, usePositionStream, usePoster, usePreLoadData, usePrivateDataObserver, usePrivateInfiniteQuery, usePrivateQuery, useQuery, useRefereeHistory, useRefereeInfo, useRefereeRebateSummary, useReferralInfo, useReferralRebateSummary, useRestrictedAreas, useSessionStorage, useSettleSubscription, useSimpleDI, useStatisticsDaily, useSymbolLeverage, useSymbolPriceRange, useSymbolsInfo, useTPSLOrder, useTickerStream, useWS, useWalletConnector, useWalletRewardsHistory, useWalletSubscription, useWithdraw, useWsStatus, index as utils, _default as version };
|
package/dist/index.js
CHANGED
|
@@ -60,9 +60,9 @@ var __export = (target, all) => {
|
|
|
60
60
|
// src/version.ts
|
|
61
61
|
if (typeof window !== "undefined") {
|
|
62
62
|
window.__ORDERLY_VERSION__ = window.__ORDERLY_VERSION__ || {};
|
|
63
|
-
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.0.
|
|
63
|
+
window.__ORDERLY_VERSION__["@orderly.network/hooks"] = "2.0.5";
|
|
64
64
|
}
|
|
65
|
-
var version_default = "2.0.
|
|
65
|
+
var version_default = "2.0.5";
|
|
66
66
|
var fetcher = (url, init2 = {}, queryOptions) => net.get(url, init2, queryOptions?.formatter);
|
|
67
67
|
var OrderlyContext = React.createContext({
|
|
68
68
|
// configStore: new MemoryConfigStore(),
|
|
@@ -3742,7 +3742,7 @@ var useMarginRatio = () => {
|
|
|
3742
3742
|
}, [rows, notional]);
|
|
3743
3743
|
return { marginRatio, currentLeverage, mmr };
|
|
3744
3744
|
};
|
|
3745
|
-
var TestNetWhiteList = [421614, 901901901];
|
|
3745
|
+
var TestNetWhiteList = [421614, 901901901, types.MONAD_TESTNET_CHAINID];
|
|
3746
3746
|
function useChains(networkId, options = {}) {
|
|
3747
3747
|
const { pick: pickField, ...swrOptions } = options;
|
|
3748
3748
|
const {
|
|
@@ -4129,9 +4129,6 @@ var useDeposit = (options) => {
|
|
|
4129
4129
|
return chain;
|
|
4130
4130
|
}, [networkId, findByChainId, options?.srcChainId]);
|
|
4131
4131
|
const dst = React.useMemo(() => {
|
|
4132
|
-
if (!targetChain) {
|
|
4133
|
-
throw new Error("dst chain not found");
|
|
4134
|
-
}
|
|
4135
4132
|
const USDC = targetChain?.token_infos.find(
|
|
4136
4133
|
(token) => token.symbol === "USDC"
|
|
4137
4134
|
);
|
|
@@ -4139,8 +4136,8 @@ var useDeposit = (options) => {
|
|
|
4139
4136
|
symbol: "USDC",
|
|
4140
4137
|
address: USDC?.address,
|
|
4141
4138
|
decimals: USDC?.decimals,
|
|
4142
|
-
chainId: targetChain
|
|
4143
|
-
network: targetChain
|
|
4139
|
+
chainId: targetChain?.network_infos?.chain_id,
|
|
4140
|
+
network: targetChain?.network_infos?.shortName
|
|
4144
4141
|
};
|
|
4145
4142
|
}, [targetChain]);
|
|
4146
4143
|
const isNativeToken = React.useMemo(
|
|
@@ -6171,19 +6168,6 @@ function useMaintenanceStatus() {
|
|
|
6171
6168
|
endTime
|
|
6172
6169
|
};
|
|
6173
6170
|
}
|
|
6174
|
-
var useStorageLedgerAddress = () => {
|
|
6175
|
-
const [ledgerWallet, setLedgerWallet] = useLocalStorage(types.LedgerWalletKey, []);
|
|
6176
|
-
const setLedgerAddress = (address) => {
|
|
6177
|
-
if (!ledgerWallet.includes(address)) {
|
|
6178
|
-
const arr = [...ledgerWallet, address];
|
|
6179
|
-
setLedgerWallet(arr);
|
|
6180
|
-
}
|
|
6181
|
-
};
|
|
6182
|
-
return {
|
|
6183
|
-
setLedgerAddress,
|
|
6184
|
-
ledgerWallet
|
|
6185
|
-
};
|
|
6186
|
-
};
|
|
6187
6171
|
var usePrivateDataObserver = (options) => {
|
|
6188
6172
|
const ws = useWS();
|
|
6189
6173
|
const ee = useEventEmitter();
|
|
@@ -6343,7 +6327,7 @@ var usePrivateDataObserver = (options) => {
|
|
|
6343
6327
|
if (itemIndex >= 0) {
|
|
6344
6328
|
const itemArr = nextPositions.splice(itemIndex, 1);
|
|
6345
6329
|
const item = itemArr[0];
|
|
6346
|
-
if (item.averageOpenPrice === 0) {
|
|
6330
|
+
if (item.averageOpenPrice === 0 && item.positionQty !== 0) {
|
|
6347
6331
|
return row;
|
|
6348
6332
|
}
|
|
6349
6333
|
return object2underscore(item);
|
|
@@ -14274,7 +14258,11 @@ var useOrderEntry2 = (symbol, options = {}) => {
|
|
|
14274
14258
|
const markPrice2 = actions.getMarkPriceBySymbol(symbol);
|
|
14275
14259
|
if (!markPrice2 || !accountInfo)
|
|
14276
14260
|
return null;
|
|
14277
|
-
|
|
14261
|
+
const orderQuantity = Number(formattedOrder.order_quantity);
|
|
14262
|
+
if (orderQuantity === 0 || orderQuantity > maxQty) {
|
|
14263
|
+
return null;
|
|
14264
|
+
}
|
|
14265
|
+
const estLiqPrice2 = calcEstLiqPrice(formattedOrder, askAndBid.current[0], {
|
|
14278
14266
|
baseIMR: symbolInfo?.base_imr,
|
|
14279
14267
|
baseMMR: symbolInfo?.base_mmr,
|
|
14280
14268
|
markPrice: markPrice2,
|
|
@@ -14284,14 +14272,19 @@ var useOrderEntry2 = (symbol, options = {}) => {
|
|
|
14284
14272
|
symbol,
|
|
14285
14273
|
positions: positions2
|
|
14286
14274
|
});
|
|
14287
|
-
|
|
14275
|
+
return estLiqPrice2;
|
|
14276
|
+
}, [formattedOrder, accountInfo, positions2, totalCollateral, symbol, maxQty]);
|
|
14288
14277
|
const estLeverage = React.useMemo(() => {
|
|
14278
|
+
const orderQuantity = Number(formattedOrder.order_quantity);
|
|
14279
|
+
if (orderQuantity === 0 || orderQuantity > maxQty) {
|
|
14280
|
+
return null;
|
|
14281
|
+
}
|
|
14289
14282
|
return calcEstLeverage(formattedOrder, askAndBid.current[0], {
|
|
14290
14283
|
totalCollateral,
|
|
14291
14284
|
positions: positions2,
|
|
14292
14285
|
symbol
|
|
14293
14286
|
});
|
|
14294
|
-
}, [formattedOrder, accountInfo, positions2, totalCollateral, symbol]);
|
|
14287
|
+
}, [formattedOrder, accountInfo, positions2, totalCollateral, symbol, maxQty]);
|
|
14295
14288
|
const resetErrors = () => {
|
|
14296
14289
|
setMeta(
|
|
14297
14290
|
immer$1.produce((draft) => {
|
|
@@ -14689,7 +14682,6 @@ exports.useSessionStorage = useSessionStorage;
|
|
|
14689
14682
|
exports.useSettleSubscription = useSettleSubscription;
|
|
14690
14683
|
exports.useSimpleDI = useSimpleDI;
|
|
14691
14684
|
exports.useStatisticsDaily = useStatisticsDaily;
|
|
14692
|
-
exports.useStorageLedgerAddress = useStorageLedgerAddress;
|
|
14693
14685
|
exports.useSymbolLeverage = useSymbolLeverage;
|
|
14694
14686
|
exports.useSymbolPriceRange = useSymbolPriceRange;
|
|
14695
14687
|
exports.useSymbolsInfo = useSymbolsInfo;
|