@orderly.network/trading 3.0.0-beta.1 → 3.0.0-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.js CHANGED
@@ -1823,16 +1823,16 @@ var init_assetView = __esm({
1823
1823
  init_assetView_widget();
1824
1824
  }
1825
1825
  });
1826
- var OrderBookContext; exports.useOrderBookContext = void 0; var ORDERBOOK_COIN_TYPE_KEY, ORDERBOOK_MOBILE_COIN_TYPE_KEY; exports.OrderBookProvider = void 0;
1826
+ var OrderBookContext, useOrderBookContext, ORDERBOOK_COIN_TYPE_KEY, ORDERBOOK_MOBILE_COIN_TYPE_KEY, OrderBookProvider;
1827
1827
  var init_orderContext = __esm({
1828
1828
  "src/components/base/orderBook/orderContext.tsx"() {
1829
1829
  OrderBookContext = React12.createContext({
1830
1830
  cellHeight: 22
1831
1831
  });
1832
- exports.useOrderBookContext = () => React12.useContext(OrderBookContext);
1832
+ useOrderBookContext = () => React12.useContext(OrderBookContext);
1833
1833
  ORDERBOOK_COIN_TYPE_KEY = "orderbook_coin_type";
1834
1834
  ORDERBOOK_MOBILE_COIN_TYPE_KEY = "orderbook_mobile_coin_unit";
1835
- exports.OrderBookProvider = (props) => {
1835
+ OrderBookProvider = (props) => {
1836
1836
  const [mode, setMode] = React12.useState("quantity");
1837
1837
  const [totalMode, setTotalMode] = React12.useState("quantity");
1838
1838
  const memoizedValue = React12__default.default.useMemo(() => {
@@ -1905,7 +1905,7 @@ var init_cell_desktop = __esm({
1905
1905
  init_orderContext();
1906
1906
  init_types();
1907
1907
  DesktopOrderBookCell = (props) => {
1908
- const { cellHeight, showTotal, onItemClick, depth, pendingOrders } = exports.useOrderBookContext();
1908
+ const { cellHeight, showTotal, onItemClick, depth, pendingOrders } = useOrderBookContext();
1909
1909
  const {
1910
1910
  symbolInfo,
1911
1911
  currentHover,
@@ -2052,7 +2052,7 @@ var init_listBox_desktop = __esm({
2052
2052
  };
2053
2053
  DesktopListBox = (props) => {
2054
2054
  const { data, type, countQty } = props;
2055
- const { symbolInfo, depth } = exports.useOrderBookContext();
2055
+ const { symbolInfo, depth } = useOrderBookContext();
2056
2056
  const findMaxItem = React12.useCallback(() => {
2057
2057
  if (!data?.length) {
2058
2058
  return null;
@@ -2211,7 +2211,7 @@ var init_listBox_desktop = __esm({
2211
2211
  };
2212
2212
  }
2213
2213
  });
2214
- var DesktopAsks, InjectableDesktopAsks;
2214
+ var DesktopAsks;
2215
2215
  var init_asks_desktop = __esm({
2216
2216
  "src/components/desktop/orderBook/asks.desktop.tsx"() {
2217
2217
  init_types();
@@ -2237,13 +2237,9 @@ var init_asks_desktop = __esm({
2237
2237
  }
2238
2238
  );
2239
2239
  };
2240
- InjectableDesktopAsks = ui.injectable(
2241
- DesktopAsks,
2242
- "OrderBook.Desktop.Asks"
2243
- );
2244
2240
  }
2245
2241
  });
2246
- var DesktopBids, InjectableDesktopBids;
2242
+ var DesktopBids;
2247
2243
  var init_bids_desktop = __esm({
2248
2244
  "src/components/desktop/orderBook/bids.desktop.tsx"() {
2249
2245
  init_types();
@@ -2268,10 +2264,6 @@ var init_bids_desktop = __esm({
2268
2264
  }
2269
2265
  );
2270
2266
  };
2271
- InjectableDesktopBids = ui.injectable(
2272
- DesktopBids,
2273
- "OrderBook.Desktop.Bids"
2274
- );
2275
2267
  }
2276
2268
  });
2277
2269
  var BuySellRatioSettings, MoreIcon;
@@ -2411,7 +2403,7 @@ var init_header_desktop = __esm({
2411
2403
  };
2412
2404
  DesktopHeader = (props) => {
2413
2405
  const { base, quote = "USDC" } = props;
2414
- const { showTotal } = exports.useOrderBookContext();
2406
+ const { showTotal } = useOrderBookContext();
2415
2407
  const { t } = i18n.useTranslation();
2416
2408
  const [popoverOpen, setOpen] = React12__default.default.useState(false);
2417
2409
  const [coinType] = hooks.useLocalStorage(ORDERBOOK_COIN_TYPE_KEY, base);
@@ -2763,7 +2755,7 @@ var init_markPrice_desktop = __esm({
2763
2755
  init_orderContext();
2764
2756
  DesktopMarkPrice = (props) => {
2765
2757
  const { markPrice = 0, lastPrice, asks, bids, symbolInfo } = props;
2766
- const { showTotal } = exports.useOrderBookContext();
2758
+ const { showTotal } = useOrderBookContext();
2767
2759
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oui-flex oui-flex-row oui-pl-3 oui-tabular-nums oui-justify-between oui-text-base-contrast-80 oui-text-xs oui-relative oui-cursor-pointer oui-py-[6px]", children: [
2768
2760
  /* @__PURE__ */ jsxRuntime.jsxs(
2769
2761
  "div",
@@ -2806,14 +2798,21 @@ var init_markPrice_desktop = __esm({
2806
2798
  if (bids.length === 0 && asks.length === 0) {
2807
2799
  return 0;
2808
2800
  }
2809
- const bid1 = Number.isNaN(bids[0][0]) ? 0 : bids[0][0];
2810
- const index = asks.reverse().findIndex((item) => !Number.isNaN(item[0]));
2811
- let ask1 = 0;
2801
+ const bidRaw = bids[0]?.[0];
2802
+ const bid1 = bidRaw === void 0 || Number.isNaN(bidRaw) ? new utils.Decimal(0) : new utils.Decimal(bidRaw);
2803
+ const asksReversed = [...asks].reverse();
2804
+ const index = asksReversed.findIndex((item) => !Number.isNaN(item[0]));
2805
+ let ask1 = new utils.Decimal(0);
2812
2806
  if (index !== -1) {
2813
- ask1 = Number.isNaN(asks[index][0]) ? 0 : asks[index][0];
2807
+ const askRaw = asksReversed[index][0];
2808
+ ask1 = Number.isNaN(askRaw) ? new utils.Decimal(0) : new utils.Decimal(askRaw);
2809
+ }
2810
+ const mid = ask1.add(bid1).div(2);
2811
+ if (mid.isZero()) {
2812
+ return 0;
2814
2813
  }
2815
- const dValue = new utils.Decimal(ask1).sub(bid1).div(new utils.Decimal(ask1).add(bid1).div(2));
2816
- return Math.ceil(dValue.toNumber() * 1e6 + 0.1) / 1e4;
2814
+ const dValue = ask1.sub(bid1).div(mid);
2815
+ return dValue.mul(1e6).add(0.1).toDecimalPlaces(0, utils.Decimal.ROUND_CEIL).div(1e4).toNumber();
2817
2816
  }, [asks, bids]);
2818
2817
  return /* @__PURE__ */ jsxRuntime.jsx("div", { children: /* @__PURE__ */ jsxRuntime.jsx(
2819
2818
  ui.Tooltip,
@@ -2887,7 +2886,7 @@ var init_index_desktop = __esm({
2887
2886
  };
2888
2887
  }, []);
2889
2888
  return /* @__PURE__ */ jsxRuntime.jsx(
2890
- exports.OrderBookProvider,
2889
+ OrderBookProvider,
2891
2890
  {
2892
2891
  cellHeight: props.cellHeight ?? 20,
2893
2892
  onItemClick: props.onItemClick,
@@ -2928,7 +2927,7 @@ var init_index_desktop = __esm({
2928
2927
  )
2929
2928
  ] }),
2930
2929
  /* @__PURE__ */ jsxRuntime.jsx(DesktopHeader, { quote, base }),
2931
- /* @__PURE__ */ jsxRuntime.jsx(InjectableDesktopAsks, { data: [...props.asks] }),
2930
+ /* @__PURE__ */ jsxRuntime.jsx(DesktopAsks, { data: [...props.asks] }),
2932
2931
  /* @__PURE__ */ jsxRuntime.jsx(
2933
2932
  DesktopMarkPrice,
2934
2933
  {
@@ -2939,12 +2938,12 @@ var init_index_desktop = __esm({
2939
2938
  symbolInfo: props.symbolInfo
2940
2939
  }
2941
2940
  ),
2942
- /* @__PURE__ */ jsxRuntime.jsx(InjectableDesktopBids, { data: [...props.bids] }),
2941
+ /* @__PURE__ */ jsxRuntime.jsx(DesktopBids, { data: [...props.bids] }),
2943
2942
  showBuySellRatio && /* @__PURE__ */ jsxRuntime.jsx(
2944
2943
  exports.BuySellRatioBar,
2945
2944
  {
2946
2945
  ratio: buySellRatio || null,
2947
- className: "oui-h-[38px] oui-px-3 oui-text-2xs"
2946
+ className: "oui-text-2xs oui-px-3 oui-h-[38px]"
2948
2947
  }
2949
2948
  ),
2950
2949
  isLoading && /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(ui.Spinner, {}) })
@@ -3274,7 +3273,7 @@ var init_listBox = __esm({
3274
3273
  init_cell();
3275
3274
  ListBox = (props) => {
3276
3275
  const { data } = props;
3277
- const { mode } = exports.useOrderBookContext();
3276
+ const { mode } = useOrderBookContext();
3278
3277
  return /* @__PURE__ */ jsxRuntime.jsx(ui.Box, { className: "oui-orderBook-list oui-order-book-list oui-flex oui-w-full oui-flex-col oui-gap-px", children: data.map((item, index) => {
3279
3278
  return /* @__PURE__ */ jsxRuntime.jsx(
3280
3279
  OrderBookCell,
@@ -3453,7 +3452,7 @@ var init_markPrice2 = __esm({
3453
3452
  init_midPriceView();
3454
3453
  init_orderContext();
3455
3454
  MarkPrice = (props) => {
3456
- const { symbolInfo } = exports.useOrderBookContext();
3455
+ const { symbolInfo } = useOrderBookContext();
3457
3456
  const { quote_dp } = symbolInfo;
3458
3457
  return /* @__PURE__ */ jsxRuntime.jsxs(
3459
3458
  ui.Flex,
@@ -3520,7 +3519,7 @@ var init_orderBook = __esm({
3520
3519
  "qty"
3521
3520
  );
3522
3521
  return /* @__PURE__ */ jsxRuntime.jsx(
3523
- exports.OrderBookProvider,
3522
+ OrderBookProvider,
3524
3523
  {
3525
3524
  cellHeight: props.cellHeight ?? 20,
3526
3525
  onItemClick: props.onItemClick,
@@ -3875,9 +3874,7 @@ var orderBook_exports = {};
3875
3874
  __export(orderBook_exports, {
3876
3875
  BuySellRatioBar: () => exports.BuySellRatioBar,
3877
3876
  OrderBook: () => exports.OrderBook,
3878
- OrderBookProvider: () => exports.OrderBookProvider,
3879
3877
  OrderBookWidget: () => exports.OrderBookWidget,
3880
- useOrderBookContext: () => exports.useOrderBookContext,
3881
3878
  useOrderBookScript: () => exports.useOrderBookScript
3882
3879
  });
3883
3880
  var init_orderBook2 = __esm({
@@ -3886,7 +3883,6 @@ var init_orderBook2 = __esm({
3886
3883
  init_orderBook_widget();
3887
3884
  init_orderBook_script();
3888
3885
  init_buySellRatioBar();
3889
- init_orderContext();
3890
3886
  }
3891
3887
  });
3892
3888
  exports.RiskRate = void 0;
@@ -4255,6 +4251,53 @@ var init_orderBookAndTrades = __esm({
4255
4251
  init_orderBookAndTrades_script();
4256
4252
  }
4257
4253
  });
4254
+ var KlineDragIcon, CollapseIcon, ExpandIcon;
4255
+ var init_icons = __esm({
4256
+ "src/components/base/icons.tsx"() {
4257
+ KlineDragIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4258
+ "svg",
4259
+ {
4260
+ width: "12",
4261
+ height: "12",
4262
+ viewBox: "0 0 12 12",
4263
+ fill: "currentColor",
4264
+ xmlns: "http://www.w3.org/2000/svg",
4265
+ ...props,
4266
+ children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsxRuntime.jsx(
4267
+ "path",
4268
+ {
4269
+ id: "Vector",
4270
+ 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"
4271
+ }
4272
+ ) })
4273
+ }
4274
+ );
4275
+ CollapseIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4276
+ "svg",
4277
+ {
4278
+ width: "16",
4279
+ height: "16",
4280
+ viewBox: "0 0 16 16",
4281
+ fill: "currentColor",
4282
+ xmlns: "http://www.w3.org/2000/svg",
4283
+ ...props,
4284
+ children: /* @__PURE__ */ jsxRuntime.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" })
4285
+ }
4286
+ );
4287
+ ExpandIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
4288
+ "svg",
4289
+ {
4290
+ width: "16",
4291
+ height: "16",
4292
+ viewBox: "0 0 16 16",
4293
+ fill: "currentColor",
4294
+ xmlns: "http://www.w3.org/2000/svg",
4295
+ ...props,
4296
+ children: /* @__PURE__ */ jsxRuntime.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" })
4297
+ }
4298
+ );
4299
+ }
4300
+ });
4258
4301
 
4259
4302
  // src/components/desktop/layout/switchLayout.tsx
4260
4303
  var switchLayout_exports = {};
@@ -5364,29 +5407,6 @@ var init_tradingview_script = __esm({
5364
5407
  Key = "TRADINGVIEW_MOBILE_HEIGHT";
5365
5408
  }
5366
5409
  });
5367
- var KlineDragIcon;
5368
- var init_icons = __esm({
5369
- "src/components/base/icons.tsx"() {
5370
- KlineDragIcon = (props) => /* @__PURE__ */ jsxRuntime.jsx(
5371
- "svg",
5372
- {
5373
- width: "12",
5374
- height: "12",
5375
- viewBox: "0 0 12 12",
5376
- fill: "currentColor",
5377
- xmlns: "http://www.w3.org/2000/svg",
5378
- ...props,
5379
- children: /* @__PURE__ */ jsxRuntime.jsx("g", { id: "Arrows-expand", children: /* @__PURE__ */ jsxRuntime.jsx(
5380
- "path",
5381
- {
5382
- id: "Vector",
5383
- 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"
5384
- }
5385
- ) })
5386
- }
5387
- );
5388
- }
5389
- });
5390
5410
  var TradingviewUI;
5391
5411
  var init_tradingview_ui = __esm({
5392
5412
  "src/components/mobile/tradingview/tradingview.ui.tsx"() {
@@ -6893,10 +6913,17 @@ var Account = (props) => {
6893
6913
  }
6894
6914
  );
6895
6915
  };
6896
- var InjectableAccount = ui.injectable(Account, "Account.MobileAccountMenu");
6916
+ ui.installExtension({
6917
+ name: "mobile-account-menu",
6918
+ scope: ["*"],
6919
+ positions: [ui.ExtensionPositionEnum.MobileAccountMenu],
6920
+ builder: useAccountScript,
6921
+ __isInternal: true
6922
+ })((props) => {
6923
+ return /* @__PURE__ */ jsxRuntime.jsx(Account, { ...props });
6924
+ });
6897
6925
  var MobileAccountMenuExtension = () => {
6898
- const state = useAccountScript();
6899
- return /* @__PURE__ */ jsxRuntime.jsx(InjectableAccount, { ...state });
6926
+ return /* @__PURE__ */ jsxRuntime.jsx(ui.ExtensionSlot, { position: ui.ExtensionPositionEnum.MobileAccountMenu });
6900
6927
  };
6901
6928
 
6902
6929
  // src/components/mobile/bottomNavBar/balance/balance.ui.tsx
@@ -7698,6 +7725,9 @@ init_fundingRate();
7698
7725
  init_fundingRateModal_script();
7699
7726
  init_fundingRateModal_ui();
7700
7727
  init_fundingRateModal_widget();
7728
+
7729
+ // src/pages/trading/trading.ui.desktop.tsx
7730
+ init_icons();
7701
7731
  var SortablePanel = (props) => {
7702
7732
  const { showIndicator, dragOverlay } = props;
7703
7733
  const nodeRef = React12.useRef(null);
@@ -8021,7 +8051,7 @@ var useTradingScript = () => {
8021
8051
  case "middle":
8022
8052
  return 70;
8023
8053
  case "large":
8024
- return 280;
8054
+ return 360;
8025
8055
  default:
8026
8056
  return 0;
8027
8057
  }
@@ -8317,9 +8347,19 @@ var DesktopLayout4 = (props) => {
8317
8347
  dataListMinHeight
8318
8348
  } = props;
8319
8349
  const { showCountdown, closeCountdown } = useShowRwaCountdown(props.symbol);
8350
+ const { brokerName } = hooks.useBadgeBySymbol(props.symbol);
8351
+ const { t } = i18n.useTranslation();
8320
8352
  const symbolInfoBarHeight2 = React12.useMemo(() => {
8321
- return showCountdown ? 104 : 56;
8322
- }, [showCountdown]);
8353
+ let height = 56;
8354
+ if (brokerName) {
8355
+ height += 46;
8356
+ height += 8;
8357
+ }
8358
+ if (showCountdown) {
8359
+ height += 48;
8360
+ }
8361
+ return height;
8362
+ }, [showCountdown, brokerName]);
8323
8363
  const { isRwa, open } = hooks.useGetRwaSymbolOpenStatus(props.symbol);
8324
8364
  React12.useEffect(() => {
8325
8365
  if (isRwa && !open) {
@@ -8438,6 +8478,36 @@ var DesktopLayout4 = (props) => {
8438
8478
  onSymbolChange: props.onSymbolChange
8439
8479
  }
8440
8480
  );
8481
+ const toggleButtoncls = ui.cn(
8482
+ "oui-text-base-contrast-36",
8483
+ resizeable ? "oui-cursor-pointer hover:oui-text-base-contrast-80" : "oui-cursor-not-allowed"
8484
+ );
8485
+ const marketsHeader = /* @__PURE__ */ jsxRuntime.jsxs(
8486
+ ui.Flex,
8487
+ {
8488
+ className: panelSize === "small" ? "oui-absolute oui-end-[-20px] oui-z-50" : "oui-relative",
8489
+ justify: panelSize === "large" ? "between" : "center",
8490
+ width: "100%",
8491
+ px: 3,
8492
+ children: [
8493
+ panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(ui.Text, { size: "base", intensity: 80, children: t("common.markets") }),
8494
+ panelSize === "large" && /* @__PURE__ */ jsxRuntime.jsx(
8495
+ "div",
8496
+ {
8497
+ onClick: resizeable ? () => onPanelSizeChange?.("middle") : void 0,
8498
+ children: /* @__PURE__ */ jsxRuntime.jsx(CollapseIcon, { className: toggleButtoncls })
8499
+ }
8500
+ ),
8501
+ (panelSize === "middle" || panelSize === "small") && /* @__PURE__ */ jsxRuntime.jsx(
8502
+ "div",
8503
+ {
8504
+ onClick: resizeable ? () => onPanelSizeChange?.("large") : void 0,
8505
+ children: /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, { className: toggleButtoncls })
8506
+ }
8507
+ )
8508
+ ]
8509
+ }
8510
+ );
8441
8511
  const marketsView = /* @__PURE__ */ jsxRuntime.jsx(
8442
8512
  ui.Box,
8443
8513
  {
@@ -8449,16 +8519,37 @@ var DesktopLayout4 = (props) => {
8449
8519
  style: { minWidth: marketsWidth },
8450
8520
  className: "oui-trading-markets-container oui-transition-all oui-duration-150",
8451
8521
  onTransitionEnd: () => setAnimating(false),
8452
- children: !animating && marketLayout === "left" && marketsWidget
8522
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
8523
+ ui.Flex,
8524
+ {
8525
+ id: "oui-side-markets",
8526
+ className: "oui-relative oui-font-semibold",
8527
+ direction: "column",
8528
+ gapY: 5,
8529
+ height: "100%",
8530
+ width: "100%",
8531
+ children: [
8532
+ marketsHeader,
8533
+ !animating && marketLayout === "left" && /* @__PURE__ */ jsxRuntime.jsx(
8534
+ ui.Box,
8535
+ {
8536
+ width: "100%",
8537
+ className: ui.cn(
8538
+ panelSize === "large" && "oui-h-[calc(100%_-_56px)]",
8539
+ panelSize === "middle" && "oui-h-full"
8540
+ ),
8541
+ children: marketsWidget
8542
+ }
8543
+ )
8544
+ ]
8545
+ }
8546
+ )
8453
8547
  }
8454
8548
  );
8455
8549
  const symbolInfoBarView = /* @__PURE__ */ jsxRuntime.jsx(
8456
8550
  ui.Box,
8457
8551
  {
8458
8552
  className: "oui-trading-symbolInfoBar-container",
8459
- intensity: 900,
8460
- r: "2xl",
8461
- px: 3,
8462
8553
  width: "100%",
8463
8554
  style: {
8464
8555
  minHeight: symbolInfoBarHeight2,
@@ -9013,13 +9104,6 @@ var DesktopLayout4 = (props) => {
9013
9104
  }
9014
9105
  );
9015
9106
  };
9016
- var InjectableTradingPage = ui.injectable(
9017
- DesktopLayout4,
9018
- "Trading.TradingPage"
9019
- );
9020
- var TradingPageExtension = (props) => {
9021
- return /* @__PURE__ */ jsxRuntime.jsx(InjectableTradingPage, { ...props });
9022
- };
9023
9107
  var Countdown = ({
9024
9108
  timeInterval
9025
9109
  }) => {
@@ -9126,6 +9210,12 @@ var MaybeEqual = () => {
9126
9210
  var MobileLayout4 = (props) => {
9127
9211
  const { t } = i18n.useTranslation();
9128
9212
  const { isRwa, open, closeTimeInterval } = hooks.useGetRwaSymbolInfo(props.symbol);
9213
+ const { brokerId, brokerName, brokerNameRaw, displayName } = hooks.useBadgeBySymbol(
9214
+ props.symbol
9215
+ );
9216
+ const isCommunityListed = Boolean(brokerId ?? brokerName);
9217
+ const baseFromSymbol = props.symbol?.split("_")[1] ?? props.symbol ?? "";
9218
+ const symbolWithBroker = brokerName != null ? `${baseFromSymbol}-${brokerNameRaw}` : displayName ?? props.symbol ?? "";
9129
9219
  React12.useEffect(() => {
9130
9220
  if (isRwa && !open) {
9131
9221
  showRwaOutsideMarketHoursNotify();
@@ -9219,7 +9309,17 @@ var MobileLayout4 = (props) => {
9219
9309
  )
9220
9310
  }
9221
9311
  );
9222
- const topBar = /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { intensity: 900, className: "oui-rounded-xl", mx: 1, px: 3, py: 2, children: [
9312
+ const topBar = /* @__PURE__ */ jsxRuntime.jsxs(ui.Box, { children: [
9313
+ /* @__PURE__ */ jsxRuntime.jsx(ui.Flex, { mx: 1, children: /* @__PURE__ */ jsxRuntime.jsx(
9314
+ markets.SymbolInfoBarRiskNotice,
9315
+ {
9316
+ visible: isCommunityListed,
9317
+ symbolWithBroker,
9318
+ brokerName: brokerNameRaw ?? brokerName ?? "",
9319
+ autoHeight: true,
9320
+ className: "oui-my-1"
9321
+ }
9322
+ ) }),
9223
9323
  symbolInfoBar,
9224
9324
  /* @__PURE__ */ jsxRuntime.jsx(
9225
9325
  ui.SimpleSheet,
@@ -9227,7 +9327,7 @@ var MobileLayout4 = (props) => {
9227
9327
  open: props.openMarketsSheet,
9228
9328
  onOpenChange: props.onOpenMarketsSheetChange,
9229
9329
  classNames: {
9230
- body: "oui-h-full oui-pb-0",
9330
+ body: "oui-h-full oui-pb-0 ",
9231
9331
  content: "!oui-w-[372px] !oui-max-w-[372px] !oui-p-0"
9232
9332
  },
9233
9333
  contentProps: { side: "left", closeable: false },
@@ -9261,11 +9361,12 @@ var MobileLayout4 = (props) => {
9261
9361
  };
9262
9362
  var Trading = (props) => {
9263
9363
  const { isMobile } = ui.useScreen();
9364
+ const { t } = i18n.useTranslation();
9264
9365
  if (isMobile) {
9265
9366
  return /* @__PURE__ */ jsxRuntime.jsx(MobileLayout4, { ...props });
9266
9367
  }
9267
9368
  return /* @__PURE__ */ jsxRuntime.jsx(
9268
- TradingPageExtension,
9369
+ DesktopLayout4,
9269
9370
  {
9270
9371
  className: "oui-h-[calc(100vh_-_48px_-_29px)] oui-bg-base-10",
9271
9372
  ...props