@orderly.network/trading 3.0.0-beta.0 → 3.0.0-beta.2

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,17 +1,17 @@
1
- import { useGetRwaSymbolOpenStatus, useLocalStorage, useGetRwaSymbolCloseTimeInterval, usePositionStream, useOrderStream, useAccount, useFundingDetails, useFundingRateBySymbol, useFundingRate, useSymbolsInfo, useOrderbookStream, useEventEmitter, useCollateral, useMarginRatio, useLeverage, useDebouncedCallback, useMediaQuery, useAssetsHistory, useGetRwaSymbolInfo, useWalletConnector, useConfig, useMutation, useChains, useReferralInfo, useCurEpochEstimate, TWType, useEpochInfo, useMarketTradeStream, useAccountInstance, useComputedLTV, useTickerStream } from '@orderly.network/hooks';
2
- import React12, { forwardRef, useMemo, createContext, useEffect, useState, useRef, useCallback, useContext, createElement } from 'react';
1
+ import { useAccount, useLocalStorage, useConfig, useWalletConnector, useMutation, useChains, useReferralInfo, useCurEpochEstimate, TWType, useEpochInfo, usePositionStream, useOrderStream, useFundingDetails, useFundingRateBySymbol, useFundingRate, useSymbolsInfo, useOrderbookStream, useEventEmitter, useCollateral, useMarginRatio, useLeverage, useDebouncedCallback, useMediaQuery, useAssetsHistory, useGetRwaSymbolInfo, useBadgeBySymbol, useGetRwaSymbolOpenStatus, useGetRwaSymbolCloseTimeInterval, useMarketTradeStream, useAccountInstance, useComputedLTV, useTickerStream } from '@orderly.network/hooks';
2
+ import React12, { forwardRef, useMemo, createContext, useContext, useState, useCallback, useEffect, useRef, createElement } from 'react';
3
3
  import { useDataTap, useAppContext } from '@orderly.network/react-app';
4
- import { TradingviewFullscreenKey, OrderEntrySortKeys, AlgoOrderRootType, OrderStatus, OrderSide, AccountStatusEnum, AssetHistoryStatusEnum, AssetHistorySideEnum, ChainNamespace, EMPTY_LIST } from '@orderly.network/types';
5
- import { i18n, useTranslation, Trans } from '@orderly.network/i18n';
6
- import { injectable, cn, Button, formatAddress, registerSimpleDialog, registerSimpleSheet, Box, Flex, toast as toast$1, useScreen, ExclamationFillIcon, Text, CloseIcon, TooltipRoot, TooltipTrigger, TooltipContent as TooltipContent$1, TooltipArrow, parseNumber, Divider, ListView, Grid, ArrowDownShortIcon, gradientTextVariants, EyeIcon, EyeCloseIcon, ChevronDownIcon, modal, Tooltip, Tabs, TabPanel, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Statistic, RefreshIcon, ArrowLeftRightIcon, ArrowUpShortIcon, InfoCircleIcon, NewsFillIcon, SimpleSheet, SimpleDialog, ChainIcon, useModal, ArrowRightShortIcon, Switch, Checkbox, Sheet, SheetTrigger, SheetContent, SettingFillIcon, Spinner, PopoverRoot, PopoverTrigger, PopoverContent, Select, Popover, CaretUpIcon, CaretDownIcon, Picker } from '@orderly.network/ui';
4
+ import { AccountStatusEnum, ChainNamespace, AlgoOrderRootType, OrderStatus, OrderSide, AssetHistoryStatusEnum, AssetHistorySideEnum, TradingviewFullscreenKey, OrderEntrySortKeys, EMPTY_LIST } from '@orderly.network/types';
5
+ import { useTranslation, i18n, Trans } from '@orderly.network/i18n';
6
+ import { installExtension, ExtensionPositionEnum, cn, Button, formatAddress, registerSimpleDialog, registerSimpleSheet, modal, useModal, Flex, toast as toast$1, Text, ArrowRightShortIcon, Box, ListView, Grid, ArrowDownShortIcon, gradientTextVariants, EyeIcon, EyeCloseIcon, Divider, ChevronDownIcon, useScreen, Tooltip, Tabs, TabPanel, CloseIcon, DropdownMenuRoot, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, Statistic, RefreshIcon, ArrowLeftRightIcon, ArrowUpShortIcon, InfoCircleIcon, ExtensionSlot, NewsFillIcon, SimpleSheet, SimpleDialog, ChainIcon, ExclamationFillIcon, Switch, Checkbox, Sheet, SheetTrigger, SheetContent, SettingFillIcon, Spinner, PopoverRoot, PopoverTrigger, PopoverContent, Select, Popover, CaretUpIcon, CaretDownIcon, Picker, TooltipRoot, TooltipTrigger, TooltipContent as TooltipContent$1, TooltipArrow, parseNumber } from '@orderly.network/ui';
7
7
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
8
8
  import { PositionHistoryWidget, LiquidationWidget, PositionsWidget, CloseAllPositionsWidget, MobileLiquidationWidget, MobilePositionsWidget, MobilePositionHistoryWidget, useReversePositionEnabled } from '@orderly.network/ui-positions';
