@agg-build/hooks 4.18.2 → 4.19.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.
- package/README.md +9 -8
- package/dist/{chunk-SBGLJDPJ.mjs → chunk-3PDK5FZ4.mjs} +1 -1
- package/dist/{chunk-5B2F3GMC.mjs → chunk-YLIXR2QM.mjs} +1 -1
- package/dist/{chunk-ESDA4NZI.mjs → chunk-ZERDRL6N.mjs} +30 -0
- package/dist/deposit.js +30 -0
- package/dist/deposit.mjs +2 -2
- package/dist/index.d.mts +283 -2
- package/dist/index.d.ts +283 -2
- package/dist/index.js +155 -67
- package/dist/index.mjs +83 -29
- package/dist/withdraw.js +30 -0
- package/dist/withdraw.mjs +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -79,14 +79,15 @@ __export(src_exports, {
|
|
|
79
79
|
CONFIRMED_MATCH_STATUSES: () => CONFIRMED_MATCH_STATUSES,
|
|
80
80
|
DEFAULT_AGG_ROOT_CLASS_NAME: () => DEFAULT_AGG_ROOT_CLASS_NAME,
|
|
81
81
|
EventListStateProvider: () => EventListStateProvider,
|
|
82
|
+
LEADERBOARD_PERIODS: () => LEADERBOARD_PERIODS,
|
|
82
83
|
MAX_ORDER_VENUE_MARKET_IDS_PER_REQUEST: () => MAX_ORDER_VENUE_MARKET_IDS_PER_REQUEST,
|
|
83
84
|
MAX_PRICE_GAP_PCT: () => MAX_PRICE_GAP_PCT,
|
|
84
85
|
MIN_PRICE_GAP_PCT: () => MIN_PRICE_GAP_PCT,
|
|
85
86
|
MarketStatus: () => MarketStatus,
|
|
86
87
|
MatchStatus: () => MatchStatus,
|
|
87
88
|
MatchType: () => MatchType,
|
|
88
|
-
QueryClient: () =>
|
|
89
|
-
QueryClientProvider: () =>
|
|
89
|
+
QueryClient: () => import_react_query52.QueryClient,
|
|
90
|
+
QueryClientProvider: () => import_react_query52.QueryClientProvider,
|
|
90
91
|
RedeemRejectedError: () => RedeemRejectedError,
|
|
91
92
|
SPORTS_LIVE_POLL_INTERVAL_MS: () => SPORTS_LIVE_POLL_INTERVAL_MS,
|
|
92
93
|
SPORTS_SCHEDULED_POLL_INTERVAL_MS: () => SPORTS_SCHEDULED_POLL_INTERVAL_MS,
|
|
@@ -117,6 +118,8 @@ __export(src_exports, {
|
|
|
117
118
|
invalidateUserClaimState: () => invalidateUserClaimState,
|
|
118
119
|
invalidateUserMoneyState: () => invalidateUserMoneyState,
|
|
119
120
|
isVenueDisabledByConfig: () => isVenueDisabledByConfig,
|
|
121
|
+
leaderboardQueryKeys: () => leaderboardQueryKeys,
|
|
122
|
+
leaderboardRange: () => leaderboardRange,
|
|
120
123
|
mergeBestPricesPreferringLive: () => mergeBestPricesPreferringLive,
|
|
121
124
|
mergeRecurringCryptoWindows: () => mergeRecurringCryptoWindows,
|
|
122
125
|
normalizeVenueId: () => normalizeVenueId,
|
|
@@ -177,6 +180,7 @@ __export(src_exports, {
|
|
|
177
180
|
useHostedVenueActivity: () => useHostedVenueActivity,
|
|
178
181
|
useHostedVenueTransfers: () => useHostedVenueTransfers,
|
|
179
182
|
useLabels: () => useLabels,
|
|
183
|
+
useLeaderboard: () => useLeaderboard,
|
|
180
184
|
useLimitOrderVenueQuotes: () => useLimitOrderVenueQuotes,
|
|
181
185
|
useLinkAccount: () => useLinkAccount,
|
|
182
186
|
useLiveBestPriceCandidates: () => useLiveBestPriceCandidates,
|
|
@@ -206,7 +210,7 @@ __export(src_exports, {
|
|
|
206
210
|
usePaperOnboarding: () => usePaperOnboarding,
|
|
207
211
|
usePlaceLimitOrder: () => usePlaceLimitOrder,
|
|
208
212
|
usePositions: () => usePositions,
|
|
209
|
-
useQueryClient: () =>
|
|
213
|
+
useQueryClient: () => import_react_query52.useQueryClient,
|
|
210
214
|
useRampQuotes: () => useRampQuotes,
|
|
211
215
|
useRampSession: () => useRampSession,
|
|
212
216
|
useRecurringCryptoMarkets: () => useRecurringCryptoMarkets,
|
|
@@ -405,7 +409,7 @@ var getVenueOrder = (venue) => {
|
|
|
405
409
|
var sortVenues = (venues) => [...venues].sort((a, b) => getVenueOrder(a) - getVenueOrder(b));
|
|
406
410
|
|
|
407
411
|
// src/index.ts
|
|
408
|
-
var
|
|
412
|
+
var import_react_query52 = require("@tanstack/react-query");
|
|
409
413
|
|
|
410
414
|
// src/candle-store.ts
|
|
411
415
|
var import_sdk = require("@agg-build/sdk");
|
|
@@ -959,6 +963,10 @@ var enUsLabels = {
|
|
|
959
963
|
networkTooltipDescription: "Funds are stored across networks. We handle routing automatically, but keeping funds on the right network enables faster trades and lower fees. When depositing, you can choose your preferred network."
|
|
960
964
|
},
|
|
961
965
|
hostedBetdex: {
|
|
966
|
+
manageFunds: "Manage funds",
|
|
967
|
+
fromWallet: "Transfer from AGG wallet",
|
|
968
|
+
toWallet: "Use my AGG wallet",
|
|
969
|
+
transferToBetdex: "Transfer to BETDEX",
|
|
962
970
|
deposit: "Deposit USDC",
|
|
963
971
|
depositInstructions: {
|
|
964
972
|
production: "Send USDC on Solana to this BETDEX account address.",
|
|
@@ -1221,6 +1229,31 @@ var enUsLabels = {
|
|
|
1221
1229
|
readFullDetails: "Read full details",
|
|
1222
1230
|
showLess: "Show less"
|
|
1223
1231
|
},
|
|
1232
|
+
leaderboard: {
|
|
1233
|
+
title: "Leaderboard",
|
|
1234
|
+
subtitle: (appName, periodLabel) => `Top traders${appName ? ` on ${appName}` : ""} \xB7 ${periodLabel} \xB7 updates every 5 minutes`,
|
|
1235
|
+
periodLabel: "Period",
|
|
1236
|
+
rankByLabel: "Rank by",
|
|
1237
|
+
periods: { "1d": "24h", "7d": "7d", "30d": "30d", all: "All time" },
|
|
1238
|
+
metrics: { realizedPnl: "Profit & loss", volume: "Volume" },
|
|
1239
|
+
columns: {
|
|
1240
|
+
rank: "#",
|
|
1241
|
+
trader: "Trader",
|
|
1242
|
+
orders: "Trades",
|
|
1243
|
+
volume: "Volume",
|
|
1244
|
+
realizedPnl: "P&L"
|
|
1245
|
+
},
|
|
1246
|
+
tradesCount: (count) => `${count} ${count === 1 ? "trade" : "trades"}`,
|
|
1247
|
+
anonymousTrader: "Anonymous trader",
|
|
1248
|
+
you: "You",
|
|
1249
|
+
showMore: "Show more traders",
|
|
1250
|
+
loadingAria: "Loading leaderboard",
|
|
1251
|
+
emptyTitle: "No trades in this period yet",
|
|
1252
|
+
emptyDescription: "Rankings appear once traders place orders. Try a longer period or check back later.",
|
|
1253
|
+
errorTitle: "Couldn't load the leaderboard",
|
|
1254
|
+
errorDescription: "Something went wrong on our side. Try again in a moment.",
|
|
1255
|
+
pnlFootnote: "P&L is realized only: sells and settled markets, before fees. Volume counts both buys and sells. Trades are filled orders. Figures refresh every 5 minutes."
|
|
1256
|
+
},
|
|
1224
1257
|
marketDetails: {
|
|
1225
1258
|
loading: "Loading market details",
|
|
1226
1259
|
unavailableAria: "Market details unavailable",
|
|
@@ -1439,6 +1472,7 @@ var enUsLabels = {
|
|
|
1439
1472
|
tradingAccessVenues: "Venues",
|
|
1440
1473
|
tradingAccessAvailable: "Available",
|
|
1441
1474
|
tradingAccessAddKalshiAccount: "Add Kalshi Account",
|
|
1475
|
+
configureBetdexAccount: "Configure account",
|
|
1442
1476
|
outcome: (label) => `Outcome: ${label}`,
|
|
1443
1477
|
smartRouting: "Smart Routing",
|
|
1444
1478
|
limitRoutingCurrentPrice: (priceLabel, feeLabel) => feeLabel ? `Current ${priceLabel} \xB7 Fee ${feeLabel}` : `Current ${priceLabel}`,
|
|
@@ -6757,6 +6791,56 @@ function useUserActivity(options = {}) {
|
|
|
6757
6791
|
});
|
|
6758
6792
|
}
|
|
6759
6793
|
|
|
6794
|
+
// src/use-leaderboard.ts
|
|
6795
|
+
var import_react_query30 = require("@tanstack/react-query");
|
|
6796
|
+
var LEADERBOARD_PERIODS = ["1d", "7d", "30d", "all"];
|
|
6797
|
+
var utcDayKey = (d) => d.toISOString().slice(0, 10);
|
|
6798
|
+
function leaderboardRange(period, now = /* @__PURE__ */ new Date()) {
|
|
6799
|
+
if (period === "all") return {};
|
|
6800
|
+
const spanDays = period === "1d" ? 0 : period === "7d" ? 6 : 29;
|
|
6801
|
+
const from = new Date(
|
|
6802
|
+
Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate() - spanDays)
|
|
6803
|
+
);
|
|
6804
|
+
return { from: utcDayKey(from), to: utcDayKey(now) };
|
|
6805
|
+
}
|
|
6806
|
+
var leaderboardQueryKeys = {
|
|
6807
|
+
all: () => ["leaderboard"],
|
|
6808
|
+
list: (period, metric, limit) => ["leaderboard", period, metric, limit]
|
|
6809
|
+
};
|
|
6810
|
+
var LEADERBOARD_STALE_TIME_MS = 6e4;
|
|
6811
|
+
function useLeaderboard(options = {}) {
|
|
6812
|
+
var _a, _b;
|
|
6813
|
+
const client = useAggClient();
|
|
6814
|
+
const { period = "30d", metric = "realizedPnl", limit = 50, enabled = true } = options;
|
|
6815
|
+
const query = (0, import_react_query30.useInfiniteQuery)({
|
|
6816
|
+
queryKey: leaderboardQueryKeys.list(period, metric, limit),
|
|
6817
|
+
queryFn: ({ pageParam }) => client.getLeaderboard(__spreadProps(__spreadValues({}, leaderboardRange(period)), {
|
|
6818
|
+
metric,
|
|
6819
|
+
limit,
|
|
6820
|
+
cursor: pageParam
|
|
6821
|
+
})),
|
|
6822
|
+
initialPageParam: void 0,
|
|
6823
|
+
getNextPageParam: (lastPage) => {
|
|
6824
|
+
var _a2;
|
|
6825
|
+
return lastPage.hasMore ? (_a2 = lastPage.nextCursor) != null ? _a2 : void 0 : void 0;
|
|
6826
|
+
},
|
|
6827
|
+
enabled,
|
|
6828
|
+
// Keep the previous list on screen while a period/metric switch loads.
|
|
6829
|
+
placeholderData: import_react_query30.keepPreviousData,
|
|
6830
|
+
staleTime: LEADERBOARD_STALE_TIME_MS
|
|
6831
|
+
});
|
|
6832
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6833
|
+
const rows = ((_b = (_a = query.data) == null ? void 0 : _a.pages.flatMap((page) => page.data)) != null ? _b : []).filter((row) => {
|
|
6834
|
+
if (seen.has(row.userId)) return false;
|
|
6835
|
+
seen.add(row.userId);
|
|
6836
|
+
return true;
|
|
6837
|
+
});
|
|
6838
|
+
return __spreadProps(__spreadValues({}, query), {
|
|
6839
|
+
rows,
|
|
6840
|
+
hasNextPage: !!query.hasNextPage
|
|
6841
|
+
});
|
|
6842
|
+
}
|
|
6843
|
+
|
|
6760
6844
|
// src/use-external-id.ts
|
|
6761
6845
|
var import_react27 = require("react");
|
|
6762
6846
|
function useExternalId(options = {}) {
|
|
@@ -6787,12 +6871,12 @@ function useExternalId(options = {}) {
|
|
|
6787
6871
|
}
|
|
6788
6872
|
|
|
6789
6873
|
// src/use-execution-positions.ts
|
|
6790
|
-
var
|
|
6874
|
+
var import_react_query31 = require("@tanstack/react-query");
|
|
6791
6875
|
function useExecutionPositions(options = {}) {
|
|
6792
6876
|
var _a, _b;
|
|
6793
6877
|
const client = useAggClient();
|
|
6794
6878
|
const { limit = 50, status, mode, enabled = true } = options;
|
|
6795
|
-
const query = (0,
|
|
6879
|
+
const query = (0, import_react_query31.useInfiniteQuery)({
|
|
6796
6880
|
queryKey: executionKeys.positions(null, limit, status != null ? status : null, mode != null ? mode : null),
|
|
6797
6881
|
queryFn: ({ pageParam }) => client.getExecutionPositions(__spreadProps(__spreadValues({
|
|
6798
6882
|
limit,
|
|
@@ -6823,11 +6907,11 @@ var import_react30 = require("react");
|
|
|
6823
6907
|
var import_sdk6 = require("@agg-build/sdk");
|
|
6824
6908
|
|
|
6825
6909
|
// src/use-market-chart.ts
|
|
6826
|
-
var
|
|
6910
|
+
var import_react_query33 = require("@tanstack/react-query");
|
|
6827
6911
|
|
|
6828
6912
|
// src/read-retry.ts
|
|
6829
6913
|
var import_sdk3 = require("@agg-build/sdk");
|
|
6830
|
-
var
|
|
6914
|
+
var import_react_query32 = require("@tanstack/react-query");
|
|
6831
6915
|
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
6832
6916
|
var hint = (error) => {
|
|
6833
6917
|
if (!(0, import_sdk3.isAggApiError)(error)) return void 0;
|
|
@@ -6839,7 +6923,7 @@ function withReadRetry(options) {
|
|
|
6839
6923
|
retry: (failureCount, error) => {
|
|
6840
6924
|
var _a, _b;
|
|
6841
6925
|
if (((_a = hint(error)) != null ? _a : 0) > MAX_TIMER_DELAY_MS) return false;
|
|
6842
|
-
const retry = (_b = options.retry) != null ? _b :
|
|
6926
|
+
const retry = (_b = options.retry) != null ? _b : import_react_query32.isServer ? 0 : 3;
|
|
6843
6927
|
return typeof retry === "function" ? retry(failureCount, error) : retry === true || typeof retry === "number" && failureCount < retry;
|
|
6844
6928
|
},
|
|
6845
6929
|
retryDelay: (attempt, error) => {
|
|
@@ -7227,7 +7311,7 @@ function useMarketDataSubscription({
|
|
|
7227
7311
|
function useMarketChartQueries(options) {
|
|
7228
7312
|
var _a, _b;
|
|
7229
7313
|
const client = useAggClient();
|
|
7230
|
-
const queryClient = (0,
|
|
7314
|
+
const queryClient = (0, import_react_query33.useQueryClient)();
|
|
7231
7315
|
const socket = useAggWebSocket();
|
|
7232
7316
|
const isConnected = useAggWebSocketConnectionState();
|
|
7233
7317
|
const {
|
|
@@ -7270,7 +7354,7 @@ function useMarketChartQueries(options) {
|
|
|
7270
7354
|
orderbook: true,
|
|
7271
7355
|
trades: true
|
|
7272
7356
|
});
|
|
7273
|
-
const queries = (0,
|
|
7357
|
+
const queries = (0, import_react_query33.useQueries)({
|
|
7274
7358
|
queries: outcomeIds.map((outcomeId) => __spreadProps(__spreadValues({
|
|
7275
7359
|
// Cache key is intentionally time-free. The rolling window's
|
|
7276
7360
|
// startTs/endTs advance on every bucket but the user expects the same
|
|
@@ -7344,7 +7428,7 @@ function useMarketChartQueries(options) {
|
|
|
7344
7428
|
},
|
|
7345
7429
|
retryDelay: (_attempt, error) => error instanceof ChartDeliveryError && error.retryAfterMs != null ? Math.min(error.state === "warming" ? 1e3 : 5e3, Math.max(0, error.retryAfterMs)) : 1e3
|
|
7346
7430
|
})), {
|
|
7347
|
-
placeholderData:
|
|
7431
|
+
placeholderData: import_react_query33.keepPreviousData,
|
|
7348
7432
|
refetchInterval: (query) => chartRefetchInterval(
|
|
7349
7433
|
query,
|
|
7350
7434
|
refetchIntervalMs != null && refetchIntervalMs > 0 ? refetchIntervalMs : false
|
|
@@ -7671,7 +7755,7 @@ function useEventOrderbookData(venueMarkets, selectedMarketId) {
|
|
|
7671
7755
|
}
|
|
7672
7756
|
|
|
7673
7757
|
// src/use-market-orderbook.ts
|
|
7674
|
-
var
|
|
7758
|
+
var import_react_query34 = require("@tanstack/react-query");
|
|
7675
7759
|
|
|
7676
7760
|
// src/market-data/orderbook-snapshot.ts
|
|
7677
7761
|
var orderbookTimestampSeconds = (timestamp) => timestamp >= 1e12 ? timestamp / 1e3 : timestamp;
|
|
@@ -7936,7 +8020,7 @@ function selectOrderbookSnapshots(client, store, ids, socketHealthy, signal) {
|
|
|
7936
8020
|
// src/use-market-orderbook.ts
|
|
7937
8021
|
function useMarketOrderbook(options) {
|
|
7938
8022
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
7939
|
-
const queryClient = (0,
|
|
8023
|
+
const queryClient = (0, import_react_query34.useQueryClient)();
|
|
7940
8024
|
const client = useAggClient();
|
|
7941
8025
|
const ws = useAggWebSocket();
|
|
7942
8026
|
const isConnected = useAggWebSocketConnectionState();
|
|
@@ -7962,7 +8046,7 @@ function useMarketOrderbook(options) {
|
|
|
7962
8046
|
var _a2;
|
|
7963
8047
|
return ((_a2 = store.get(id).connectionGeneration) != null ? _a2 : 0) === 0;
|
|
7964
8048
|
}));
|
|
7965
|
-
const seedQuery = (0,
|
|
8049
|
+
const seedQuery = (0, import_react_query34.useQuery)({
|
|
7966
8050
|
queryKey: ["market-orderbook-seed", sortedIds],
|
|
7967
8051
|
queryFn: createOrderbookSnapshotQuery(client, store, sortedIds, preferSocket),
|
|
7968
8052
|
enabled: enabled && subscriptionIds.length > 0,
|
|
@@ -8402,7 +8486,7 @@ function useLiveTrades(canonicalMarketId) {
|
|
|
8402
8486
|
}
|
|
8403
8487
|
|
|
8404
8488
|
// src/use-midpoints.ts
|
|
8405
|
-
var
|
|
8489
|
+
var import_react_query35 = require("@tanstack/react-query");
|
|
8406
8490
|
var import_react35 = require("react");
|
|
8407
8491
|
var normalizeVenueMarketIds = (venueMarkets) => {
|
|
8408
8492
|
var _a;
|
|
@@ -8600,7 +8684,7 @@ function useMidpoints(venueMarkets, options) {
|
|
|
8600
8684
|
() => (venueMarkets != null ? venueMarkets : []).map((market) => market.id).filter(Boolean),
|
|
8601
8685
|
[venueMarkets]
|
|
8602
8686
|
);
|
|
8603
|
-
const { data, isLoading } = (0,
|
|
8687
|
+
const { data, isLoading } = (0, import_react_query35.useQuery)({
|
|
8604
8688
|
queryKey: ["midpoints", ids, maxMidpointIdsPerRequest],
|
|
8605
8689
|
queryFn: () => client.getMidpoints(ids, { bestPrice: true, maxMidpointIdsPerRequest }),
|
|
8606
8690
|
enabled: ids.length > 0,
|
|
@@ -8811,7 +8895,7 @@ function useArbFeed() {
|
|
|
8811
8895
|
}
|
|
8812
8896
|
|
|
8813
8897
|
// src/use-order-book.ts
|
|
8814
|
-
var
|
|
8898
|
+
var import_react_query36 = require("@tanstack/react-query");
|
|
8815
8899
|
var fetchBatchBookQuery = (client, venueMarketIds, { signal }) => client.getOrderbooks({ venueMarketIds }, { signal });
|
|
8816
8900
|
var createBatchBookQuery = (client, venueMarketIds) => fetchBatchBookQuery.bind(null, client, venueMarketIds);
|
|
8817
8901
|
function useOrderBook(options) {
|
|
@@ -8826,7 +8910,7 @@ function useOrderBook(options) {
|
|
|
8826
8910
|
venueMarketOutcomeId: outcome.id
|
|
8827
8911
|
})) : void 0
|
|
8828
8912
|
});
|
|
8829
|
-
const batchedResult = (0,
|
|
8913
|
+
const batchedResult = (0, import_react_query36.useQuery)({
|
|
8830
8914
|
queryKey: requestedVenueMarketIds.length ? ["orderbooks", requestedVenueMarketIds, null] : ["orderbooks", "__disabled__", null],
|
|
8831
8915
|
queryFn: createBatchBookQuery(client, requestedVenueMarketIds),
|
|
8832
8916
|
enabled: enabled && !canonicalMarketId && requestedVenueMarketIds.length > 0,
|
|
@@ -8834,7 +8918,7 @@ function useOrderBook(options) {
|
|
|
8834
8918
|
gcTime: 5 * 6e4,
|
|
8835
8919
|
refetchOnWindowFocus: false,
|
|
8836
8920
|
retry: 1,
|
|
8837
|
-
placeholderData:
|
|
8921
|
+
placeholderData: import_react_query36.keepPreviousData
|
|
8838
8922
|
});
|
|
8839
8923
|
const data = (() => {
|
|
8840
8924
|
var _a, _b;
|
|
@@ -8889,7 +8973,7 @@ function useOrderBook(options) {
|
|
|
8889
8973
|
}
|
|
8890
8974
|
|
|
8891
8975
|
// src/use-orderbook-quote.ts
|
|
8892
|
-
var
|
|
8976
|
+
var import_react_query37 = require("@tanstack/react-query");
|
|
8893
8977
|
var QUOTE_DEBOUNCE_MS = 300;
|
|
8894
8978
|
var createUnavailableOrderbookError = (message, code, retryable) => {
|
|
8895
8979
|
const error = new Error(message);
|
|
@@ -8951,7 +9035,7 @@ function useOrderbookQuote(options) {
|
|
|
8951
9035
|
const { marketId, side, size, enabled = true } = options;
|
|
8952
9036
|
const debouncedSize = useDebouncedValue(size, QUOTE_DEBOUNCE_MS);
|
|
8953
9037
|
const shouldFetch = enabled && !!marketId && debouncedSize > 0;
|
|
8954
|
-
const query = (0,
|
|
9038
|
+
const query = (0, import_react_query37.useQuery)({
|
|
8955
9039
|
queryKey: marketId ? marketDataKeys.orderbookQuote(marketId, side, debouncedSize) : ["market-data", "orderbook-quote", "__disabled__"],
|
|
8956
9040
|
queryFn: () => __async(null, null, function* () {
|
|
8957
9041
|
var _a2, _b, _c, _d;
|
|
@@ -8982,7 +9066,7 @@ function useOrderbookQuote(options) {
|
|
|
8982
9066
|
staleTime: 1e4,
|
|
8983
9067
|
gcTime: 5 * 6e4,
|
|
8984
9068
|
retry: 1,
|
|
8985
|
-
placeholderData:
|
|
9069
|
+
placeholderData: import_react_query37.keepPreviousData
|
|
8986
9070
|
});
|
|
8987
9071
|
return {
|
|
8988
9072
|
data: (_a = query.data) != null ? _a : null,
|
|
@@ -8993,12 +9077,12 @@ function useOrderbookQuote(options) {
|
|
|
8993
9077
|
}
|
|
8994
9078
|
|
|
8995
9079
|
// src/use-orders.ts
|
|
8996
|
-
var
|
|
9080
|
+
var import_react_query38 = require("@tanstack/react-query");
|
|
8997
9081
|
function useOrders(options = {}) {
|
|
8998
9082
|
var _a, _b, _c, _d;
|
|
8999
9083
|
const client = useAggClient();
|
|
9000
9084
|
const { userId, status, limit = 50, offset = 0, enabled = true } = options;
|
|
9001
|
-
const query = (0,
|
|
9085
|
+
const query = (0, import_react_query38.useQuery)({
|
|
9002
9086
|
queryKey: ["orders", userId != null ? userId : "me", status != null ? status : "all", limit, offset],
|
|
9003
9087
|
queryFn: () => client.getOrders({
|
|
9004
9088
|
userId,
|
|
@@ -9015,13 +9099,13 @@ function useOrders(options = {}) {
|
|
|
9015
9099
|
}
|
|
9016
9100
|
|
|
9017
9101
|
// src/use-search.ts
|
|
9018
|
-
var
|
|
9102
|
+
var import_react_query39 = require("@tanstack/react-query");
|
|
9019
9103
|
var import_react38 = require("react");
|
|
9020
9104
|
function useSearch(options) {
|
|
9021
9105
|
var _a, _b, _c, _d;
|
|
9022
9106
|
const client = (0, import_react38.useContext)(AggClientContext);
|
|
9023
|
-
const queryClient = (0, import_react38.useContext)(
|
|
9024
|
-
const [fallbackQueryClient] = (0, import_react38.useState)(() => new
|
|
9107
|
+
const queryClient = (0, import_react38.useContext)(import_react_query39.QueryClientContext);
|
|
9108
|
+
const [fallbackQueryClient] = (0, import_react38.useState)(() => new import_react_query39.QueryClient());
|
|
9025
9109
|
const {
|
|
9026
9110
|
q,
|
|
9027
9111
|
type,
|
|
@@ -9055,7 +9139,7 @@ function useSearch(options) {
|
|
|
9055
9139
|
];
|
|
9056
9140
|
const effectiveQueryClient = queryClient != null ? queryClient : fallbackQueryClient;
|
|
9057
9141
|
const retryOptions = withReadRetry(effectiveQueryClient.defaultQueryOptions({ queryKey }));
|
|
9058
|
-
const query = (0,
|
|
9142
|
+
const query = (0, import_react_query39.useInfiniteQuery)(
|
|
9059
9143
|
__spreadProps(__spreadValues({
|
|
9060
9144
|
// deep is part of the key — TanStack treats deep vs light as
|
|
9061
9145
|
// independent queries so users can have both modes cached side-by-side.
|
|
@@ -9085,7 +9169,7 @@ function useSearch(options) {
|
|
|
9085
9169
|
if (!lastPage.hasMore) return void 0;
|
|
9086
9170
|
return (_a2 = lastPage.nextCursor) != null ? _a2 : void 0;
|
|
9087
9171
|
},
|
|
9088
|
-
placeholderData:
|
|
9172
|
+
placeholderData: import_react_query39.keepPreviousData
|
|
9089
9173
|
}, retryOptions), {
|
|
9090
9174
|
enabled: isEnabled && !!client
|
|
9091
9175
|
}),
|
|
@@ -9195,7 +9279,7 @@ function useMarketSearch(options) {
|
|
|
9195
9279
|
}
|
|
9196
9280
|
|
|
9197
9281
|
// src/use-smart-route.ts
|
|
9198
|
-
var
|
|
9282
|
+
var import_react_query40 = require("@tanstack/react-query");
|
|
9199
9283
|
|
|
9200
9284
|
// src/smart-route-refresh-policy.ts
|
|
9201
9285
|
var THIN_SMART_ROUTE_REFETCH_INTERVAL_MS = 5e3;
|
|
@@ -9359,7 +9443,7 @@ function useSmartRoute(options) {
|
|
|
9359
9443
|
const resolvedVenueMarketOutcomeId = (_a = venueMarketOutcomeId != null ? venueMarketOutcomeId : venueMarketId) != null ? _a : outcomeId;
|
|
9360
9444
|
const hasValidInput = (maxSpend != null ? maxSpend : 0) > 0 || (sellShares != null ? sellShares : 0) > 0;
|
|
9361
9445
|
const queryEnabled = enabled && !!resolvedVenueMarketOutcomeId && hasValidInput;
|
|
9362
|
-
const query = (0,
|
|
9446
|
+
const query = (0, import_react_query40.useQuery)({
|
|
9363
9447
|
queryKey: [
|
|
9364
9448
|
"smart-route",
|
|
9365
9449
|
resolvedVenueMarketOutcomeId,
|
|
@@ -9422,7 +9506,7 @@ function useSmartRoute(options) {
|
|
|
9422
9506
|
// a different amount or position snapshot. Never expose it under a new
|
|
9423
9507
|
// sell key while the replacement request is in flight. BUY retains the
|
|
9424
9508
|
// existing no-flicker behavior.
|
|
9425
|
-
placeholderData: tradeSide === "sell" ? void 0 :
|
|
9509
|
+
placeholderData: tradeSide === "sell" ? void 0 : import_react_query40.keepPreviousData
|
|
9426
9510
|
});
|
|
9427
9511
|
const error = query.error;
|
|
9428
9512
|
let loadingReason = null;
|
|
@@ -9444,7 +9528,7 @@ function useSmartRoute(options) {
|
|
|
9444
9528
|
}
|
|
9445
9529
|
|
|
9446
9530
|
// src/use-limit-order-venue-quotes.ts
|
|
9447
|
-
var
|
|
9531
|
+
var import_react_query41 = require("@tanstack/react-query");
|
|
9448
9532
|
var getIsDocumentVisible2 = () => {
|
|
9449
9533
|
if (typeof document === "undefined") return true;
|
|
9450
9534
|
return document.visibilityState !== "hidden";
|
|
@@ -9499,7 +9583,7 @@ var useLimitOrderVenueQuotes = (options) => {
|
|
|
9499
9583
|
const hasRequiredAccount = tradeSide === "buy" || Boolean(accountId);
|
|
9500
9584
|
const queryEnabled = enabled && hasValidInput && hasRequiredAccount;
|
|
9501
9585
|
const serializedChainBalances = chainBalances ? JSON.stringify(chainBalances) : null;
|
|
9502
|
-
const tickMetadataQuery = (0,
|
|
9586
|
+
const tickMetadataQuery = (0, import_react_query41.useQuery)({
|
|
9503
9587
|
queryKey: ["orderbooks", marketId != null ? marketId : "__disabled__", "limit-order-ticks"],
|
|
9504
9588
|
queryFn: ({ signal }) => client.getOrderbooks({ venueMarketIds: [marketId] }, { signal }),
|
|
9505
9589
|
enabled: enabled && Boolean(marketId),
|
|
@@ -9508,7 +9592,7 @@ var useLimitOrderVenueQuotes = (options) => {
|
|
|
9508
9592
|
refetchOnWindowFocus: false,
|
|
9509
9593
|
retry: 1
|
|
9510
9594
|
});
|
|
9511
|
-
const queries = (0,
|
|
9595
|
+
const queries = (0, import_react_query41.useQueries)({
|
|
9512
9596
|
queries: uniqueRequests.map((request) => ({
|
|
9513
9597
|
queryKey: [
|
|
9514
9598
|
"smart-route",
|
|
@@ -9540,7 +9624,7 @@ var useLimitOrderVenueQuotes = (options) => {
|
|
|
9540
9624
|
);
|
|
9541
9625
|
}),
|
|
9542
9626
|
enabled: queryEnabled,
|
|
9543
|
-
placeholderData:
|
|
9627
|
+
placeholderData: import_react_query41.keepPreviousData,
|
|
9544
9628
|
staleTime: staleTimeMs,
|
|
9545
9629
|
refetchInterval: (queryState) => {
|
|
9546
9630
|
var _a2, _b2, _c, _d;
|
|
@@ -9590,7 +9674,7 @@ var useLimitOrderVenueQuotes = (options) => {
|
|
|
9590
9674
|
};
|
|
9591
9675
|
|
|
9592
9676
|
// src/use-venue-sell-quotes.ts
|
|
9593
|
-
var
|
|
9677
|
+
var import_react_query42 = require("@tanstack/react-query");
|
|
9594
9678
|
var getIsDocumentVisible3 = () => {
|
|
9595
9679
|
if (typeof document === "undefined") return true;
|
|
9596
9680
|
return document.visibilityState !== "hidden";
|
|
@@ -9621,7 +9705,7 @@ var useVenueSellQuotes = (options) => {
|
|
|
9621
9705
|
refreshContext
|
|
9622
9706
|
} = options;
|
|
9623
9707
|
const uniqueRequests = getUniqueVenueRequests2(requests);
|
|
9624
|
-
const queries = (0,
|
|
9708
|
+
const queries = (0, import_react_query42.useQueries)({
|
|
9625
9709
|
queries: uniqueRequests.map((request) => {
|
|
9626
9710
|
const hasValidInput = request.requestedSellShares > 0 && request.sellShares > 0 && request.availableShares > 0;
|
|
9627
9711
|
const queryEnabled = enabled && !!venueMarketOutcomeId && !!accountId && hasValidInput;
|
|
@@ -9705,12 +9789,12 @@ var useVenueSellQuotes = (options) => {
|
|
|
9705
9789
|
};
|
|
9706
9790
|
|
|
9707
9791
|
// src/use-user-holdings.ts
|
|
9708
|
-
var
|
|
9792
|
+
var import_react_query43 = require("@tanstack/react-query");
|
|
9709
9793
|
function useUserHoldings(options) {
|
|
9710
9794
|
var _a, _b;
|
|
9711
9795
|
const client = useAggClient();
|
|
9712
9796
|
const { venue, venueMarketId, venueEventId, enabled = true } = options;
|
|
9713
|
-
const query = (0,
|
|
9797
|
+
const query = (0, import_react_query43.useInfiniteQuery)({
|
|
9714
9798
|
queryKey: ["user-holdings", venue, venueMarketId, venueEventId],
|
|
9715
9799
|
queryFn: (_0) => __async(null, [_0], function* ({ pageParam }) {
|
|
9716
9800
|
return client.getUserHoldings({
|
|
@@ -9739,10 +9823,10 @@ function useUserHoldings(options) {
|
|
|
9739
9823
|
var import_react41 = require("react");
|
|
9740
9824
|
|
|
9741
9825
|
// src/use-venue-event.ts
|
|
9742
|
-
var
|
|
9826
|
+
var import_react_query45 = require("@tanstack/react-query");
|
|
9743
9827
|
|
|
9744
9828
|
// src/use-recurring-crypto-markets.ts
|
|
9745
|
-
var
|
|
9829
|
+
var import_react_query44 = require("@tanstack/react-query");
|
|
9746
9830
|
var RESOLVING_POLL_INTERVAL_MS = 15e3;
|
|
9747
9831
|
var FALLBACK_VENUE_EVENT_PAGE_LIMIT = 100;
|
|
9748
9832
|
var FALLBACK_VENUE_EVENT_MAX_PAGES = 5;
|
|
@@ -10242,7 +10326,7 @@ var useRecurringCryptoMarkets = ({
|
|
|
10242
10326
|
const client = useAggClient();
|
|
10243
10327
|
const identity = event ? resolveRecurringCryptoIdentity(event) : null;
|
|
10244
10328
|
const isEnabled = enabled && event != null && identity != null;
|
|
10245
|
-
const query = (0,
|
|
10329
|
+
const query = (0, import_react_query44.useQuery)({
|
|
10246
10330
|
queryKey: [
|
|
10247
10331
|
"recurring-crypto-markets",
|
|
10248
10332
|
event == null ? void 0 : event.id,
|
|
@@ -10304,7 +10388,7 @@ function useVenueEvent(options) {
|
|
|
10304
10388
|
var _a;
|
|
10305
10389
|
const client = useAggClient();
|
|
10306
10390
|
const { eventId, enabled = true, cluster } = options;
|
|
10307
|
-
const query = (0,
|
|
10391
|
+
const query = (0, import_react_query45.useQuery)({
|
|
10308
10392
|
queryKey: ["venue-event", eventId, cluster === false ? "no-cluster" : ""],
|
|
10309
10393
|
queryFn: (_0) => __async(null, [_0], function* ({ signal }) {
|
|
10310
10394
|
return client.getVenueEventById(eventId, { signal, cluster });
|
|
@@ -10324,13 +10408,13 @@ function useVenueEvent(options) {
|
|
|
10324
10408
|
}
|
|
10325
10409
|
|
|
10326
10410
|
// src/use-venue-markets.ts
|
|
10327
|
-
var
|
|
10411
|
+
var import_react_query46 = require("@tanstack/react-query");
|
|
10328
10412
|
var import_react40 = require("react");
|
|
10329
10413
|
function useVenueMarkets(options) {
|
|
10330
10414
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
|
10331
10415
|
const client = (0, import_react40.useContext)(AggClientContext);
|
|
10332
|
-
const queryClient = (0, import_react40.useContext)(
|
|
10333
|
-
const [fallbackQueryClient] = (0, import_react40.useState)(() => new
|
|
10416
|
+
const queryClient = (0, import_react40.useContext)(import_react_query46.QueryClientContext);
|
|
10417
|
+
const [fallbackQueryClient] = (0, import_react40.useState)(() => new import_react_query46.QueryClient());
|
|
10334
10418
|
const venue = options == null ? void 0 : options.venue;
|
|
10335
10419
|
const venueEventId = options == null ? void 0 : options.venueEventId;
|
|
10336
10420
|
const cluster = options == null ? void 0 : options.cluster;
|
|
@@ -10357,7 +10441,7 @@ function useVenueMarkets(options) {
|
|
|
10357
10441
|
if (enabled && !client) {
|
|
10358
10442
|
throw new Error("useVenueMarkets must be used within an <AggProvider>");
|
|
10359
10443
|
}
|
|
10360
|
-
const query = (0,
|
|
10444
|
+
const query = (0, import_react_query46.useInfiniteQuery)(
|
|
10361
10445
|
{
|
|
10362
10446
|
queryKey: [
|
|
10363
10447
|
"venue-markets",
|
|
@@ -10489,13 +10573,13 @@ function useEnrichedVenueEvent(options) {
|
|
|
10489
10573
|
}
|
|
10490
10574
|
|
|
10491
10575
|
// src/use-venue-events.ts
|
|
10492
|
-
var
|
|
10576
|
+
var import_react_query47 = require("@tanstack/react-query");
|
|
10493
10577
|
var import_react42 = require("react");
|
|
10494
10578
|
function useVenueEvents(options) {
|
|
10495
10579
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
|
10496
10580
|
const client = (0, import_react42.useContext)(AggClientContext);
|
|
10497
|
-
const queryClient = (0, import_react42.useContext)(
|
|
10498
|
-
const [fallbackQueryClient] = (0, import_react42.useState)(() => new
|
|
10581
|
+
const queryClient = (0, import_react42.useContext)(import_react_query47.QueryClientContext);
|
|
10582
|
+
const [fallbackQueryClient] = (0, import_react42.useState)(() => new import_react_query47.QueryClient());
|
|
10499
10583
|
const venues = options == null ? void 0 : options.venues;
|
|
10500
10584
|
const search = options == null ? void 0 : options.search;
|
|
10501
10585
|
const categoryIds = options == null ? void 0 : options.categoryIds;
|
|
@@ -10522,7 +10606,7 @@ function useVenueEvents(options) {
|
|
|
10522
10606
|
if (enabled && !client) {
|
|
10523
10607
|
throw new Error("useVenueEvents must be used within an <AggProvider>");
|
|
10524
10608
|
}
|
|
10525
|
-
const query = (0,
|
|
10609
|
+
const query = (0, import_react_query47.useInfiniteQuery)(
|
|
10526
10610
|
{
|
|
10527
10611
|
queryKey: [
|
|
10528
10612
|
queryKeyScope,
|
|
@@ -10570,7 +10654,7 @@ function useVenueEvents(options) {
|
|
|
10570
10654
|
return (_a2 = lastPage.nextCursor) != null ? _a2 : void 0;
|
|
10571
10655
|
},
|
|
10572
10656
|
// TODO: RMIK - Comment out to show skeletons on category switch
|
|
10573
|
-
placeholderData:
|
|
10657
|
+
placeholderData: import_react_query47.keepPreviousData,
|
|
10574
10658
|
enabled: enabled && !!client
|
|
10575
10659
|
},
|
|
10576
10660
|
queryClient != null ? queryClient : fallbackQueryClient
|
|
@@ -10618,7 +10702,7 @@ function useVenueEvents(options) {
|
|
|
10618
10702
|
}
|
|
10619
10703
|
|
|
10620
10704
|
// src/use-sports-live.ts
|
|
10621
|
-
var
|
|
10705
|
+
var import_react_query48 = require("@tanstack/react-query");
|
|
10622
10706
|
var SPORTS_LIVE_POLL_INTERVAL_MS = 5e3;
|
|
10623
10707
|
var SPORTS_SCHEDULED_POLL_INTERVAL_MS = 3e4;
|
|
10624
10708
|
var sportsLiveQueryKey = (sortedEventIds) => ["sports-live", ...sortedEventIds];
|
|
@@ -10638,7 +10722,7 @@ var useSportsLive = (eventIds, enabled = true) => {
|
|
|
10638
10722
|
const sortedEventIds = [
|
|
10639
10723
|
...new Set(eventIds.map((eventId) => eventId.trim()).filter(Boolean))
|
|
10640
10724
|
].sort();
|
|
10641
|
-
const query = (0,
|
|
10725
|
+
const query = (0, import_react_query48.useQuery)({
|
|
10642
10726
|
queryKey: sportsLiveQueryKey(sortedEventIds),
|
|
10643
10727
|
queryFn: ({ signal }) => client.getSportsLive(sortedEventIds, { signal }),
|
|
10644
10728
|
enabled: enabled && sortedEventIds.length > 0,
|
|
@@ -10658,7 +10742,7 @@ var useSportsLive = (eventIds, enabled = true) => {
|
|
|
10658
10742
|
};
|
|
10659
10743
|
|
|
10660
10744
|
// src/use-venue-market-midpoints.ts
|
|
10661
|
-
var
|
|
10745
|
+
var import_react_query49 = require("@tanstack/react-query");
|
|
10662
10746
|
var normalizeVenueMarketIds2 = (venueMarketIds) => {
|
|
10663
10747
|
return [
|
|
10664
10748
|
...new Set(venueMarketIds.map((venueMarketId) => venueMarketId.trim()).filter(Boolean))
|
|
@@ -10697,7 +10781,7 @@ function useVenueMarketMidpoints(options) {
|
|
|
10697
10781
|
const enabled = (_a = options.enabled) != null ? _a : true;
|
|
10698
10782
|
const requestedVenueMarketIds = normalizeVenueMarketIds2(options.venueMarketIds);
|
|
10699
10783
|
const maxMidpointIdsPerRequest = (_b = options.maxMidpointIdsPerRequest) != null ? _b : configuredMaxMidpointIdsPerRequest;
|
|
10700
|
-
const query = (0,
|
|
10784
|
+
const query = (0, import_react_query49.useQuery)({
|
|
10701
10785
|
queryKey: requestedVenueMarketIds.length ? ["venue-market-midpoints", requestedVenueMarketIds, maxMidpointIdsPerRequest] : ["venue-market-midpoints", "__disabled__"],
|
|
10702
10786
|
queryFn: (_0) => __async(null, [_0], function* ({ signal }) {
|
|
10703
10787
|
if (requestedVenueMarketIds.length === 0) {
|
|
@@ -10713,7 +10797,7 @@ function useVenueMarketMidpoints(options) {
|
|
|
10713
10797
|
gcTime: 5 * 6e4,
|
|
10714
10798
|
refetchOnWindowFocus: false,
|
|
10715
10799
|
retry: 1,
|
|
10716
|
-
placeholderData:
|
|
10800
|
+
placeholderData: import_react_query49.keepPreviousData
|
|
10717
10801
|
});
|
|
10718
10802
|
const midpointRows = (_d = (_c = query.data) == null ? void 0 : _c.data) != null ? _d : [];
|
|
10719
10803
|
const midpointsByVenueMarketId = mapMidpointsByVenueMarketId(midpointRows);
|
|
@@ -11008,11 +11092,11 @@ function usePaperOnboarding() {
|
|
|
11008
11092
|
}
|
|
11009
11093
|
|
|
11010
11094
|
// src/use-settlement-details-data.ts
|
|
11011
|
-
var
|
|
11095
|
+
var import_react_query50 = require("@tanstack/react-query");
|
|
11012
11096
|
function useSettlementDetailsData(options) {
|
|
11013
11097
|
const client = useAggClient();
|
|
11014
11098
|
const { eventId, market, enabled, needsEvent, needsMarket } = options;
|
|
11015
|
-
const eventQuery = (0,
|
|
11099
|
+
const eventQuery = (0, import_react_query50.useQuery)({
|
|
11016
11100
|
queryKey: ["settlement-details", "event", client.appId, eventId],
|
|
11017
11101
|
queryFn: ({ signal }) => client.getVenueEventById(eventId, { signal }),
|
|
11018
11102
|
enabled: enabled && needsEvent,
|
|
@@ -11020,7 +11104,7 @@ function useSettlementDetailsData(options) {
|
|
|
11020
11104
|
gcTime: 10 * 6e4,
|
|
11021
11105
|
retry: false
|
|
11022
11106
|
});
|
|
11023
|
-
const marketQuery = (0,
|
|
11107
|
+
const marketQuery = (0, import_react_query50.useQuery)({
|
|
11024
11108
|
queryKey: ["settlement-details", "market", client.appId, market.id],
|
|
11025
11109
|
queryFn: (_0) => __async(null, [_0], function* ({ signal }) {
|
|
11026
11110
|
const response = yield client.getVenueMarkets(
|
|
@@ -11041,7 +11125,7 @@ function useSettlementDetailsData(options) {
|
|
|
11041
11125
|
|
|
11042
11126
|
// src/use-hosted-venue-transfers.ts
|
|
11043
11127
|
var import_react46 = require("react");
|
|
11044
|
-
var
|
|
11128
|
+
var import_react_query51 = require("@tanstack/react-query");
|
|
11045
11129
|
var validRequest = (value) => {
|
|
11046
11130
|
var _a;
|
|
11047
11131
|
const row = value;
|
|
@@ -11054,7 +11138,7 @@ function useHostedVenueTransfers(accountId, environment) {
|
|
|
11054
11138
|
const client = useAggClient();
|
|
11055
11139
|
const { user, isAuthenticated } = useAggAuthContext();
|
|
11056
11140
|
const { executionMode, isResolving } = useResolvedExecutionMode();
|
|
11057
|
-
const queryClient = (0,
|
|
11141
|
+
const queryClient = (0, import_react_query51.useQueryClient)();
|
|
11058
11142
|
const userId = (_a = user == null ? void 0 : user.id) != null ? _a : null;
|
|
11059
11143
|
const permitted = isAuthenticated && !!userId && !isResolving && executionMode === "live";
|
|
11060
11144
|
const scope = JSON.stringify([userId, accountId, environment]);
|
|
@@ -11093,7 +11177,7 @@ function useHostedVenueTransfers(accountId, environment) {
|
|
|
11093
11177
|
});
|
|
11094
11178
|
invalidateBalanceQueries(queryClient);
|
|
11095
11179
|
};
|
|
11096
|
-
const deposit = (0,
|
|
11180
|
+
const deposit = (0, import_react_query51.useMutation)({
|
|
11097
11181
|
mutationFn: () => __async(null, null, function* () {
|
|
11098
11182
|
assertSession();
|
|
11099
11183
|
const result2 = yield client.getHostedVenueDepositAddress("betdex", { mode: "live" });
|
|
@@ -11103,7 +11187,7 @@ function useHostedVenueTransfers(accountId, environment) {
|
|
|
11103
11187
|
}),
|
|
11104
11188
|
retry: false
|
|
11105
11189
|
});
|
|
11106
|
-
const withdrawal = (0,
|
|
11190
|
+
const withdrawal = (0, import_react_query51.useMutation)({
|
|
11107
11191
|
mutationFn: (request) => __async(null, null, function* () {
|
|
11108
11192
|
assertSession();
|
|
11109
11193
|
if (dispatching.current) throw new Error("Withdrawal request is already pending");
|
|
@@ -11122,7 +11206,7 @@ function useHostedVenueTransfers(accountId, environment) {
|
|
|
11122
11206
|
}),
|
|
11123
11207
|
retry: false
|
|
11124
11208
|
});
|
|
11125
|
-
const status = (0,
|
|
11209
|
+
const status = (0, import_react_query51.useQuery)({
|
|
11126
11210
|
queryKey: ["agg", "hosted-venue-withdrawal", scope, journal == null ? void 0 : journal.withdrawalId],
|
|
11127
11211
|
queryFn: () => __async(null, null, function* () {
|
|
11128
11212
|
assertSession();
|
|
@@ -11217,6 +11301,7 @@ function useHostedVenueTransfers(accountId, environment) {
|
|
|
11217
11301
|
CONFIRMED_MATCH_STATUSES,
|
|
11218
11302
|
DEFAULT_AGG_ROOT_CLASS_NAME,
|
|
11219
11303
|
EventListStateProvider,
|
|
11304
|
+
LEADERBOARD_PERIODS,
|
|
11220
11305
|
MAX_ORDER_VENUE_MARKET_IDS_PER_REQUEST,
|
|
11221
11306
|
MAX_PRICE_GAP_PCT,
|
|
11222
11307
|
MIN_PRICE_GAP_PCT,
|
|
@@ -11255,6 +11340,8 @@ function useHostedVenueTransfers(accountId, environment) {
|
|
|
11255
11340
|
invalidateUserClaimState,
|
|
11256
11341
|
invalidateUserMoneyState,
|
|
11257
11342
|
isVenueDisabledByConfig,
|
|
11343
|
+
leaderboardQueryKeys,
|
|
11344
|
+
leaderboardRange,
|
|
11258
11345
|
mergeBestPricesPreferringLive,
|
|
11259
11346
|
mergeRecurringCryptoWindows,
|
|
11260
11347
|
normalizeVenueId,
|
|
@@ -11315,6 +11402,7 @@ function useHostedVenueTransfers(accountId, environment) {
|
|
|
11315
11402
|
useHostedVenueActivity,
|
|
11316
11403
|
useHostedVenueTransfers,
|
|
11317
11404
|
useLabels,
|
|
11405
|
+
useLeaderboard,
|
|
11318
11406
|
useLimitOrderVenueQuotes,
|
|
11319
11407
|
useLinkAccount,
|
|
11320
11408
|
useLiveBestPriceCandidates,
|