@agg-build/hooks 2.4.6 → 2.5.1

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.
@@ -475,8 +475,14 @@ var enUsLabels = {
475
475
  categoryTabsAria: "Home page category tabs"
476
476
  },
477
477
  userProfile: {
478
+ tabs: {
479
+ positions: "Positions",
480
+ openOrders: "Open orders",
481
+ activity: "Activity"
482
+ },
478
483
  balance: {
479
484
  availableBalance: "Available Balance",
485
+ reservedForOpenOrders: (amount) => `${amount} reserved for open orders`,
480
486
  balanceByNetwork: "Balance by network",
481
487
  paperModeNetwork: "Paper",
482
488
  paperModeWarning: "Paper mode is enabled. These are simulated funds for paper trading.",
@@ -559,6 +565,25 @@ var enUsLabels = {
559
565
  avgPrefix: "avg",
560
566
  nowPrefix: "now",
561
567
  finalPrefix: "final"
568
+ },
569
+ openOrders: {
570
+ marketHeader: "Market",
571
+ limitPriceHeader: "Limit price",
572
+ filledHeader: "Filled",
573
+ totalHeader: "Total",
574
+ filledShort: "Filled",
575
+ totalShort: "Total",
576
+ expirationHeader: "Expiration",
577
+ goodTilCanceled: "Good 'til canceled",
578
+ expired: "Expired",
579
+ cancel: "Cancel",
580
+ cancelOrderAria: (orderId) => `Cancel order ${orderId}`,
581
+ loading: "Loading open orders",
582
+ loadingMore: "Loading more open orders",
583
+ errorTitle: "Unable to load open orders",
584
+ errorDescription: "Please try again in a moment.",
585
+ emptyTitle: "No open orders",
586
+ emptyDescription: "Your open limit orders will appear here."
562
587
  }
563
588
  },
564
589
  eventList: {
@@ -804,6 +829,29 @@ var enUsLabels = {
804
829
  kycSuccessDone: "Done",
805
830
  outcome: (label) => `Outcome: ${label}`,
806
831
  smartRouting: "Smart Routing",
832
+ orderTypeMarket: "Market",
833
+ orderTypeLimit: "Limit",
834
+ orderTypeAria: "Order type",
835
+ limitPrice: "Limit price",
836
+ limitPriceInputAria: "Limit price in cents",
837
+ limitPriceInvalid: "Limit price must be greater than 0 and less than 100.",
838
+ limitPriceDecreaseAria: "Decrease limit price",
839
+ limitPriceIncreaseAria: "Increase limit price",
840
+ expiration: "Expiration",
841
+ expirationGoodTilCanceled: "Good 'til canceled",
842
+ expirationFiveMinutes: "5m",
843
+ expirationOneHour: "1h",
844
+ expirationEndOfDay: "End of day (EST)",
845
+ expirationCustom: "Custom",
846
+ expirationMenuAria: "Choose expiration",
847
+ expirationOptions: "Expiration options",
848
+ expirationDateAria: "Limit order expiration date",
849
+ expirationStartTime: "Start time",
850
+ expirationStartTimeHint: "24-hour format",
851
+ expirationCancel: "Cancel",
852
+ expirationApply: "Apply",
853
+ limitOrderPlacedTitle: "Limit order placed",
854
+ limitOrderPlacedDescription: "Your limit order has been submitted.",
807
855
  orderSplitting: "Order Splitting",
808
856
  splitOrderDescription: "We split your order for the best price:",
809
857
  viewAllRoutes: (count) => `View all (${count})`,
@@ -1069,6 +1117,12 @@ var enUsLabels = {
1069
1117
  const venue = venueLabel ? ` on ${venueLabel}` : "";
1070
1118
  return `${action}${amount}${price}${venue}`.trim();
1071
1119
  },
1120
+ cancelledTitle: "Order canceled",
1121
+ cancelledMessage: "Your open order was canceled.",
1122
+ cancelPendingTitle: "Cancellation submitted",
1123
+ cancelPendingMessage: "Your cancellation request is being processed.",
1124
+ cancelFailedTitle: "Cancellation failed",
1125
+ cancelFailedMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Your open order could not be canceled. Please try again.",
1072
1126
  failedTitle: "Order failed",
1073
1127
  failedMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Your order could not be completed. Please try again."
1074
1128
  },
@@ -1208,6 +1262,7 @@ var defaultAggUiConfig = {
1208
1262
  enableGradients: false,
1209
1263
  enableVenueEventDiscoveryFilters: false,
1210
1264
  enableNotifications: true,
1265
+ showLimitOrders: false,
1211
1266
  showSportsMarkets: false
1212
1267
  },
1213
1268
  market: {
@@ -1239,7 +1294,7 @@ var mergeAggUiSearchConfig = (config) => {
1239
1294
  };
1240
1295
  };
1241
1296
  var mergeAggUiConfig = (persisted, config) => {
1242
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z;
1297
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$;
1243
1298
  const locale = (_d = (_c = (_a = config == null ? void 0 : config.general) == null ? void 0 : _a.locale) != null ? _c : (_b = persisted.general) == null ? void 0 : _b.locale) != null ? _d : DEFAULT_LOCALE;
1244
1299
  const theme = (_h = (_g = (_e = config == null ? void 0 : config.general) == null ? void 0 : _e.theme) != null ? _g : (_f = persisted.general) == null ? void 0 : _f.theme) != null ? _h : defaultAggUiConfig.general.theme;
1245
1300
  const formatters = createFormatters(locale);
@@ -1262,27 +1317,28 @@ var mergeAggUiConfig = (persisted, config) => {
1262
1317
  enableGradients: (_x = (_w = config == null ? void 0 : config.features) == null ? void 0 : _w.enableGradients) != null ? _x : defaultAggUiConfig.features.enableGradients,
1263
1318
  enableVenueEventDiscoveryFilters: (_z = (_y = config == null ? void 0 : config.features) == null ? void 0 : _y.enableVenueEventDiscoveryFilters) != null ? _z : defaultAggUiConfig.features.enableVenueEventDiscoveryFilters,
1264
1319
  enableNotifications: (_B = (_A = config == null ? void 0 : config.features) == null ? void 0 : _A.enableNotifications) != null ? _B : defaultAggUiConfig.features.enableNotifications,
1265
- showSportsMarkets: (_D = (_C = config == null ? void 0 : config.features) == null ? void 0 : _C.showSportsMarkets) != null ? _D : defaultAggUiConfig.features.showSportsMarkets
1320
+ showLimitOrders: (_D = (_C = config == null ? void 0 : config.features) == null ? void 0 : _C.showLimitOrders) != null ? _D : defaultAggUiConfig.features.showLimitOrders,
1321
+ showSportsMarkets: (_F = (_E = config == null ? void 0 : config.features) == null ? void 0 : _E.showSportsMarkets) != null ? _F : defaultAggUiConfig.features.showSportsMarkets
1266
1322
  },
1267
1323
  market: {
1268
- arbitrageThreshold: (_F = (_E = config == null ? void 0 : config.market) == null ? void 0 : _E.arbitrageThreshold) != null ? _F : defaultAggUiConfig.market.arbitrageThreshold,
1269
- maxMidpointIdsPerRequest: (_H = (_G = config == null ? void 0 : config.market) == null ? void 0 : _G.maxMidpointIdsPerRequest) != null ? _H : defaultAggUiConfig.market.maxMidpointIdsPerRequest
1324
+ arbitrageThreshold: (_H = (_G = config == null ? void 0 : config.market) == null ? void 0 : _G.arbitrageThreshold) != null ? _H : defaultAggUiConfig.market.arbitrageThreshold,
1325
+ maxMidpointIdsPerRequest: (_J = (_I = config == null ? void 0 : config.market) == null ? void 0 : _I.maxMidpointIdsPerRequest) != null ? _J : defaultAggUiConfig.market.maxMidpointIdsPerRequest
1270
1326
  },
1271
1327
  chart: {
1272
- defaultChartTimeRange: (_J = (_I = config == null ? void 0 : config.chart) == null ? void 0 : _I.defaultChartTimeRange) != null ? _J : defaultAggUiConfig.chart.defaultChartTimeRange,
1273
- selectedChartTimeRange: (_N = (_M = (_K = persisted.chart) == null ? void 0 : _K.selectedChartTimeRange) != null ? _M : (_L = config == null ? void 0 : config.chart) == null ? void 0 : _L.defaultChartTimeRange) != null ? _N : defaultAggUiConfig.chart.defaultChartTimeRange,
1328
+ defaultChartTimeRange: (_L = (_K = config == null ? void 0 : config.chart) == null ? void 0 : _K.defaultChartTimeRange) != null ? _L : defaultAggUiConfig.chart.defaultChartTimeRange,
1329
+ selectedChartTimeRange: (_P = (_O = (_M = persisted.chart) == null ? void 0 : _M.selectedChartTimeRange) != null ? _O : (_N = config == null ? void 0 : config.chart) == null ? void 0 : _N.defaultChartTimeRange) != null ? _P : defaultAggUiConfig.chart.defaultChartTimeRange,
1274
1330
  setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
1275
1331
  },
1276
1332
  formatting: {
1277
- formatNumber: (_P = (_O = config == null ? void 0 : config.formatting) == null ? void 0 : _O.formatNumber) != null ? _P : formatters.formatNumber,
1278
- formatPercent: (_R = (_Q = config == null ? void 0 : config.formatting) == null ? void 0 : _Q.formatPercent) != null ? _R : formatters.formatPercent,
1279
- formatCurrency: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatCurrency) != null ? _T : formatters.formatCurrency,
1280
- formatCompactCurrency: (_V = (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatCompactCurrency) != null ? _V : formatters.formatCompactCurrency,
1281
- formatDate: (_X = (_W = config == null ? void 0 : config.formatting) == null ? void 0 : _W.formatDate) != null ? _X : formatters.formatDate
1333
+ formatNumber: (_R = (_Q = config == null ? void 0 : config.formatting) == null ? void 0 : _Q.formatNumber) != null ? _R : formatters.formatNumber,
1334
+ formatPercent: (_T = (_S = config == null ? void 0 : config.formatting) == null ? void 0 : _S.formatPercent) != null ? _T : formatters.formatPercent,
1335
+ formatCurrency: (_V = (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatCurrency) != null ? _V : formatters.formatCurrency,
1336
+ formatCompactCurrency: (_X = (_W = config == null ? void 0 : config.formatting) == null ? void 0 : _W.formatCompactCurrency) != null ? _X : formatters.formatCompactCurrency,
1337
+ formatDate: (_Z = (_Y = config == null ? void 0 : config.formatting) == null ? void 0 : _Y.formatDate) != null ? _Z : formatters.formatDate
1282
1338
  },
1283
1339
  search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
1284
1340
  trading: {
1285
- executionMode: (_Z = (_Y = config == null ? void 0 : config.trading) == null ? void 0 : _Y.executionMode) != null ? _Z : defaultAggUiConfig.trading.executionMode
1341
+ executionMode: (_$ = (__ = config == null ? void 0 : config.trading) == null ? void 0 : __.executionMode) != null ? _$ : defaultAggUiConfig.trading.executionMode
1286
1342
  },
1287
1343
  walletActions: config == null ? void 0 : config.walletActions,
1288
1344
  solanaRpcUrl: config == null ? void 0 : config.solanaRpcUrl
@@ -1481,31 +1537,73 @@ function AggBalanceProvider({ children }) {
1481
1537
  return sum + tokenAcrossChains;
1482
1538
  }, 0);
1483
1539
  }, [managedBalances]);
1484
- const balanceBreakdown = useMemo(() => {
1485
- var _a, _b;
1486
- const byChain = /* @__PURE__ */ new Map();
1487
- const cash = managedBalances.cash;
1488
- for (const token of cash) {
1489
- if (!isUsdBasedToken(token.tokenSymbol)) continue;
1490
- for (const chain of token.chains) {
1491
- const current = (_a = byChain.get(chain.chainId)) != null ? _a : {
1492
- label: chainLabelFromId(chain.chainId),
1493
- balance: 0,
1494
- accountCount: 0
1495
- };
1496
- current.balance += toTokenUnits(chain.balanceRaw, (_b = chain.decimals) != null ? _b : token.decimals);
1497
- current.accountCount += 1;
1498
- byChain.set(chain.chainId, current);
1540
+ const availableBalance = useMemo(() => {
1541
+ return managedBalances.cash.reduce((sum, token) => {
1542
+ if (!isUsdBasedToken(token.tokenSymbol)) return sum;
1543
+ if (token.availableRaw != null) {
1544
+ return sum + toTokenUnits(token.availableRaw, token.decimals);
1499
1545
  }
1500
- }
1501
- return Array.from(byChain.entries()).sort((a, b) => a[1].label.localeCompare(b[1].label)).map(([chainId, value2]) => ({
1502
- key: String(chainId),
1503
- label: value2.label,
1504
- balance: value2.balance,
1505
- accountCount: value2.accountCount,
1506
- venues: connectedVenues.length > 0 ? connectedVenues : void 0
1507
- }));
1508
- }, [connectedVenues, managedBalances]);
1546
+ return sum + token.chains.reduce(
1547
+ (chainSum, chain) => {
1548
+ var _a, _b;
1549
+ return chainSum + toTokenUnits((_a = chain.availableRaw) != null ? _a : chain.balanceRaw, (_b = chain.decimals) != null ? _b : token.decimals);
1550
+ },
1551
+ 0
1552
+ );
1553
+ }, 0);
1554
+ }, [managedBalances]);
1555
+ const reservedBalance = useMemo(() => {
1556
+ return managedBalances.cash.reduce((sum, token) => {
1557
+ if (!isUsdBasedToken(token.tokenSymbol)) return sum;
1558
+ if (token.reservedRaw != null) {
1559
+ return sum + toTokenUnits(token.reservedRaw, token.decimals);
1560
+ }
1561
+ return sum + token.chains.reduce(
1562
+ (chainSum, chain) => {
1563
+ var _a, _b;
1564
+ return chainSum + toTokenUnits((_a = chain.heldRaw) != null ? _a : "0", (_b = chain.decimals) != null ? _b : token.decimals);
1565
+ },
1566
+ 0
1567
+ );
1568
+ }, 0);
1569
+ }, [managedBalances]);
1570
+ const buildBalanceBreakdown = useCallback(
1571
+ (rawForChain) => {
1572
+ var _a, _b;
1573
+ const byChain = /* @__PURE__ */ new Map();
1574
+ const cash = managedBalances.cash;
1575
+ for (const token of cash) {
1576
+ if (!isUsdBasedToken(token.tokenSymbol)) continue;
1577
+ for (const chain of token.chains) {
1578
+ const current = (_a = byChain.get(chain.chainId)) != null ? _a : {
1579
+ label: chainLabelFromId(chain.chainId),
1580
+ balance: 0,
1581
+ accountCount: 0
1582
+ };
1583
+ current.balance += toTokenUnits(rawForChain(chain), (_b = chain.decimals) != null ? _b : token.decimals);
1584
+ current.accountCount += 1;
1585
+ byChain.set(chain.chainId, current);
1586
+ }
1587
+ }
1588
+ return Array.from(byChain.entries()).sort((a, b) => a[1].label.localeCompare(b[1].label)).map(([chainId, value2]) => ({
1589
+ key: String(chainId),
1590
+ label: value2.label,
1591
+ balance: value2.balance,
1592
+ accountCount: value2.accountCount,
1593
+ venues: connectedVenues.length > 0 ? connectedVenues : void 0
1594
+ }));
1595
+ },
1596
+ [connectedVenues, managedBalances.cash]
1597
+ );
1598
+ const balanceBreakdown = useMemo(() => {
1599
+ return buildBalanceBreakdown((chain) => chain.balanceRaw);
1600
+ }, [buildBalanceBreakdown]);
1601
+ const availableBalanceBreakdown = useMemo(() => {
1602
+ return buildBalanceBreakdown((chain) => {
1603
+ var _a;
1604
+ return (_a = chain.availableRaw) != null ? _a : chain.balanceRaw;
1605
+ });
1606
+ }, [buildBalanceBreakdown]);
1509
1607
  const positionsBalanceTotal = useMemo(() => {
1510
1608
  const positions = managedBalances.positions;
1511
1609
  return positions.reduce(
@@ -1526,8 +1624,11 @@ function AggBalanceProvider({ children }) {
1526
1624
  return {
1527
1625
  managedBalances,
1528
1626
  totalBalance: 0,
1627
+ availableBalance: 0,
1628
+ reservedBalance: 0,
1529
1629
  positionsBalanceTotal: 0,
1530
1630
  balanceBreakdown: [],
1631
+ availableBalanceBreakdown: [],
1531
1632
  connectedVenues: [],
1532
1633
  isLoading: false,
1533
1634
  error: null,
@@ -1539,8 +1640,11 @@ function AggBalanceProvider({ children }) {
1539
1640
  return {
1540
1641
  managedBalances,
1541
1642
  totalBalance,
1643
+ availableBalance,
1644
+ reservedBalance,
1542
1645
  positionsBalanceTotal,
1543
1646
  balanceBreakdown,
1647
+ availableBalanceBreakdown,
1544
1648
  connectedVenues,
1545
1649
  isLoading: isBalancesLoading,
1546
1650
  error,
@@ -1549,6 +1653,8 @@ function AggBalanceProvider({ children }) {
1549
1653
  };
1550
1654
  }, [
1551
1655
  balanceBreakdown,
1656
+ availableBalance,
1657
+ availableBalanceBreakdown,
1552
1658
  balancesError,
1553
1659
  connectedVenues,
1554
1660
  isBalancesLoading,
@@ -1557,6 +1663,7 @@ function AggBalanceProvider({ children }) {
1557
1663
  positionsBalanceTotal,
1558
1664
  refetch,
1559
1665
  refetchConnectionStatus,
1666
+ reservedBalance,
1560
1667
  totalBalance
1561
1668
  ]);
1562
1669
  return /* @__PURE__ */ jsx(AggBalanceContext.Provider, { value, children });
@@ -3811,12 +3918,54 @@ function useExecuteManaged(options) {
3811
3918
  });
3812
3919
  }
3813
3920
 
3814
- // src/execution/use-withdraw-managed.ts
3921
+ // src/execution/use-place-limit-order.ts
3815
3922
  import { useMutation as useMutation3, useQueryClient as useQueryClient4 } from "@tanstack/react-query";
3816
- function useWithdrawManaged(options) {
3923
+ function usePlaceLimitOrder(options) {
3817
3924
  const client = useAggClient();
3818
3925
  const queryClient = useQueryClient4();
3819
3926
  return useMutation3({
3927
+ mutationFn: (params) => client.placeLimitOrder(params),
3928
+ onSuccess: (data) => {
3929
+ var _a;
3930
+ queryClient.invalidateQueries({ queryKey: executionKeys.ordersPrefix() });
3931
+ queryClient.invalidateQueries({ queryKey: ["execution-orders"] });
3932
+ queryClient.invalidateQueries({ queryKey: executionKeys.positionsPrefix() });
3933
+ invalidateBalanceQueries(queryClient);
3934
+ (_a = options == null ? void 0 : options.onSuccess) == null ? void 0 : _a.call(options, data);
3935
+ },
3936
+ onError: options == null ? void 0 : options.onError
3937
+ });
3938
+ }
3939
+
3940
+ // src/execution/use-cancel-managed-order.ts
3941
+ import { useMutation as useMutation4, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
3942
+ function useCancelManagedOrder(options) {
3943
+ const client = useAggClient();
3944
+ const queryClient = useQueryClient5();
3945
+ return useMutation4({
3946
+ mutationFn: (orderId) => client.cancelManagedOrder(orderId),
3947
+ onSuccess: (data, orderId) => {
3948
+ var _a;
3949
+ queryClient.invalidateQueries({ queryKey: executionKeys.ordersPrefix() });
3950
+ queryClient.invalidateQueries({ queryKey: ["execution-orders"] });
3951
+ invalidatePositionQueries(queryClient);
3952
+ invalidateBalanceQueries(queryClient);
3953
+ invalidateUserActivityQueries(queryClient);
3954
+ (_a = options == null ? void 0 : options.onSuccess) == null ? void 0 : _a.call(options, data, orderId);
3955
+ },
3956
+ onError: (error, orderId) => {
3957
+ var _a;
3958
+ (_a = options == null ? void 0 : options.onError) == null ? void 0 : _a.call(options, error, orderId);
3959
+ }
3960
+ });
3961
+ }
3962
+
3963
+ // src/execution/use-withdraw-managed.ts
3964
+ import { useMutation as useMutation5, useQueryClient as useQueryClient6 } from "@tanstack/react-query";
3965
+ function useWithdrawManaged(options) {
3966
+ const client = useAggClient();
3967
+ const queryClient = useQueryClient6();
3968
+ return useMutation5({
3820
3969
  mutationFn: (params) => client.withdrawManaged(params),
3821
3970
  onSuccess: (data) => {
3822
3971
  var _a;
@@ -3924,11 +4073,11 @@ function useDepositAddresses(options) {
3924
4073
  }
3925
4074
 
3926
4075
  // src/execution/use-sync-balances.ts
3927
- import { useMutation as useMutation4, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
4076
+ import { useMutation as useMutation6, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
3928
4077
  function useSyncBalances(options) {
3929
4078
  const client = useAggClient();
3930
- const queryClient = useQueryClient5();
3931
- return useMutation4({
4079
+ const queryClient = useQueryClient7();
4080
+ return useMutation6({
3932
4081
  mutationFn: () => client.syncManagedBalances(),
3933
4082
  onSuccess: () => {
3934
4083
  var _a;
@@ -4459,7 +4608,7 @@ var computeClosedPositionTotals = (group) => {
4459
4608
  };
4460
4609
 
4461
4610
  // src/execution/use-redeem.ts
4462
- import { useMutation as useMutation5, useQueryClient as useQueryClient6 } from "@tanstack/react-query";
4611
+ import { useMutation as useMutation7, useQueryClient as useQueryClient8 } from "@tanstack/react-query";
4463
4612
  var RedeemRejectedError = class extends Error {
4464
4613
  constructor(message, response) {
4465
4614
  super(message);
@@ -4470,8 +4619,8 @@ var RedeemRejectedError = class extends Error {
4470
4619
  var isLegRejected = (status) => status === "ineligible" || status === "rejected";
4471
4620
  var useRedeem = () => {
4472
4621
  const client = useAggClient();
4473
- const queryClient = useQueryClient6();
4474
- return useMutation5({
4622
+ const queryClient = useQueryClient8();
4623
+ return useMutation7({
4475
4624
  mutationFn: (body) => __async(null, null, function* () {
4476
4625
  const response = yield client.redeem(body);
4477
4626
  if (response.results.length > 0 && response.results.every((r) => isLegRejected(r.status))) {
@@ -4738,6 +4887,8 @@ export {
4738
4887
  AggProvider,
4739
4888
  useQuoteManaged,
4740
4889
  useExecuteManaged,
4890
+ usePlaceLimitOrder,
4891
+ useCancelManagedOrder,
4741
4892
  useWithdrawManaged,
4742
4893
  useManagedBalances,
4743
4894
  usePositions,
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __async,
3
3
  useAggClient
4
- } from "./chunk-CAG2RCHR.mjs";
4
+ } from "./chunk-5NJBAP42.mjs";
5
5
 
6
6
  // src/use-ramp-quotes.ts
7
7
  import { useMutation } from "@tanstack/react-query";
@@ -11,7 +11,7 @@ import {
11
11
  useOnWithdrawalLifecycle,
12
12
  useSyncBalances,
13
13
  useWithdrawManaged
14
- } from "./chunk-CAG2RCHR.mjs";
14
+ } from "./chunk-5NJBAP42.mjs";
15
15
 
16
16
  // src/withdraw/use-withdraw-flow.ts
17
17
  import { useCallback, useEffect, useMemo, useState } from "react";
package/dist/deposit.js CHANGED
@@ -400,8 +400,14 @@ var enUsLabels = {
400
400
  categoryTabsAria: "Home page category tabs"
401
401
  },
402
402
  userProfile: {
403
+ tabs: {
404
+ positions: "Positions",
405
+ openOrders: "Open orders",
406
+ activity: "Activity"
407
+ },
403
408
  balance: {
404
409
  availableBalance: "Available Balance",
410
+ reservedForOpenOrders: (amount) => `${amount} reserved for open orders`,
405
411
  balanceByNetwork: "Balance by network",
406
412
  paperModeNetwork: "Paper",
407
413
  paperModeWarning: "Paper mode is enabled. These are simulated funds for paper trading.",
@@ -484,6 +490,25 @@ var enUsLabels = {
484
490
  avgPrefix: "avg",
485
491
  nowPrefix: "now",
486
492
  finalPrefix: "final"
493
+ },
494
+ openOrders: {
495
+ marketHeader: "Market",
496
+ limitPriceHeader: "Limit price",
497
+ filledHeader: "Filled",
498
+ totalHeader: "Total",
499
+ filledShort: "Filled",
500
+ totalShort: "Total",
501
+ expirationHeader: "Expiration",
502
+ goodTilCanceled: "Good 'til canceled",
503
+ expired: "Expired",
504
+ cancel: "Cancel",
505
+ cancelOrderAria: (orderId) => `Cancel order ${orderId}`,
506
+ loading: "Loading open orders",
507
+ loadingMore: "Loading more open orders",
508
+ errorTitle: "Unable to load open orders",
509
+ errorDescription: "Please try again in a moment.",
510
+ emptyTitle: "No open orders",
511
+ emptyDescription: "Your open limit orders will appear here."
487
512
  }
488
513
  },
489
514
  eventList: {
@@ -729,6 +754,29 @@ var enUsLabels = {
729
754
  kycSuccessDone: "Done",
730
755
  outcome: (label) => `Outcome: ${label}`,
731
756
  smartRouting: "Smart Routing",
757
+ orderTypeMarket: "Market",
758
+ orderTypeLimit: "Limit",
759
+ orderTypeAria: "Order type",
760
+ limitPrice: "Limit price",
761
+ limitPriceInputAria: "Limit price in cents",
762
+ limitPriceInvalid: "Limit price must be greater than 0 and less than 100.",
763
+ limitPriceDecreaseAria: "Decrease limit price",
764
+ limitPriceIncreaseAria: "Increase limit price",
765
+ expiration: "Expiration",
766
+ expirationGoodTilCanceled: "Good 'til canceled",
767
+ expirationFiveMinutes: "5m",
768
+ expirationOneHour: "1h",
769
+ expirationEndOfDay: "End of day (EST)",
770
+ expirationCustom: "Custom",
771
+ expirationMenuAria: "Choose expiration",
772
+ expirationOptions: "Expiration options",
773
+ expirationDateAria: "Limit order expiration date",
774
+ expirationStartTime: "Start time",
775
+ expirationStartTimeHint: "24-hour format",
776
+ expirationCancel: "Cancel",
777
+ expirationApply: "Apply",
778
+ limitOrderPlacedTitle: "Limit order placed",
779
+ limitOrderPlacedDescription: "Your limit order has been submitted.",
732
780
  orderSplitting: "Order Splitting",
733
781
  splitOrderDescription: "We split your order for the best price:",
734
782
  viewAllRoutes: (count) => `View all (${count})`,
@@ -994,6 +1042,12 @@ var enUsLabels = {
994
1042
  const venue = venueLabel ? ` on ${venueLabel}` : "";
995
1043
  return `${action}${amount}${price}${venue}`.trim();
996
1044
  },
1045
+ cancelledTitle: "Order canceled",
1046
+ cancelledMessage: "Your open order was canceled.",
1047
+ cancelPendingTitle: "Cancellation submitted",
1048
+ cancelPendingMessage: "Your cancellation request is being processed.",
1049
+ cancelFailedTitle: "Cancellation failed",
1050
+ cancelFailedMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Your open order could not be canceled. Please try again.",
997
1051
  failedTitle: "Order failed",
998
1052
  failedMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Your order could not be completed. Please try again."
999
1053
  },
@@ -1113,6 +1167,7 @@ var defaultAggUiConfig = {
1113
1167
  enableGradients: false,
1114
1168
  enableVenueEventDiscoveryFilters: false,
1115
1169
  enableNotifications: true,
1170
+ showLimitOrders: false,
1116
1171
  showSportsMarkets: false
1117
1172
  },
1118
1173
  market: {
package/dist/deposit.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  useRampQuotes,
3
3
  useRampSession
4
- } from "./chunk-4IRZFXAC.mjs";
4
+ } from "./chunk-DPY6RZNW.mjs";
5
5
  import {
6
6
  __async,
7
7
  useAggAuthState,
@@ -11,7 +11,7 @@ import {
11
11
  useDepositAddresses,
12
12
  useOptionalAggClient,
13
13
  useSyncBalances
14
- } from "./chunk-CAG2RCHR.mjs";
14
+ } from "./chunk-5NJBAP42.mjs";
15
15
 
16
16
  // src/deposit/normalize-wallet-error.ts
17
17
  function normalizeWalletError(error, supportedChains) {