9
- import { Decimal, getPrecisionByNumber, commifyOptional, removeTrailingZeros, isTestnet, formatSymbol, optimizeSymbolDisplay } from '@orderly.network/utils';
9
+ import { isTestnet, Decimal, commifyOptional, removeTrailingZeros, formatSymbol, optimizeSymbolDisplay, getPrecisionByNumber } from '@orderly.network/utils';
10
10
  import { AssetsModule } from '@orderly.network/portfolio';
11
11
  import { DesktopOrderListWidget, TabType, MobileOrderListWidget } from '@orderly.network/ui-orders';
12
12
  import { AuthGuard } from '@orderly.network/ui-connector';
13
13
  import { OrderEntryWidget, LTVRiskTooltipWidget } from '@orderly.network/ui-order-entry';
14
- import { DepositStatusWidget, DepositAndWithdrawWithSheetId, TransferSheetId, DepositAndWithdrawWithDialogId, TransferDialogId } from '@orderly.network/ui-transfer';
14
+ import { DepositAndWithdrawWithSheetId, TransferSheetId, DepositStatusWidget, DepositAndWithdrawWithDialogId, TransferDialogId } from '@orderly.network/ui-transfer';
15
15
  import { TradingviewWidget } from '@orderly.network/ui-tradingview';
16
16
  import Split from '@uiw/react-split';
17
17
  import { ScanQRCodeWidget } from '@orderly.network/ui-scaffold';
@@ -20,7 +20,7 @@ import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext, close
20
20
  import { restrictToVerticalAxis } from '@dnd-kit/modifiers';
21
21
  import { sortableKeyboardCoordinates, SortableContext, verticalListSortingStrategy, useSortable, arrayMove } from '@dnd-kit/sortable';
22
22
  import { CSS } from '@dnd-kit/utilities';
23
- import { HorizontalMarketsWidget, SideMarketsWidget, SymbolInfoBarFullWidget, SymbolInfoBarWidget, MarketsSheetWidget } from '@orderly.network/markets';
23
+ import { SymbolInfoBarWidget, SymbolInfoBarRiskNotice, MarketsSheetWidget, HorizontalMarketsWidget, SideMarketsWidget, SymbolInfoBarFullWidget } from '@orderly.network/markets';
24
24
 
25
25
  var __defProp = Object.defineProperty;
26
26
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -2204,7 +2204,7 @@ var init_listBox_desktop = __esm({
2204
2204
  };
2205
2205
  }
2206
2206
  });
