@kodiak-finance/orderly-ui-positions 2.8.20 → 2.8.21-beta.3

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.mjs CHANGED
@@ -1,10 +1,10 @@
1
- import { registerSimpleDialog, useModal, SimpleDialog, usePagination, Flex, TableFeatures, ListView, Badge, formatAddress, DataFilter, Text, cn, Grid, Button, toast, Divider, useScreen, Box, Tooltip, HoverCard, CloseIcon, ThrottledButton, ArrowDownShortIcon, ArrowUpShortIcon, ArrowLeftRightIcon, modal, SimpleSheet, ShareIcon, EditIcon, Input, inputFormatter, Select, PopoverRoot, PopoverTrigger, PopoverContent, Statistic, capitalizeFirstLetter, Slider, DataTable, ExclamationFillIcon } from '@kodiak-finance/orderly-ui';
1
+ import { registerSimpleDialog, useModal, SimpleDialog, usePagination, Flex, TableFeatures, ListView, Badge, formatAddress, DataFilter, Text, cn, Grid, Button, toast, Divider, useScreen, Box, Tooltip, HoverCard, CloseIcon, ThrottledButton, ArrowDownShortIcon, ArrowUpShortIcon, SimpleSheet, ArrowLeftRightIcon, modal, ShareIcon, EditIcon, Statistic, Input, inputFormatter, Select, PopoverRoot, PopoverTrigger, PopoverContent, capitalizeFirstLetter, DataTable, ExclamationFillIcon, Slider } from '@kodiak-finance/orderly-ui';
2
2
  import React3, { createContext, forwardRef, useMemo, useEffect, useState, useCallback, useRef, useContext } from 'react';
3
3
  import { i18n, useTranslation } from '@kodiak-finance/orderly-i18n';
4
4
  import { AccountStatusEnum, OrderSide, OrderType, PositionType, AlgoOrderType, EMPTY_LIST, TrackerEventName } from '@kodiak-finance/orderly-types';
5
5
  import { commifyOptional, Decimal, getTimestamp, formatNum, commify } from '@kodiak-finance/orderly-utils';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
- import { usePositionStream, useSymbolsInfo, useAccount, usePrivateQuery, useMarkPrice, useMaxQty, useSubAccountMutation, useLocalStorage, useSessionStorage, usePositionClose, useSWR, fetcher, usePrivateInfiniteQuery, useGetRwaSymbolOpenStatus, useTpslPriceChecker, useConfig, useBoolean, useLeverageBySymbol, useReferralInfo, useAccountInfo, utils, useMaxLeverage, useTrack } from '@kodiak-finance/orderly-hooks';
7
+ import { usePositionStream, useSymbolsInfo, useAccount, usePrivateQuery, useMarkPrice, useMaxQty, useSubAccountMutation, useLocalStorage, useSessionStorage, usePositionClose, useSWR, fetcher, usePrivateInfiniteQuery, useGetRwaSymbolOpenStatus, useTpslPriceChecker, useBoolean, useConfig, useLeverageBySymbol, useReferralInfo, useAccountInfo, utils, useMaxLeverage, useTrack } from '@kodiak-finance/orderly-hooks';
8
8
  import { produce } from 'immer';
9
9
  import { positions, account } from '@kodiak-finance/orderly-perp';
10
10
  import { useDataTap, useOrderEntryFormErrorMsg } from '@kodiak-finance/orderly-react-app';
@@ -1055,7 +1055,7 @@ var useReversePositionEnabled = () => {
1055
1055
  );
1056
1056
  const [mobileEnabled, setMobileEnabled] = useLocalStorage(
1057
1057
  "orderly_reverse_position_enabled_mobile",
1058
- false
1058
+ true
1059
1059
  );
1060
1060
  const isEnabled = useMemo(() => {
1061
1061
  if (isMobile) {
@@ -2600,7 +2600,7 @@ var useColumn = (config) => {
2600
2600
  positionReverse
2601
2601
  } = config;
2602
2602
  const { t } = useTranslation();
2603
- useRef(Date.now().toString());
2603
+ const fundingFeeEndTime = useRef(Date.now().toString());
2604
2604
  const column = useMemo(
2605
2605
  () => [
2606
2606
  {
@@ -2837,19 +2837,20 @@ var useColumn = (config) => {
2837
2837
  rule: "price",
2838
2838
  render: (value) => /* @__PURE__ */ jsx(Text.numeral, { children: value })
2839
2839
  },
2840
- // {
2841
- // title: t("funding.fundingFee"),
2842
- // dataIndex: "fundingFee",
2843
- // width: 100,
2844
- // render: (value, record) => (
2845
- // <FundingFeeButton
2846
- // fee={value}
2847
- // symbol={record.symbol}
2848
- // start_t={record.timestamp.toString()}
2849
- // end_t={fundingFeeEndTime.current}
2850
- // />
2851
- // ),
2852
- // },
2840
+ {
2841
+ title: t("funding.fundingFee"),
2842
+ dataIndex: "fundingFee",
2843
+ width: 100,
2844
+ render: (value, record) => /* @__PURE__ */ jsx(
2845
+ FundingFeeButton,
2846
+ {
2847
+ fee: value,
2848
+ symbol: record.symbol,
2849
+ start_t: record.timestamp.toString(),
2850
+ end_t: fundingFeeEndTime.current
2851
+ }
2852
+ )
2853
+ },
2853
2854
  // {
2854
2855
  // title: t("common.qty"),
2855
2856
  // dataIndex: "close_qty",