@agg-build/hooks 4.23.0 → 4.24.0
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/{chunk-EXLVICJM.mjs → chunk-JFJNW2PD.mjs} +12 -11
- package/dist/{chunk-YJDYAGPC.mjs → chunk-LNIAMJTZ.mjs} +1 -1
- package/dist/{chunk-5YCKWYG7.mjs → chunk-OZQ3K47U.mjs} +1 -1
- package/dist/deposit.mjs +2 -2
- package/dist/index.d.mts +16 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +27 -17
- package/dist/index.mjs +18 -9
- package/dist/withdraw.mjs +2 -2
- package/package.json +2 -2
|
@@ -1704,7 +1704,7 @@ var mergeAggUiSearchConfig = (config) => {
|
|
|
1704
1704
|
};
|
|
1705
1705
|
};
|
|
1706
1706
|
var mergeAggUiConfig = (persisted, config) => {
|
|
1707
|
-
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, __, _$, _aa, _ba, _ca;
|
|
1707
|
+
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, __, _$, _aa, _ba, _ca, _da, _ea;
|
|
1708
1708
|
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;
|
|
1709
1709
|
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;
|
|
1710
1710
|
const formatters = createFormatters(locale);
|
|
@@ -1733,26 +1733,27 @@ var mergeAggUiConfig = (persisted, config) => {
|
|
|
1733
1733
|
},
|
|
1734
1734
|
market: {
|
|
1735
1735
|
arbitrageThreshold: (_J = (_I = config == null ? void 0 : config.market) == null ? void 0 : _I.arbitrageThreshold) != null ? _J : defaultAggUiConfig.market.arbitrageThreshold,
|
|
1736
|
-
maxMidpointIdsPerRequest: (_L = (_K = config == null ? void 0 : config.market) == null ? void 0 : _K.maxMidpointIdsPerRequest) != null ? _L : defaultAggUiConfig.market.maxMidpointIdsPerRequest
|
|
1736
|
+
maxMidpointIdsPerRequest: (_L = (_K = config == null ? void 0 : config.market) == null ? void 0 : _K.maxMidpointIdsPerRequest) != null ? _L : defaultAggUiConfig.market.maxMidpointIdsPerRequest,
|
|
1737
|
+
minVolume: (_N = (_M = config == null ? void 0 : config.market) == null ? void 0 : _M.minVolume) != null ? _N : defaultAggUiConfig.market.minVolume
|
|
1737
1738
|
},
|
|
1738
1739
|
chart: {
|
|
1739
|
-
defaultChartTimeRange: (
|
|
1740
|
-
selectedChartTimeRange: (
|
|
1740
|
+
defaultChartTimeRange: (_P = (_O = config == null ? void 0 : config.chart) == null ? void 0 : _O.defaultChartTimeRange) != null ? _P : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
1741
|
+
selectedChartTimeRange: (_T = (_S = (_Q = persisted.chart) == null ? void 0 : _Q.selectedChartTimeRange) != null ? _S : (_R = config == null ? void 0 : config.chart) == null ? void 0 : _R.defaultChartTimeRange) != null ? _T : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
1741
1742
|
setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
|
|
1742
1743
|
},
|
|
1743
1744
|
formatting: {
|
|
1744
|
-
formatNumber: (
|
|
1745
|
-
formatPercent: (
|
|
1745
|
+
formatNumber: (_V = (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatNumber) != null ? _V : formatters.formatNumber,
|
|
1746
|
+
formatPercent: (_X = (_W = config == null ? void 0 : config.formatting) == null ? void 0 : _W.formatPercent) != null ? _X : formatters.formatPercent,
|
|
1746
1747
|
// ponytail: no default here — each cents surface keeps its own rendering
|
|
1747
1748
|
// when unset, so adding this knob changes nothing for existing partners.
|
|
1748
|
-
formatPrice: (
|
|
1749
|
-
formatCurrency: (
|
|
1750
|
-
formatCompactCurrency: (
|
|
1751
|
-
formatDate: (
|
|
1749
|
+
formatPrice: (_Y = config == null ? void 0 : config.formatting) == null ? void 0 : _Y.formatPrice,
|
|
1750
|
+
formatCurrency: (__ = (_Z = config == null ? void 0 : config.formatting) == null ? void 0 : _Z.formatCurrency) != null ? __ : formatters.formatCurrency,
|
|
1751
|
+
formatCompactCurrency: (_aa = (_$ = config == null ? void 0 : config.formatting) == null ? void 0 : _$.formatCompactCurrency) != null ? _aa : formatters.formatCompactCurrency,
|
|
1752
|
+
formatDate: (_ca = (_ba = config == null ? void 0 : config.formatting) == null ? void 0 : _ba.formatDate) != null ? _ca : formatters.formatDate
|
|
1752
1753
|
},
|
|
1753
1754
|
search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
|
|
1754
1755
|
trading: {
|
|
1755
|
-
executionMode: (
|
|
1756
|
+
executionMode: (_ea = (_da = config == null ? void 0 : config.trading) == null ? void 0 : _da.executionMode) != null ? _ea : defaultAggUiConfig.trading.executionMode
|
|
1756
1757
|
},
|
|
1757
1758
|
walletActions: config == null ? void 0 : config.walletActions,
|
|
1758
1759
|
solanaRpcUrl: config == null ? void 0 : config.solanaRpcUrl
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
useOnWithdrawalLifecycle,
|
|
12
12
|
useSyncBalances,
|
|
13
13
|
useWithdrawManaged
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JFJNW2PD.mjs";
|
|
15
15
|
|
|
16
16
|
// src/withdraw/use-withdraw-flow.ts
|
|
17
17
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRampQuotes,
|
|
3
3
|
useRampSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OZQ3K47U.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-
|
|
14
|
+
} from "./chunk-JFJNW2PD.mjs";
|
|
15
15
|
|
|
16
16
|
// src/deposit/normalize-wallet-error.ts
|
|
17
17
|
function normalizeWalletError(error, supportedChains) {
|
package/dist/index.d.mts
CHANGED
|
@@ -2067,6 +2067,11 @@ interface AggUiMarketConfig {
|
|
|
2067
2067
|
* Lower this when proxy/CDN URL limits are stricter than AGG's backend cap.
|
|
2068
2068
|
*/
|
|
2069
2069
|
maxMidpointIdsPerRequest: number;
|
|
2070
|
+
/**
|
|
2071
|
+
* Lifetime-volume floor (USD) applied by list/detail components to
|
|
2072
|
+
* /venue-events and /venue-markets. Unset = no filter (default).
|
|
2073
|
+
*/
|
|
2074
|
+
minVolume?: number;
|
|
2070
2075
|
}
|
|
2071
2076
|
type AggUiMarketConfigInput = Partial<AggUiMarketConfig>;
|
|
2072
2077
|
interface AggUiChartConfig {
|
|
@@ -6011,6 +6016,11 @@ interface UseVenueEventOptions {
|
|
|
6011
6016
|
* on `useVenueMarkets` so the count matches the market list you render.
|
|
6012
6017
|
*/
|
|
6013
6018
|
cluster?: boolean;
|
|
6019
|
+
/**
|
|
6020
|
+
* Lifetime-volume floor. Scopes `marketCount` to the markets `useVenueMarkets`
|
|
6021
|
+
* returns with the same `minVolume`. Unset = no filter.
|
|
6022
|
+
*/
|
|
6023
|
+
minVolume?: number;
|
|
6014
6024
|
}
|
|
6015
6025
|
/**
|
|
6016
6026
|
* Fetch a single venue event by ID via the API.
|
|
@@ -6188,6 +6198,8 @@ declare function useVenueEvent(options: UseVenueEventOptions): {
|
|
|
6188
6198
|
|
|
6189
6199
|
type UseEnrichedVenueEventOptions = UseVenueEventOptions & {
|
|
6190
6200
|
progressive?: boolean;
|
|
6201
|
+
/** Lifetime-volume floor for the open-markets list (the all-status fallback ignores it). */
|
|
6202
|
+
minVolume?: number;
|
|
6191
6203
|
};
|
|
6192
6204
|
/**
|
|
6193
6205
|
* Fetches a venue event and enriches its venueMarkets with full data
|
|
@@ -6622,6 +6634,8 @@ interface UseVenueEventsOptions {
|
|
|
6622
6634
|
enabled?: boolean;
|
|
6623
6635
|
/** Page size when using cursor pagination. Default 20. */
|
|
6624
6636
|
limit?: number;
|
|
6637
|
+
/** Lifetime-volume floor (USD). Omit or 0 = no filter. */
|
|
6638
|
+
minVolume?: number;
|
|
6625
6639
|
/** If provided, filter by minimum yes price. */
|
|
6626
6640
|
minYesPrice?: number;
|
|
6627
6641
|
/** If provided, filter by maximum yes price. */
|
|
@@ -7093,6 +7107,8 @@ interface UseVenueMarketsOptions {
|
|
|
7093
7107
|
/** Sort surface. "list" makes axis/dates events sort by volume (matches the
|
|
7094
7108
|
* tile top-3); omit or "detail" on the detail page to keep structured order. */
|
|
7095
7109
|
context?: "list" | "detail";
|
|
7110
|
+
/** Lifetime-volume floor (USD). Omit or 0 = no filter. */
|
|
7111
|
+
minVolume?: number;
|
|
7096
7112
|
}
|
|
7097
7113
|
/**
|
|
7098
7114
|
* Fetch venue markets with cursor-based pagination.
|
package/dist/index.d.ts
CHANGED
|
@@ -2067,6 +2067,11 @@ interface AggUiMarketConfig {
|
|
|
2067
2067
|
* Lower this when proxy/CDN URL limits are stricter than AGG's backend cap.
|
|
2068
2068
|
*/
|
|
2069
2069
|
maxMidpointIdsPerRequest: number;
|
|
2070
|
+
/**
|
|
2071
|
+
* Lifetime-volume floor (USD) applied by list/detail components to
|
|
2072
|
+
* /venue-events and /venue-markets. Unset = no filter (default).
|
|
2073
|
+
*/
|
|
2074
|
+
minVolume?: number;
|
|
2070
2075
|
}
|
|
2071
2076
|
type AggUiMarketConfigInput = Partial<AggUiMarketConfig>;
|
|
2072
2077
|
interface AggUiChartConfig {
|
|
@@ -6011,6 +6016,11 @@ interface UseVenueEventOptions {
|
|
|
6011
6016
|
* on `useVenueMarkets` so the count matches the market list you render.
|
|
6012
6017
|
*/
|
|
6013
6018
|
cluster?: boolean;
|
|
6019
|
+
/**
|
|
6020
|
+
* Lifetime-volume floor. Scopes `marketCount` to the markets `useVenueMarkets`
|
|
6021
|
+
* returns with the same `minVolume`. Unset = no filter.
|
|
6022
|
+
*/
|
|
6023
|
+
minVolume?: number;
|
|
6014
6024
|
}
|
|
6015
6025
|
/**
|
|
6016
6026
|
* Fetch a single venue event by ID via the API.
|
|
@@ -6188,6 +6198,8 @@ declare function useVenueEvent(options: UseVenueEventOptions): {
|
|
|
6188
6198
|
|
|
6189
6199
|
type UseEnrichedVenueEventOptions = UseVenueEventOptions & {
|
|
6190
6200
|
progressive?: boolean;
|
|
6201
|
+
/** Lifetime-volume floor for the open-markets list (the all-status fallback ignores it). */
|
|
6202
|
+
minVolume?: number;
|
|
6191
6203
|
};
|
|
6192
6204
|
/**
|
|
6193
6205
|
* Fetches a venue event and enriches its venueMarkets with full data
|
|
@@ -6622,6 +6634,8 @@ interface UseVenueEventsOptions {
|
|
|
6622
6634
|
enabled?: boolean;
|
|
6623
6635
|
/** Page size when using cursor pagination. Default 20. */
|
|
6624
6636
|
limit?: number;
|
|
6637
|
+
/** Lifetime-volume floor (USD). Omit or 0 = no filter. */
|
|
6638
|
+
minVolume?: number;
|
|
6625
6639
|
/** If provided, filter by minimum yes price. */
|
|
6626
6640
|
minYesPrice?: number;
|
|
6627
6641
|
/** If provided, filter by maximum yes price. */
|
|
@@ -7093,6 +7107,8 @@ interface UseVenueMarketsOptions {
|
|
|
7093
7107
|
/** Sort surface. "list" makes axis/dates events sort by volume (matches the
|
|
7094
7108
|
* tile top-3); omit or "detail" on the detail page to keep structured order. */
|
|
7095
7109
|
context?: "list" | "detail";
|
|
7110
|
+
/** Lifetime-volume floor (USD). Omit or 0 = no filter. */
|
|
7111
|
+
minVolume?: number;
|
|
7096
7112
|
}
|
|
7097
7113
|
/**
|
|
7098
7114
|
* Fetch venue markets with cursor-based pagination.
|
package/dist/index.js
CHANGED
|
@@ -2074,7 +2074,7 @@ var mergeAggUiSearchConfig = (config) => {
|
|
|
2074
2074
|
};
|
|
2075
2075
|
};
|
|
2076
2076
|
var mergeAggUiConfig = (persisted, config) => {
|
|
2077
|
-
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, __, _$, _aa, _ba, _ca;
|
|
2077
|
+
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, __, _$, _aa, _ba, _ca, _da, _ea;
|
|
2078
2078
|
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;
|
|
2079
2079
|
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;
|
|
2080
2080
|
const formatters = createFormatters(locale);
|
|
@@ -2103,26 +2103,27 @@ var mergeAggUiConfig = (persisted, config) => {
|
|
|
2103
2103
|
},
|
|
2104
2104
|
market: {
|
|
2105
2105
|
arbitrageThreshold: (_J = (_I = config == null ? void 0 : config.market) == null ? void 0 : _I.arbitrageThreshold) != null ? _J : defaultAggUiConfig.market.arbitrageThreshold,
|
|
2106
|
-
maxMidpointIdsPerRequest: (_L = (_K = config == null ? void 0 : config.market) == null ? void 0 : _K.maxMidpointIdsPerRequest) != null ? _L : defaultAggUiConfig.market.maxMidpointIdsPerRequest
|
|
2106
|
+
maxMidpointIdsPerRequest: (_L = (_K = config == null ? void 0 : config.market) == null ? void 0 : _K.maxMidpointIdsPerRequest) != null ? _L : defaultAggUiConfig.market.maxMidpointIdsPerRequest,
|
|
2107
|
+
minVolume: (_N = (_M = config == null ? void 0 : config.market) == null ? void 0 : _M.minVolume) != null ? _N : defaultAggUiConfig.market.minVolume
|
|
2107
2108
|
},
|
|
2108
2109
|
chart: {
|
|
2109
|
-
defaultChartTimeRange: (
|
|
2110
|
-
selectedChartTimeRange: (
|
|
2110
|
+
defaultChartTimeRange: (_P = (_O = config == null ? void 0 : config.chart) == null ? void 0 : _O.defaultChartTimeRange) != null ? _P : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
2111
|
+
selectedChartTimeRange: (_T = (_S = (_Q = persisted.chart) == null ? void 0 : _Q.selectedChartTimeRange) != null ? _S : (_R = config == null ? void 0 : config.chart) == null ? void 0 : _R.defaultChartTimeRange) != null ? _T : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
2111
2112
|
setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
|
|
2112
2113
|
},
|
|
2113
2114
|
formatting: {
|
|
2114
|
-
formatNumber: (
|
|
2115
|
-
formatPercent: (
|
|
2115
|
+
formatNumber: (_V = (_U = config == null ? void 0 : config.formatting) == null ? void 0 : _U.formatNumber) != null ? _V : formatters.formatNumber,
|
|
2116
|
+
formatPercent: (_X = (_W = config == null ? void 0 : config.formatting) == null ? void 0 : _W.formatPercent) != null ? _X : formatters.formatPercent,
|
|
2116
2117
|
// ponytail: no default here — each cents surface keeps its own rendering
|
|
2117
2118
|
// when unset, so adding this knob changes nothing for existing partners.
|
|
2118
|
-
formatPrice: (
|
|
2119
|
-
formatCurrency: (
|
|
2120
|
-
formatCompactCurrency: (
|
|
2121
|
-
formatDate: (
|
|
2119
|
+
formatPrice: (_Y = config == null ? void 0 : config.formatting) == null ? void 0 : _Y.formatPrice,
|
|
2120
|
+
formatCurrency: (__ = (_Z = config == null ? void 0 : config.formatting) == null ? void 0 : _Z.formatCurrency) != null ? __ : formatters.formatCurrency,
|
|
2121
|
+
formatCompactCurrency: (_aa = (_$ = config == null ? void 0 : config.formatting) == null ? void 0 : _$.formatCompactCurrency) != null ? _aa : formatters.formatCompactCurrency,
|
|
2122
|
+
formatDate: (_ca = (_ba = config == null ? void 0 : config.formatting) == null ? void 0 : _ba.formatDate) != null ? _ca : formatters.formatDate
|
|
2122
2123
|
},
|
|
2123
2124
|
search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
|
|
2124
2125
|
trading: {
|
|
2125
|
-
executionMode: (
|
|
2126
|
+
executionMode: (_ea = (_da = config == null ? void 0 : config.trading) == null ? void 0 : _da.executionMode) != null ? _ea : defaultAggUiConfig.trading.executionMode
|
|
2126
2127
|
},
|
|
2127
2128
|
walletActions: config == null ? void 0 : config.walletActions,
|
|
2128
2129
|
solanaRpcUrl: config == null ? void 0 : config.solanaRpcUrl
|
|
@@ -10410,11 +10411,11 @@ function resolutionPollInterval(event) {
|
|
|
10410
10411
|
function useVenueEvent(options) {
|
|
10411
10412
|
var _a;
|
|
10412
10413
|
const client = useAggClient();
|
|
10413
|
-
const { eventId, enabled = true, cluster } = options;
|
|
10414
|
+
const { eventId, enabled = true, cluster, minVolume } = options;
|
|
10414
10415
|
const query = (0, import_react_query45.useQuery)({
|
|
10415
|
-
queryKey: ["venue-event", eventId, cluster === false ? "no-cluster" : ""],
|
|
10416
|
+
queryKey: ["venue-event", eventId, cluster === false ? "no-cluster" : "", minVolume != null ? minVolume : ""],
|
|
10416
10417
|
queryFn: (_0) => __async(null, [_0], function* ({ signal }) {
|
|
10417
|
-
return client.getVenueEventById(eventId, { signal, cluster });
|
|
10418
|
+
return client.getVenueEventById(eventId, { signal, cluster, minVolume });
|
|
10418
10419
|
}),
|
|
10419
10420
|
enabled: enabled && !!eventId,
|
|
10420
10421
|
staleTime: 5 * 6e4,
|
|
@@ -10454,6 +10455,7 @@ function useVenueMarkets(options) {
|
|
|
10454
10455
|
const sortBy = options == null ? void 0 : options.sortBy;
|
|
10455
10456
|
const sortDir = options == null ? void 0 : options.sortDir;
|
|
10456
10457
|
const context = options == null ? void 0 : options.context;
|
|
10458
|
+
const minVolume = options == null ? void 0 : options.minVolume;
|
|
10457
10459
|
(0, import_react40.useEffect)(() => {
|
|
10458
10460
|
if (queryClient) return void 0;
|
|
10459
10461
|
fallbackQueryClient.mount();
|
|
@@ -10482,7 +10484,8 @@ function useVenueMarkets(options) {
|
|
|
10482
10484
|
limit,
|
|
10483
10485
|
sortBy != null ? sortBy : "",
|
|
10484
10486
|
sortDir != null ? sortDir : "",
|
|
10485
|
-
context != null ? context : ""
|
|
10487
|
+
context != null ? context : "",
|
|
10488
|
+
minVolume != null ? minVolume : ""
|
|
10486
10489
|
],
|
|
10487
10490
|
queryFn: (_0) => __async(null, [_0], function* ({ pageParam, signal }) {
|
|
10488
10491
|
if (!client) {
|
|
@@ -10505,7 +10508,8 @@ function useVenueMarkets(options) {
|
|
|
10505
10508
|
cursor: pageParam,
|
|
10506
10509
|
sortBy,
|
|
10507
10510
|
sortDir,
|
|
10508
|
-
context
|
|
10511
|
+
context,
|
|
10512
|
+
minVolume
|
|
10509
10513
|
},
|
|
10510
10514
|
{ signal }
|
|
10511
10515
|
);
|
|
@@ -10561,7 +10565,8 @@ function useEnrichedVenueEvent(options) {
|
|
|
10561
10565
|
// MarketDetailsList (including limit, part of the query key) preserves the
|
|
10562
10566
|
// shared React Query cache key and the event-type ordering.
|
|
10563
10567
|
limit: 100,
|
|
10564
|
-
fetchAll: !options.progressive
|
|
10568
|
+
fetchAll: !options.progressive,
|
|
10569
|
+
minVolume: options.minVolume
|
|
10565
10570
|
});
|
|
10566
10571
|
const { markets: openMarkets, isLoading: isEnrichingOpenMarkets } = openQuery;
|
|
10567
10572
|
const shouldFetchAllMarketsFallback = ((_c = options.enabled) != null ? _c : true) && !!event && shouldFetchOnlyOpenMarkets && !isEnrichingOpenMarkets && openMarkets.length === 0;
|
|
@@ -10572,6 +10577,8 @@ function useEnrichedVenueEvent(options) {
|
|
|
10572
10577
|
// No status filter on fallback: if an active event temporarily has only
|
|
10573
10578
|
// closed/resolved markets, still render the event page instead of the
|
|
10574
10579
|
// unavailable state.
|
|
10580
|
+
// No minVolume on fallback: an event whose open markets are all below the
|
|
10581
|
+
// floor must still render (mirrors the bootstrap endpoint's fallback).
|
|
10575
10582
|
limit: 100,
|
|
10576
10583
|
fetchAll: !options.progressive
|
|
10577
10584
|
});
|
|
@@ -10614,6 +10621,7 @@ function useVenueEvents(options) {
|
|
|
10614
10621
|
const sortDir = options == null ? void 0 : options.sortDir;
|
|
10615
10622
|
const recurrence = options == null ? void 0 : options.recurrence;
|
|
10616
10623
|
const queryKeyScope = (_d = options == null ? void 0 : options.queryKeyScope) != null ? _d : "events";
|
|
10624
|
+
const minVolume = options == null ? void 0 : options.minVolume;
|
|
10617
10625
|
const minYesPrice = options == null ? void 0 : options.minYesPrice;
|
|
10618
10626
|
const maxYesPrice = options == null ? void 0 : options.maxYesPrice;
|
|
10619
10627
|
const endDateFrom = options == null ? void 0 : options.endDateFrom;
|
|
@@ -10645,6 +10653,7 @@ function useVenueEvents(options) {
|
|
|
10645
10653
|
maxYesPrice != null ? maxYesPrice : "",
|
|
10646
10654
|
endDateFrom != null ? endDateFrom : "",
|
|
10647
10655
|
grouped != null ? grouped : false,
|
|
10656
|
+
minVolume != null ? minVolume : "",
|
|
10648
10657
|
limit
|
|
10649
10658
|
],
|
|
10650
10659
|
queryFn: (_0) => __async(null, [_0], function* ({ pageParam, signal }) {
|
|
@@ -10661,6 +10670,7 @@ function useVenueEvents(options) {
|
|
|
10661
10670
|
sortDir,
|
|
10662
10671
|
recurrence,
|
|
10663
10672
|
limit,
|
|
10673
|
+
minVolume,
|
|
10664
10674
|
minYesPrice,
|
|
10665
10675
|
maxYesPrice,
|
|
10666
10676
|
endDateFrom,
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRampQuotes,
|
|
3
3
|
useRampSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-OZQ3K47U.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useWithdrawEstimate,
|
|
7
7
|
useWithdrawFlow,
|
|
8
8
|
useWithdrawPreview,
|
|
9
9
|
useWithdrawalLifecycle
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LNIAMJTZ.mjs";
|
|
11
11
|
import {
|
|
12
12
|
AggAuthContext,
|
|
13
13
|
AggBalanceProvider,
|
|
@@ -98,7 +98,7 @@ import {
|
|
|
98
98
|
useSyncBalances,
|
|
99
99
|
useWithdrawManaged,
|
|
100
100
|
userActivityQueryKeys
|
|
101
|
-
} from "./chunk-
|
|
101
|
+
} from "./chunk-JFJNW2PD.mjs";
|
|
102
102
|
|
|
103
103
|
// src/index.ts
|
|
104
104
|
import { QueryClient as QueryClient4, QueryClientProvider, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
@@ -4260,11 +4260,11 @@ function resolutionPollInterval(event) {
|
|
|
4260
4260
|
function useVenueEvent(options) {
|
|
4261
4261
|
var _a;
|
|
4262
4262
|
const client = useAggClient();
|
|
4263
|
-
const { eventId, enabled = true, cluster } = options;
|
|
4263
|
+
const { eventId, enabled = true, cluster, minVolume } = options;
|
|
4264
4264
|
const query = useQuery13({
|
|
4265
|
-
queryKey: ["venue-event", eventId, cluster === false ? "no-cluster" : ""],
|
|
4265
|
+
queryKey: ["venue-event", eventId, cluster === false ? "no-cluster" : "", minVolume != null ? minVolume : ""],
|
|
4266
4266
|
queryFn: (_0) => __async(null, [_0], function* ({ signal }) {
|
|
4267
|
-
return client.getVenueEventById(eventId, { signal, cluster });
|
|
4267
|
+
return client.getVenueEventById(eventId, { signal, cluster, minVolume });
|
|
4268
4268
|
}),
|
|
4269
4269
|
enabled: enabled && !!eventId,
|
|
4270
4270
|
staleTime: 5 * 6e4,
|
|
@@ -4304,6 +4304,7 @@ function useVenueMarkets(options) {
|
|
|
4304
4304
|
const sortBy = options == null ? void 0 : options.sortBy;
|
|
4305
4305
|
const sortDir = options == null ? void 0 : options.sortDir;
|
|
4306
4306
|
const context = options == null ? void 0 : options.context;
|
|
4307
|
+
const minVolume = options == null ? void 0 : options.minVolume;
|
|
4307
4308
|
useEffect10(() => {
|
|
4308
4309
|
if (queryClient) return void 0;
|
|
4309
4310
|
fallbackQueryClient.mount();
|
|
@@ -4332,7 +4333,8 @@ function useVenueMarkets(options) {
|
|
|
4332
4333
|
limit,
|
|
4333
4334
|
sortBy != null ? sortBy : "",
|
|
4334
4335
|
sortDir != null ? sortDir : "",
|
|
4335
|
-
context != null ? context : ""
|
|
4336
|
+
context != null ? context : "",
|
|
4337
|
+
minVolume != null ? minVolume : ""
|
|
4336
4338
|
],
|
|
4337
4339
|
queryFn: (_0) => __async(null, [_0], function* ({ pageParam, signal }) {
|
|
4338
4340
|
if (!client) {
|
|
@@ -4355,7 +4357,8 @@ function useVenueMarkets(options) {
|
|
|
4355
4357
|
cursor: pageParam,
|
|
4356
4358
|
sortBy,
|
|
4357
4359
|
sortDir,
|
|
4358
|
-
context
|
|
4360
|
+
context,
|
|
4361
|
+
minVolume
|
|
4359
4362
|
},
|
|
4360
4363
|
{ signal }
|
|
4361
4364
|
);
|
|
@@ -4411,7 +4414,8 @@ function useEnrichedVenueEvent(options) {
|
|
|
4411
4414
|
// MarketDetailsList (including limit, part of the query key) preserves the
|
|
4412
4415
|
// shared React Query cache key and the event-type ordering.
|
|
4413
4416
|
limit: 100,
|
|
4414
|
-
fetchAll: !options.progressive
|
|
4417
|
+
fetchAll: !options.progressive,
|
|
4418
|
+
minVolume: options.minVolume
|
|
4415
4419
|
});
|
|
4416
4420
|
const { markets: openMarkets, isLoading: isEnrichingOpenMarkets } = openQuery;
|
|
4417
4421
|
const shouldFetchAllMarketsFallback = ((_c = options.enabled) != null ? _c : true) && !!event && shouldFetchOnlyOpenMarkets && !isEnrichingOpenMarkets && openMarkets.length === 0;
|
|
@@ -4422,6 +4426,8 @@ function useEnrichedVenueEvent(options) {
|
|
|
4422
4426
|
// No status filter on fallback: if an active event temporarily has only
|
|
4423
4427
|
// closed/resolved markets, still render the event page instead of the
|
|
4424
4428
|
// unavailable state.
|
|
4429
|
+
// No minVolume on fallback: an event whose open markets are all below the
|
|
4430
|
+
// floor must still render (mirrors the bootstrap endpoint's fallback).
|
|
4425
4431
|
limit: 100,
|
|
4426
4432
|
fetchAll: !options.progressive
|
|
4427
4433
|
});
|
|
@@ -4469,6 +4475,7 @@ function useVenueEvents(options) {
|
|
|
4469
4475
|
const sortDir = options == null ? void 0 : options.sortDir;
|
|
4470
4476
|
const recurrence = options == null ? void 0 : options.recurrence;
|
|
4471
4477
|
const queryKeyScope = (_d = options == null ? void 0 : options.queryKeyScope) != null ? _d : "events";
|
|
4478
|
+
const minVolume = options == null ? void 0 : options.minVolume;
|
|
4472
4479
|
const minYesPrice = options == null ? void 0 : options.minYesPrice;
|
|
4473
4480
|
const maxYesPrice = options == null ? void 0 : options.maxYesPrice;
|
|
4474
4481
|
const endDateFrom = options == null ? void 0 : options.endDateFrom;
|
|
@@ -4500,6 +4507,7 @@ function useVenueEvents(options) {
|
|
|
4500
4507
|
maxYesPrice != null ? maxYesPrice : "",
|
|
4501
4508
|
endDateFrom != null ? endDateFrom : "",
|
|
4502
4509
|
grouped != null ? grouped : false,
|
|
4510
|
+
minVolume != null ? minVolume : "",
|
|
4503
4511
|
limit
|
|
4504
4512
|
],
|
|
4505
4513
|
queryFn: (_0) => __async(null, [_0], function* ({ pageParam, signal }) {
|
|
@@ -4516,6 +4524,7 @@ function useVenueEvents(options) {
|
|
|
4516
4524
|
sortDir,
|
|
4517
4525
|
recurrence,
|
|
4518
4526
|
limit,
|
|
4527
|
+
minVolume,
|
|
4519
4528
|
minYesPrice,
|
|
4520
4529
|
maxYesPrice,
|
|
4521
4530
|
endDateFrom,
|
package/dist/withdraw.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
useWithdrawFlow,
|
|
4
4
|
useWithdrawPreview,
|
|
5
5
|
useWithdrawalLifecycle
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LNIAMJTZ.mjs";
|
|
7
7
|
import {
|
|
8
8
|
useDepositAddresses,
|
|
9
9
|
useManagedBalances,
|
|
10
10
|
useWithdrawManaged
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JFJNW2PD.mjs";
|
|
12
12
|
export {
|
|
13
13
|
useDepositAddresses,
|
|
14
14
|
useManagedBalances,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/hooks",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.24.0",
|
|
4
4
|
"description": "React hooks and providers for the AGG prediction market aggregator. Wraps @agg-build/sdk with TanStack Query, shared session state, and live WebSocket data.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"license": "MIT",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"react": "^18.0.0 || ^19.0.0",
|
|
84
84
|
"viem": "^2.0.0",
|
|
85
85
|
"wagmi": "^3.0.0 || ^2.0.0",
|
|
86
|
-
"@agg-build/sdk": "^4.
|
|
86
|
+
"@agg-build/sdk": "^4.24.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@solana/wallet-adapter-react": {
|