2207
- var DesktopAsks, InjectableDesktopAsks;
2207
+ var DesktopAsks;
2208
2208
  var init_asks_desktop = __esm({
2209
2209
  "src/components/desktop/orderBook/asks.desktop.tsx"() {
2210
2210
  init_types();
@@ -2230,13 +2230,9 @@ var init_asks_desktop = __esm({
2230
2230
  }
2231
2231
  );
2232
2232
  };
2233
- InjectableDesktopAsks = injectable(
2234
- DesktopAsks,
2235
- "OrderBook.Desktop.Asks"
2236
- );
2237
2233
  }
2238
2234
  });
2239
- var DesktopBids, InjectableDesktopBids;
2235
+ var DesktopBids;
2240
2236
  var init_bids_desktop = __esm({
2241
2237
  "src/components/desktop/orderBook/bids.desktop.tsx"() {
2242
2238
  init_types();
@@ -2261,10 +2257,6 @@ var init_bids_desktop = __esm({
2261
2257
  }
2262
2258
  );
2263
2259
  };
2264
- InjectableDesktopBids = injectable(
2265
- DesktopBids,
2266
- "OrderBook.Desktop.Bids"
2267
- );
2268
2260
  }
2269
2261
  });
2270
2262
  var BuySellRatioSettings, MoreIcon;
@@ -2799,14 +2791,21 @@ var init_markPrice_desktop = __esm({
2799
2791
  if (bids.length === 0 && asks.length === 0) {
2800
2792
  return 0;
2801
2793
  }
2802
- const bid1 = Number.isNaN(bids[0][0]) ? 0 : bids[0][0];
2803
- const index = asks.reverse().findIndex((item) => !Number.isNaN(item[0]));
2804
- let ask1 = 0;
2794
+ const bidRaw = bids[0]?.[0];
2795
+ const bid1 = bidRaw === void 0 || Number.isNaN(bidRaw) ? new Decimal(0) : new Decimal(bidRaw);
2796
+ const asksReversed = [...asks].reverse();
2797
+ const index = asksReversed.findIndex((item) => !Number.isNaN(item[0]));
2798
+ let ask1 = new Decimal(0);
2805
2799
  if (index !== -1) {
2806
- ask1 = Number.isNaN(asks[index][0]) ? 0 : asks[index][0];
2800
+ const askRaw = asksReversed[index][0];
2801
+ ask1 = Number.isNaN(askRaw) ? new Decimal(0) : new Decimal(askRaw);
2802
+ }
2803
+ const mid = ask1.add(bid1).div(2);
2804
+ if (mid.isZero()) {
2805
+ return 0;
2807
2806
  }
2808
- const dValue = new Decimal(ask1).sub(bid1).div(new Decimal(ask1).add(bid1).div(2));
2809
- return Math.ceil(dValue.toNumber() * 1e6 + 0.1) / 1e4;
2807
+ const dValue = ask1.sub(bid1).div(mid);
2808
+ return dValue.mul(1e6).add(0.1).toDecimalPlaces(0, Decimal.ROUND_CEIL).div(1e4).toNumber();
2810
2809
  }, [asks, bids]);
2811
2810
  return /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(
2812
2811
  Tooltip,
@@ -2921,7 +2920,7 @@ var init_index_desktop = __esm({
2921
2920
  )
2922
2921
  ] }),
2923
2922
  /* @__PURE__ */ jsx(DesktopHeader, { quote, base }),
