@orderly.network/ui-tpsl 2.8.13-rc.0 → 2.8.14-alpha.0
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 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SDKError, PositionType, AlgoOrderRootType, OrderType, OrderSide, OrderStatus, AlgoOrderType } from '@orderly.network/types';
|
|
2
2
|
import { Flex, Input, inputFormatter, cn, Slider, Text, registerSimpleSheet, registerSimpleDialog, useScreen, ScrollArea, DotStatus, Grid, Button, ThrottledButton, Divider, Box, toast, TokenIcon, modal, Tooltip, ExclamationFillIcon, Select, ChevronDownIcon, Badge, textVariants, Checkbox, SimpleDropdownMenu, CaretDownIcon, useModal } from '@orderly.network/ui';
|
|
3
3
|
import { memo, useRef, useState, useEffect, createContext, useMemo, useContext, Fragment as Fragment$1 } from 'react';
|
|
4
|
-
import { utils, useSymbolsInfo, useAccount, useEventEmitter, useLocalStorage, usePositionStream, useEstLiqPriceBySymbol, useTPSLOrder, useTpslPriceChecker, ERROR_MSG_CODES, useMemoizedFn, useOrderEntry, useOrderStream, useSubAccountAlgoOrderStream, findPositionTPSLFromOrders, useMutation, useMarkPrice, useIndexPrice, useLeverageBySymbol, useMaxQty, findTPSLFromOrder, findTPSLOrderPriceFromOrder } from '@orderly.network/hooks';
|
|
4
|
+
import { utils, useSymbolsInfo, useAccount, useEventEmitter, useLocalStorage, usePositionStream, useEstLiqPriceBySymbol, useTPSLOrder, useTpslPriceChecker, ERROR_MSG_CODES, useMemoizedFn, useOrderEntry, useGetEstLiqPrice, useOrderStream, useSubAccountAlgoOrderStream, findPositionTPSLFromOrders, useMutation, useMarkPrice, useIndexPrice, useLeverageBySymbol, useMaxQty, findTPSLFromOrder, findTPSLOrderPriceFromOrder } from '@orderly.network/hooks';
|
|
5
5
|
import { useTranslation, i18n, Trans } from '@orderly.network/i18n';
|
|
6
6
|
import { useOrderEntryFormErrorMsg } from '@orderly.network/react-app';
|
|
7
7
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
@@ -1622,6 +1622,11 @@ var TPSLAdvancedUI = (props) => {
|
|
|
1622
1622
|
const { getErrorMsg } = useOrderEntryFormErrorMsg(props.slPriceError);
|
|
1623
1623
|
const isSlPriceWarning = props.slPriceError?.sl_trigger_price?.type === ERROR_MSG_CODES.SL_PRICE_WARNING;
|
|
1624
1624
|
const isSlPriceError = props.slPriceError?.sl_trigger_price?.type === ERROR_MSG_CODES.SL_PRICE_ERROR;
|
|
1625
|
+
const displayEstLiqPrice = useGetEstLiqPrice({
|
|
1626
|
+
estLiqPrice: props.estLiqPrice,
|
|
1627
|
+
symbol: props.symbolInfo.symbol,
|
|
1628
|
+
side: props.formattedOrder.side
|
|
1629
|
+
});
|
|
1625
1630
|
const {
|
|
1626
1631
|
formattedOrder,
|
|
1627
1632
|
setValue: setOrderValue,
|
|
@@ -1696,7 +1701,7 @@ var TPSLAdvancedUI = (props) => {
|
|
|
1696
1701
|
order: formattedOrder,
|
|
1697
1702
|
baseDP: symbolInfo.base_dp,
|
|
1698
1703
|
quoteDP: symbolInfo.quote_dp,
|
|
1699
|
-
estLiqPrice:
|
|
1704
|
+
estLiqPrice: displayEstLiqPrice ?? void 0,
|
|
1700
1705
|
symbolLeverage: props.symbolLeverage
|
|
1701
1706
|
}
|
|
1702
1707
|
) }),
|
|
@@ -1924,6 +1929,7 @@ var useTPSLAdvanced = (props) => {
|
|
|
1924
1929
|
symbolInfo,
|
|
1925
1930
|
slPriceError,
|
|
1926
1931
|
estLiqPrice: state.estLiqPrice,
|
|
1932
|
+
estLiqPriceDistance: state.estLiqPriceDistance,
|
|
1927
1933
|
setValue,
|
|
1928
1934
|
setValues,
|
|
1929
1935
|
onSubmit,
|