2924
- /* @__PURE__ */ jsx(InjectableDesktopAsks, { data: [...props.asks] }),
2923
+ /* @__PURE__ */ jsx(DesktopAsks, { data: [...props.asks] }),
2925
2924
  /* @__PURE__ */ jsx(
2926
2925
  DesktopMarkPrice,
2927
2926
  {
@@ -2932,12 +2931,12 @@ var init_index_desktop = __esm({
2932
2931
  symbolInfo: props.symbolInfo
2933
2932
  }
2934
2933
  ),
2935
- /* @__PURE__ */ jsx(InjectableDesktopBids, { data: [...props.bids] }),
2934
+ /* @__PURE__ */ jsx(DesktopBids, { data: [...props.bids] }),
2936
2935
  showBuySellRatio && /* @__PURE__ */ jsx(
2937
2936
  BuySellRatioBar,
2938
2937
  {
2939
2938
  ratio: buySellRatio || null,
2940
- className: "oui-h-[38px] oui-px-3 oui-text-2xs"
2939
+ className: "oui-text-2xs oui-px-3 oui-h-[38px]"
2941
2940
  }
2942
2941
  ),
2943
2942
  isLoading && /* @__PURE__ */ jsx("div", { className: "oui-bg-bg-8/70 oui-absolute oui-inset-0 oui-z-10 oui-flex oui-items-center oui-justify-center", children: /* @__PURE__ */ jsx(Spinner, {}) })
@@ -3868,9 +3867,7 @@ var orderBook_exports = {};
3868
3867
  __export(orderBook_exports, {
3869
3868
  BuySellRatioBar: () => BuySellRatioBar,
3870
3869
  OrderBook: () => OrderBook2,
3871
- OrderBookProvider: () => OrderBookProvider,
3872
3870
  OrderBookWidget: () => OrderBookWidget,
3873
- useOrderBookContext: () => useOrderBookContext,
3874
3871
  useOrderBookScript: () => useOrderBookScript
3875
3872
  });
3876
3873
  var init_orderBook2 = __esm({
@@ -3879,7 +3876,6 @@ var init_orderBook2 = __esm({
3879
3876
  init_orderBook_widget();
3880
3877
  init_orderBook_script();
3881
3878
  init_buySellRatioBar();
3882
- init_orderContext();
3883
3879
  }
3884
3880
  });
3885
3881
  var RiskRate;
@@ -4248,6 +4244,53 @@ var init_orderBookAndTrades = __esm({
4248
4244
  init_orderBookAndTrades_script();
4249
4245
  }
4250
4246
  });
4247
+ var KlineDragIcon, CollapseIcon, ExpandIcon;
4248
+ var init_icons = __esm({
4249
+ "src/components/base/icons.tsx"() {
4250
+ KlineDragIcon = (props) => /* @__PURE__ */ jsx(
4251
+ "svg",
4252
+ {
4253
+ width: "12",
4254
+ height: "12",
4255
+ viewBox: "0 0 12 12",
4256
+ fill: "currentColor",
4257
+ xmlns: "http://www.w3.org/2000/svg",
4258
+ ...props,
4259
+ children: /* @__PURE__ */ jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsx(
4260
+ "path",
4261
+ {
4262
+ id: "Vector",
4263
+ d: "M5.9989 1.00708C5.8709 1.00708 5.7369 1.05008 5.6394 1.14758L3.7959 3.00708L4.4989 3.71008L5.4989 2.72607V4.50708C5.4989 4.78308 5.7229 5.00708 5.9989 5.00708C6.2749 5.00708 6.4989 4.78308 6.4989 4.50708V2.72607L7.4989 3.71008L8.2019 3.00708L6.3584 1.14758C6.2604 1.05008 6.1269 1.00708 5.9989 1.00708ZM5.9989 7.00707C5.7229 7.00707 5.4989 7.23107 5.4989 7.50707V9.28808L4.4989 8.30407L3.7959 9.00707L5.6394 10.8666C5.8349 11.0616 6.1629 11.0616 6.3584 10.8666L8.2019 9.00707L7.4989 8.30407L6.4989 9.28808V7.50707C6.4989 7.23107 6.2749 7.00707 5.9989 7.00707Z"
4264
+ }
4265
+ ) })
4266
+ }
4267
+ );
4268
+ CollapseIcon = (props) => /* @__PURE__ */ jsx(
4269
+ "svg",
4270
+ {
4271
+ width: "16",
4272
+ height: "16",
4273
+ viewBox: "0 0 16 16",
4274
+ fill: "currentColor",
4275
+ xmlns: "http://www.w3.org/2000/svg",
4276
+ ...props,
4277
+ children: /* @__PURE__ */ jsx("path", { d: "M14.668.492a.85.85 0 0 0-.599.234l-3.567 3.568V2.159H8.835v4.167c0 .46.373.833.833.833h4.167V5.492H11.7l3.569-3.567a.86.86 0 0 0 0-1.199.85.85 0 0 0-.6-.234m-12.5 8.334v1.666h2.135L.736 14.06a.86.86 0 0 0 0 1.198.86.86 0 0 0 1.198 0l3.568-3.567v2.134h1.666V9.66a.834.834 0 0 0-.833-.833z" })
4278
+ }
4279
+ );
4280
+ ExpandIcon = (props) => /* @__PURE__ */ jsx(
4281
+ "svg",
4282
+ {
4283
+ width: "16",
4284
+ height: "16",
4285
+ viewBox: "0 0 16 16",
4286
+ fill: "currentColor",
4287
+ xmlns: "http://www.w3.org/2000/svg",
4288
+ ...props,
4289
+ children: /* @__PURE__ */ jsx("path", { d: "M6.326 8.826a.84.84 0 0 0-.6.234L2.16 12.627v-2.135H.492v4.167c0 .46.373.833.834.833h4.166v-1.667H3.357l3.567-3.567a.857.857 0 0 0 0-1.198.84.84 0 0 0-.598-.234M10.502.492V2.16h2.135L9.07 5.726a.857.857 0 0 0 0 1.199.86.86 0 0 0 1.197 0l3.568-3.568v2.135h1.667V1.326a.834.834 0 0 0-.834-.834z" })
4290
+ }
4291
+ );
4292
+ }
4293
+ });
4251
4294
 
4252
4295
  // src/components/desktop/layout/switchLayout.tsx
4253
4296
  var switchLayout_exports = {};
@@ -5357,29 +5400,6 @@ var init_tradingview_script = __esm({
5357
5400
  Key = "TRADINGVIEW_MOBILE_HEIGHT";
5358
5401
  }
5359
5402
  });
5360
- var KlineDragIcon;
5361
- var init_icons = __esm({
5362
- "src/components/base/icons.tsx"() {
5363
- KlineDragIcon = (props) => /* @__PURE__ */ jsx(
5364
- "svg",
5365
- {
5366
- width: "12",
5367
- height: "12",
5368
- viewBox: "0 0 12 12",
5369
- fill: "currentColor",
5370
- xmlns: "http://www.w3.org/2000/svg",
5371
- ...props,
5372
- children: /* @__PURE__ */ jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsx(
5373
- "path",
5374
- {
5375
- id: "Vector",
5376
- d: "M5.9989 1.00708C5.8709 1.00708 5.7369 1.05008 5.6394 1.14758L3.7959 3.00708L4.4989 3.71008L5.4989 2.72607V4.50708C5.4989 4.78308 5.7229 5.00708 5.9989 5.00708C6.2749 5.00708 6.4989 4.78308 6.4989 4.50708V2.72607L7.4989 3.71008L8.2019 3.00708L6.3584 1.14758C6.2604 1.05008 6.1269 1.00708 5.9989 1.00708ZM5.9989 7.00707C5.7229 7.00707 5.4989 7.23107 5.4989 7.50707V9.28808L4.4989 8.30407L3.7959 9.00707L5.6394 10.8666C5.8349 11.0616 6.1629 11.0616 6.3584 10.8666L8.2019 9.00707L7.4989 8.30407L6.4989 9.28808V7.50707C6.4989 7.23107 6.2749 7.00707 5.9989 7.00707Z"
5377
- }
5378
- ) })
5379
- }
5380
- );
5381
- }
5382
- });
5383
5403
  var TradingviewUI;
5384
5404
  var init_tradingview_ui = __esm({
5385
5405
  "src/components/mobile/tradingview/tradingview.ui.tsx"() {
@@ -6886,10 +6906,17 @@ var Account = (props) => {
6886
6906
  }
6887
6907
  );
6888
6908
  };
6889
- var InjectableAccount = injectable(Account, "Account.MobileAccountMenu");
6909
+ installExtension({
6910
+ name: "mobile-account-menu",
6911
+ scope: ["*"],
6912
+ positions: [ExtensionPositionEnum.MobileAccountMenu],
6913
+ builder: useAccountScript,
6914
+ __isInternal: true
6915
+ })((props) => {
6916
+ return /* @__PURE__ */ jsx(Account, { ...props });
6917
+ });
6890
6918
  var MobileAccountMenuExtension = () => {
6891
- const state = useAccountScript();
6892
- return /* @__PURE__ */ jsx(InjectableAccount, { ...state });
6919
+ return /* @__PURE__ */ jsx(ExtensionSlot, { position: ExtensionPositionEnum.MobileAccountMenu });
6893
6920
  };
6894
6921
 
6895
6922
  // src/components/mobile/bottomNavBar/balance/balance.ui.tsx
@@ -7691,6 +7718,9 @@ init_fundingRate();
7691
7718
  init_fundingRateModal_script();
7692
7719
  init_fundingRateModal_ui();
7693
7720
  init_fundingRateModal_widget();
7721
+
7722
+ // src/pages/trading/trading.ui.desktop.tsx
7723
+ init_icons();
7694
7724
  var SortablePanel = (props) => {
7695
7725
  const { showIndicator, dragOverlay } = props;
7696
7726
  const nodeRef = useRef(null);
@@ -8014,7 +8044,7 @@ var useTradingScript = () => {
8014
8044
  case "middle":
8015
8045
  return 70;
8016
8046
  case "large":
8017
- return 280;
8047
+ return 360;
8018
8048
  default:
8019
8049
  return 0;
8020
8050
  }
@@ -8310,9 +8340,19 @@ var DesktopLayout4 = (props) => {
8310
8340
  dataListMinHeight
8311
8341
  } = props;
8312
8342
  const { showCountdown, closeCountdown } = useShowRwaCountdown(props.symbol);
8343
+ const { brokerName } = useBadgeBySymbol(props.symbol);
8344
+ const { t } = useTranslation();
8313
8345
  const symbolInfoBarHeight2 = useMemo(() => {
8314
- return showCountdown ? 104 : 56;
8315
- }, [showCountdown]);
8346
+ let height = 56;
8347
+ if (brokerName) {
8348
+ height += 46;
8349
+ height += 8;
8350
+ }
8351
+ if (showCountdown) {
8352
+ height += 48;
8353
+ }
8354
+ return height;
8355
+ }, [showCountdown, brokerName]);
8316
8356
  const { isRwa, open } = useGetRwaSymbolOpenStatus(props.symbol);
8317
8357
  useEffect(() => {
8318
8358
  if (isRwa && !open) {
@@ -8431,6 +8471,36 @@ var DesktopLayout4 = (props) => {
8431
8471
  onSymbolChange: props.onSymbolChange
8432
8472
  }
8433
8473
  );
8474
+ const toggleButtoncls = cn(
8475
+ "oui-text-base-contrast-36",
8476
+ resizeable ? "oui-cursor-pointer hover:oui-text-base-contrast-80" : "oui-cursor-not-allowed"
8477
+ );
8478
+ const marketsHeader = /* @__PURE__ */ jsxs(
8479
+ Flex,
8480
+ {
8481
+ className: panelSize === "small" ? "oui-absolute oui-end-[-20px] oui-z-50" : "oui-relative",
8482
+ justify: panelSize === "large" ? "between" : "center",
8483
+ width: "100%",
8484
+ px: 3,
8485
+ children: [
8486
+ panelSize === "large" && /* @__PURE__ */ jsx(Text, { size: "base", intensity: 80, children: t("common.markets") }),
8487
+ panelSize === "large" && /* @__PURE__ */ jsx(
8488
+ "div",
8489
+ {
8490
+ onClick: resizeable ? () => onPanelSizeChange?.("middle") : void 0,
8491
+ children: /* @__PURE__ */ jsx(CollapseIcon, { className: toggleButtoncls })
8492
+ }
8493
+ ),
8494
+ (panelSize === "middle" || panelSize === "small") && /* @__PURE__ */ jsx(
8495
+ "div",
8496
+ {
8497
+ onClick: resizeable ? () => onPanelSizeChange?.("large") : void 0,
8498
+ children: /* @__PURE__ */ jsx(ExpandIcon, { className: toggleButtoncls })
8499
+ }
8500
+ )
8501
+ ]
8502
+ }
8503
+ );
8434
8504
  const marketsView = /* @__PURE__ */ jsx(
8435
8505
  Box,
8436
8506
  {
@@ -8442,16 +8512,37 @@ var DesktopLayout4 = (props) => {
8442
8512
  style: { minWidth: marketsWidth },
8443
8513
  className: "oui-trading-markets-container oui-transition-all oui-duration-150",
8444
8514
  onTransitionEnd: () => setAnimating(false),
8445
- children: !animating && marketLayout === "left" && marketsWidget
8515
+ children: /* @__PURE__ */ jsxs(
8516
+ Flex,
8517
+ {
8518
+ id: "oui-side-markets",
8519
+ className: "oui-relative oui-font-semibold",
8520
+ direction: "column",
8521
+ gapY: 5,
8522
+ height: "100%",
8523
+ width: "100%",
8524
+ children: [
8525
+ marketsHeader,
8526
+ !animating && marketLayout === "left" && /* @__PURE__ */ jsx(
8527
+ Box,
8528
+ {
8529
+ width: "100%",
8530
+ className: cn(
8531
+ panelSize === "large" && "oui-h-[calc(100%_-_56px)]",
8532
+ panelSize === "middle" && "oui-h-full"
8533
+ ),
8534
+ children: marketsWidget
8535
+ }
8536
+ )
8537
+ ]
8538
+ }
8539
+ )
8446
8540
  }
8447
8541
  );
8448
8542
  const symbolInfoBarView = /* @__PURE__ */ jsx(
8449
8543
  Box,
8450
8544
  {
8451
8545
  className: "oui-trading-symbolInfoBar-container",
8452
- intensity: 900,
8453
- r: "2xl",
8454
- px: 3,
8455
8546
  width: "100%",
8456
8547
  style: {
8457
8548
  minHeight: symbolInfoBarHeight2,
@@ -9006,13 +9097,6 @@ var DesktopLayout4 = (props) => {
9006
9097
  }
9007
9098
  );
9008
9099
  };
9009
- var InjectableTradingPage = injectable(
9010
- DesktopLayout4,
9011
- "Trading.TradingPage"
9012
- );
9013
- var TradingPageExtension = (props) => {
9014
- return /* @__PURE__ */ jsx(InjectableTradingPage, { ...props });
9015
- };
9016
9100
  var Countdown = ({
9017
9101
  timeInterval
9018
9102
  }) => {
@@ -9119,6 +9203,12 @@ var MaybeEqual = () => {
9119
9203
  var MobileLayout4 = (props) => {
9120
9204
  const { t } = useTranslation();
9121
9205
  const { isRwa, open, closeTimeInterval } = useGetRwaSymbolInfo(props.symbol);
9206
+ const { brokerId, brokerName, brokerNameRaw, displayName } = useBadgeBySymbol(
9207
+ props.symbol
9208
+ );
9209
+ const isCommunityListed = Boolean(brokerId ?? brokerName);
9210
+ const baseFromSymbol = props.symbol?.split("_")[1] ?? props.symbol ?? "";
9211
+ const symbolWithBroker = brokerName != null ? `${baseFromSymbol}-${brokerNameRaw}` : displayName ?? props.symbol ?? "";
9122
9212
  useEffect(() => {
9123
9213
  if (isRwa && !open) {
9124
9214
  showRwaOutsideMarketHoursNotify();
@@ -9212,7 +9302,17 @@ var MobileLayout4 = (props) => {
9212
9302
  )
9213
9303
  }
9214
9304
  );
9215
- const topBar = /* @__PURE__ */ jsxs(Box, { intensity: 900, className: "oui-rounded-xl", mx: 1, px: 3, py: 2, children: [
9305
+ const topBar = /* @__PURE__ */ jsxs(Box, { children: [
9306
+ /* @__PURE__ */ jsx(Flex, { mx: 1, children: /* @__PURE__ */ jsx(
9307
+ SymbolInfoBarRiskNotice,
9308
+ {
9309
+ visible: isCommunityListed,
9310
+ symbolWithBroker,
9311
+ brokerName: brokerNameRaw ?? brokerName ?? "",
9312
+ autoHeight: true,
9313
+ className: "oui-my-1"
9314
+ }
9315
+ ) }),
9216
9316
  symbolInfoBar,
9217
9317
  /* @__PURE__ */ jsx(
9218
9318
  SimpleSheet,
@@ -9220,7 +9320,7 @@ var MobileLayout4 = (props) => {
9220
9320
  open: props.openMarketsSheet,
9221
9321
  onOpenChange: props.onOpenMarketsSheetChange,
9222
9322
  classNames: {
9223
- body: "oui-h-full oui-pb-0",
9323
+ body: "oui-h-full oui-pb-0 ",
9224
9324
  content: "!oui-w-[372px] !oui-max-w-[372px] !oui-p-0"
9225
9325
  },
9226
9326
  contentProps: { side: "left", closeable: false },
@@ -9254,11 +9354,12 @@ var MobileLayout4 = (props) => {
9254
9354
  };
9255
9355
  var Trading = (props) => {
9256
9356
  const { isMobile } = useScreen();
9357
+ const { t } = useTranslation();
9257
9358
  if (isMobile) {
9258
9359
  return /* @__PURE__ */ jsx(MobileLayout4, { ...props });
9259
9360
  }
9260
9361
  return /* @__PURE__ */ jsx(
9261
- TradingPageExtension,
9362
+ DesktopLayout4,
9262
9363
  {
9263
9364
  className: "oui-h-[calc(100vh_-_48px_-_29px)] oui-bg-base-10",
9264
9365
  ...props
@@ -9310,6 +9411,6 @@ var TradingPage = (props) => {
9310
9411
  init_tradingPageContext();
9311
9412
  init_hooks();
9312
9413
 
9313
- export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook2 as OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookProvider, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, RiskRate, RiskRateWidget, SplitLayout, Trading, TradingPage, TradingPageContext, TradingPageProvider, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookContext, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
9414
+ export { AssetView, AssetViewWidget, BottomNavBar, BottomNavBarWidget, BuySellRatioBar, DataList, DataListWidget, FundingRate, FundingRateDialogId, FundingRateModal, FundingRateModalWidget, FundingRateSheetId, FundingRateWidget, LastTrades, LastTradesWidget, OrderBook2 as OrderBook, OrderBookAndTrades, OrderBookAndTradesWidget, OrderBookWidget, PortfolioSheet, PortfolioSheetWidget, RiskRate, RiskRateWidget, SplitLayout, Trading, TradingPage, TradingPageContext, TradingPageProvider, TradingWidget, useBottomNavBarScript, useFundingRateModalScript, useFundingRateScript, useOrderBookAndTradesScript, useOrderBookScript, usePendingOrderCount, usePortfolioSheetScript, usePositionsCount, useTradingLocalStorage, useTradingPageContext, useTradingScript };
9314
9415
  //# sourceMappingURL=index.mjs.map
9315
9416
  //# sourceMappingURL=index.mjs.map