@agg-build/hooks 1.0.2 → 1.2.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/README.md +1 -1
- package/dist/{chunk-EB64HHYM.mjs → chunk-FKTRXKYA.mjs} +1 -1
- package/dist/{chunk-NOYHQUW2.mjs → chunk-KSSPFJM2.mjs} +1 -1
- package/dist/{chunk-V6VNA7MX.mjs → chunk-U3DRHUR5.mjs} +36 -12
- package/dist/deposit.js +25 -2
- package/dist/deposit.mjs +2 -2
- package/dist/index.d.mts +26 -0
- package/dist/index.d.ts +26 -0
- package/dist/index.js +36 -12
- package/dist/index.mjs +3 -3
- package/dist/withdraw.js +25 -2
- package/dist/withdraw.mjs +2 -2
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -335,7 +335,7 @@ Import from `@agg-build/hooks/deposit` to keep wallet-heavy hooks out of your ma
|
|
|
335
335
|
|
|
336
336
|
- `enableLogs` / `enableWebsocketsLogs` — turn on debug logging
|
|
337
337
|
- `general` — `locale`, `theme` (`"light" | "dark"`), `rootClassName`, `labels`
|
|
338
|
-
- `features` — `showVenueLogo`, `enableAnimations`, `enableLiveUpdates`, `enableGradients`
|
|
338
|
+
- `features` — `showVenueLogo`, `enableAnimations`, `enableLiveUpdates`, `showFeesBreakdown`, `enableGradients`
|
|
339
339
|
- `market` — `arbitrageThreshold`
|
|
340
340
|
- `chart` — `defaultChartTimeRange`, `selectedChartTimeRange`
|
|
341
341
|
- `search` — provider-owned search state + callbacks for host-app routing/analytics
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useOnWithdrawalLifecycle,
|
|
11
11
|
useSyncBalances,
|
|
12
12
|
useWithdrawManaged
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U3DRHUR5.mjs";
|
|
14
14
|
|
|
15
15
|
// src/withdraw/use-withdraw-flow.ts
|
|
16
16
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
@@ -463,17 +463,32 @@ var enUsLabels = {
|
|
|
463
463
|
withdrawalTitle: (tokenSymbol) => `Withdraw ${tokenSymbol}`
|
|
464
464
|
},
|
|
465
465
|
positions: {
|
|
466
|
+
activeFilter: "Active",
|
|
467
|
+
closedFilter: "Closed",
|
|
468
|
+
marketHeader: "Market",
|
|
466
469
|
totalTradedHeader: "Total traded",
|
|
470
|
+
currentValueHeader: "Current value",
|
|
471
|
+
statusHeader: "Status",
|
|
472
|
+
resolutionHeader: "Resolution",
|
|
473
|
+
payoutHeader: "Payout",
|
|
474
|
+
resultHeader: "Result",
|
|
467
475
|
amountWonHeader: "Amount won",
|
|
468
476
|
claimHeader: "Claim",
|
|
469
477
|
claim: "Claim",
|
|
470
478
|
claimed: "Claimed",
|
|
471
479
|
pending: "Pending",
|
|
480
|
+
open: "Open",
|
|
472
481
|
won: "Won",
|
|
473
482
|
lost: "Lost",
|
|
483
|
+
sold: "Sold",
|
|
474
484
|
resolved: "Resolved",
|
|
475
485
|
marketClosed: "Market closed",
|
|
476
|
-
closed: "Closed"
|
|
486
|
+
closed: "Closed",
|
|
487
|
+
searchPlaceholder: "Search...",
|
|
488
|
+
noResults: "No results",
|
|
489
|
+
avgPrefix: "avg",
|
|
490
|
+
nowPrefix: "now",
|
|
491
|
+
finalPrefix: "final"
|
|
477
492
|
}
|
|
478
493
|
},
|
|
479
494
|
eventList: {
|
|
@@ -611,7 +626,7 @@ var enUsLabels = {
|
|
|
611
626
|
settlementEmpty: "No settlement details available.",
|
|
612
627
|
disclaimer: "By trading, you agree to the Terms of Use of each exchange.",
|
|
613
628
|
geoBlockTermsLink: "Terms of Use",
|
|
614
|
-
geoBlockGenericMessage: "
|
|
629
|
+
geoBlockGenericMessage: "None of the venues for this market are available in your region. See ",
|
|
615
630
|
geoBlockVenueMessage: (venueLabel) => `Trading on ${venueLabel} is not available in your region. See `,
|
|
616
631
|
geoBlockMessageSuffix: " for more information.",
|
|
617
632
|
geoBlockModalAriaLabel: "Geo-restricted location",
|
|
@@ -691,6 +706,13 @@ var enUsLabels = {
|
|
|
691
706
|
splitOrderDescription: "We split your order for the best price:",
|
|
692
707
|
viewAllRoutes: (count) => `View all (${count})`,
|
|
693
708
|
venueUnavailableInRegion: "Unavailable in your region",
|
|
709
|
+
platformFee: "0% platform fees",
|
|
710
|
+
estimatedFees: "Estimated fees",
|
|
711
|
+
estimatedFeesTooltipAria: "Estimated fees breakdown",
|
|
712
|
+
feeBreakdownVenueFees: "Venue fees",
|
|
713
|
+
feeBreakdownBridgeFees: "Bridge fees",
|
|
714
|
+
feeBreakdownExecutionGas: "Execution gas",
|
|
715
|
+
feeBreakdownTotalFees: "Total fees",
|
|
694
716
|
toWin: (tab) => tab === "buy" ? "To win" : "Payout",
|
|
695
717
|
buyingOutcome: (label) => `Buying ${label}`,
|
|
696
718
|
sellingOutcome: (label) => `Selling ${label}`,
|
|
@@ -962,6 +984,7 @@ var defaultAggUiConfig = {
|
|
|
962
984
|
features: {
|
|
963
985
|
enableAnimations: true,
|
|
964
986
|
enableLiveUpdates: true,
|
|
987
|
+
showFeesBreakdown: false,
|
|
965
988
|
enableGradients: false
|
|
966
989
|
},
|
|
967
990
|
market: {
|
|
@@ -989,7 +1012,7 @@ var mergeAggUiSearchConfig = (config) => {
|
|
|
989
1012
|
};
|
|
990
1013
|
};
|
|
991
1014
|
var mergeAggUiConfig = (persisted, config) => {
|
|
992
|
-
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;
|
|
1015
|
+
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;
|
|
993
1016
|
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;
|
|
994
1017
|
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;
|
|
995
1018
|
const formatters = createFormatters(locale);
|
|
@@ -1006,22 +1029,23 @@ var mergeAggUiConfig = (persisted, config) => {
|
|
|
1006
1029
|
features: {
|
|
1007
1030
|
enableAnimations: (_o = (_n = config == null ? void 0 : config.features) == null ? void 0 : _n.enableAnimations) != null ? _o : defaultAggUiConfig.features.enableAnimations,
|
|
1008
1031
|
enableLiveUpdates: (_q = (_p = config == null ? void 0 : config.features) == null ? void 0 : _p.enableLiveUpdates) != null ? _q : defaultAggUiConfig.features.enableLiveUpdates,
|
|
1009
|
-
|
|
1032
|
+
showFeesBreakdown: (_s = (_r = config == null ? void 0 : config.features) == null ? void 0 : _r.showFeesBreakdown) != null ? _s : defaultAggUiConfig.features.showFeesBreakdown,
|
|
1033
|
+
enableGradients: (_u = (_t = config == null ? void 0 : config.features) == null ? void 0 : _t.enableGradients) != null ? _u : defaultAggUiConfig.features.enableGradients
|
|
1010
1034
|
},
|
|
1011
1035
|
market: {
|
|
1012
|
-
arbitrageThreshold: (
|
|
1036
|
+
arbitrageThreshold: (_w = (_v = config == null ? void 0 : config.market) == null ? void 0 : _v.arbitrageThreshold) != null ? _w : defaultAggUiConfig.market.arbitrageThreshold
|
|
1013
1037
|
},
|
|
1014
1038
|
chart: {
|
|
1015
|
-
defaultChartTimeRange: (
|
|
1016
|
-
selectedChartTimeRange: (
|
|
1039
|
+
defaultChartTimeRange: (_y = (_x = config == null ? void 0 : config.chart) == null ? void 0 : _x.defaultChartTimeRange) != null ? _y : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
1040
|
+
selectedChartTimeRange: (_C = (_B = (_z = persisted.chart) == null ? void 0 : _z.selectedChartTimeRange) != null ? _B : (_A = config == null ? void 0 : config.chart) == null ? void 0 : _A.defaultChartTimeRange) != null ? _C : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
1017
1041
|
setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
|
|
1018
1042
|
},
|
|
1019
1043
|
formatting: {
|
|
1020
|
-
formatNumber: (
|
|
1021
|
-
formatPercent: (
|
|
1022
|
-
formatCurrency: (
|
|
1023
|
-
formatCompactCurrency: (
|
|
1024
|
-
formatDate: (
|
|
1044
|
+
formatNumber: (_E = (_D = config == null ? void 0 : config.formatting) == null ? void 0 : _D.formatNumber) != null ? _E : formatters.formatNumber,
|
|
1045
|
+
formatPercent: (_G = (_F = config == null ? void 0 : config.formatting) == null ? void 0 : _F.formatPercent) != null ? _G : formatters.formatPercent,
|
|
1046
|
+
formatCurrency: (_I = (_H = config == null ? void 0 : config.formatting) == null ? void 0 : _H.formatCurrency) != null ? _I : formatters.formatCurrency,
|
|
1047
|
+
formatCompactCurrency: (_K = (_J = config == null ? void 0 : config.formatting) == null ? void 0 : _J.formatCompactCurrency) != null ? _K : formatters.formatCompactCurrency,
|
|
1048
|
+
formatDate: (_M = (_L = config == null ? void 0 : config.formatting) == null ? void 0 : _L.formatDate) != null ? _M : formatters.formatDate
|
|
1025
1049
|
},
|
|
1026
1050
|
search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
|
|
1027
1051
|
walletActions: config == null ? void 0 : config.walletActions,
|
package/dist/deposit.js
CHANGED
|
@@ -369,17 +369,32 @@ var enUsLabels = {
|
|
|
369
369
|
withdrawalTitle: (tokenSymbol) => `Withdraw ${tokenSymbol}`
|
|
370
370
|
},
|
|
371
371
|
positions: {
|
|
372
|
+
activeFilter: "Active",
|
|
373
|
+
closedFilter: "Closed",
|
|
374
|
+
marketHeader: "Market",
|
|
372
375
|
totalTradedHeader: "Total traded",
|
|
376
|
+
currentValueHeader: "Current value",
|
|
377
|
+
statusHeader: "Status",
|
|
378
|
+
resolutionHeader: "Resolution",
|
|
379
|
+
payoutHeader: "Payout",
|
|
380
|
+
resultHeader: "Result",
|
|
373
381
|
amountWonHeader: "Amount won",
|
|
374
382
|
claimHeader: "Claim",
|
|
375
383
|
claim: "Claim",
|
|
376
384
|
claimed: "Claimed",
|
|
377
385
|
pending: "Pending",
|
|
386
|
+
open: "Open",
|
|
378
387
|
won: "Won",
|
|
379
388
|
lost: "Lost",
|
|
389
|
+
sold: "Sold",
|
|
380
390
|
resolved: "Resolved",
|
|
381
391
|
marketClosed: "Market closed",
|
|
382
|
-
closed: "Closed"
|
|
392
|
+
closed: "Closed",
|
|
393
|
+
searchPlaceholder: "Search...",
|
|
394
|
+
noResults: "No results",
|
|
395
|
+
avgPrefix: "avg",
|
|
396
|
+
nowPrefix: "now",
|
|
397
|
+
finalPrefix: "final"
|
|
383
398
|
}
|
|
384
399
|
},
|
|
385
400
|
eventList: {
|
|
@@ -517,7 +532,7 @@ var enUsLabels = {
|
|
|
517
532
|
settlementEmpty: "No settlement details available.",
|
|
518
533
|
disclaimer: "By trading, you agree to the Terms of Use of each exchange.",
|
|
519
534
|
geoBlockTermsLink: "Terms of Use",
|
|
520
|
-
geoBlockGenericMessage: "
|
|
535
|
+
geoBlockGenericMessage: "None of the venues for this market are available in your region. See ",
|
|
521
536
|
geoBlockVenueMessage: (venueLabel) => `Trading on ${venueLabel} is not available in your region. See `,
|
|
522
537
|
geoBlockMessageSuffix: " for more information.",
|
|
523
538
|
geoBlockModalAriaLabel: "Geo-restricted location",
|
|
@@ -597,6 +612,13 @@ var enUsLabels = {
|
|
|
597
612
|
splitOrderDescription: "We split your order for the best price:",
|
|
598
613
|
viewAllRoutes: (count) => `View all (${count})`,
|
|
599
614
|
venueUnavailableInRegion: "Unavailable in your region",
|
|
615
|
+
platformFee: "0% platform fees",
|
|
616
|
+
estimatedFees: "Estimated fees",
|
|
617
|
+
estimatedFeesTooltipAria: "Estimated fees breakdown",
|
|
618
|
+
feeBreakdownVenueFees: "Venue fees",
|
|
619
|
+
feeBreakdownBridgeFees: "Bridge fees",
|
|
620
|
+
feeBreakdownExecutionGas: "Execution gas",
|
|
621
|
+
feeBreakdownTotalFees: "Total fees",
|
|
600
622
|
toWin: (tab) => tab === "buy" ? "To win" : "Payout",
|
|
601
623
|
buyingOutcome: (label) => `Buying ${label}`,
|
|
602
624
|
sellingOutcome: (label) => `Selling ${label}`,
|
|
@@ -848,6 +870,7 @@ var defaultAggUiConfig = {
|
|
|
848
870
|
features: {
|
|
849
871
|
enableAnimations: true,
|
|
850
872
|
enableLiveUpdates: true,
|
|
873
|
+
showFeesBreakdown: false,
|
|
851
874
|
enableGradients: false
|
|
852
875
|
},
|
|
853
876
|
market: {
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRampQuotes,
|
|
3
3
|
useRampSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FKTRXKYA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__async,
|
|
7
7
|
getWalletAddressFromUserProfile,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
useAggUiConfig,
|
|
11
11
|
useDepositAddresses,
|
|
12
12
|
useSyncBalances
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-U3DRHUR5.mjs";
|
|
14
14
|
|
|
15
15
|
// src/deposit/normalize-wallet-error.ts
|
|
16
16
|
function normalizeWalletError(error, supportedChains) {
|
package/dist/index.d.mts
CHANGED
|
@@ -101,6 +101,7 @@ type UserProfile = {
|
|
|
101
101
|
kycStatus: string;
|
|
102
102
|
}[] | null;
|
|
103
103
|
};
|
|
104
|
+
type PriceSource = "orderbook" | "cached" | "entry" | "settled";
|
|
104
105
|
type UnifiedBalanceResponse = {
|
|
105
106
|
cash: {
|
|
106
107
|
tokenSymbol: string;
|
|
@@ -182,6 +183,7 @@ type PositionGroup = {
|
|
|
182
183
|
currentPrice: number;
|
|
183
184
|
totalValue: number;
|
|
184
185
|
unrealizedPnlPercent: number;
|
|
186
|
+
priceSource: PriceSource;
|
|
185
187
|
}[];
|
|
186
188
|
};
|
|
187
189
|
targetMarketId: string;
|
|
@@ -593,17 +595,32 @@ interface AggUiLabels {
|
|
|
593
595
|
withdrawalTitle: (tokenSymbol: string) => string;
|
|
594
596
|
};
|
|
595
597
|
positions: {
|
|
598
|
+
activeFilter: string;
|
|
599
|
+
closedFilter: string;
|
|
600
|
+
marketHeader: string;
|
|
596
601
|
totalTradedHeader: string;
|
|
602
|
+
currentValueHeader: string;
|
|
603
|
+
statusHeader: string;
|
|
604
|
+
resolutionHeader: string;
|
|
605
|
+
payoutHeader: string;
|
|
606
|
+
resultHeader: string;
|
|
597
607
|
amountWonHeader: string;
|
|
598
608
|
claimHeader: string;
|
|
599
609
|
claim: string;
|
|
600
610
|
claimed: string;
|
|
601
611
|
pending: string;
|
|
612
|
+
open: string;
|
|
602
613
|
won: string;
|
|
603
614
|
lost: string;
|
|
615
|
+
sold: string;
|
|
604
616
|
resolved: string;
|
|
605
617
|
marketClosed: string;
|
|
606
618
|
closed: string;
|
|
619
|
+
searchPlaceholder: string;
|
|
620
|
+
noResults: string;
|
|
621
|
+
avgPrefix: string;
|
|
622
|
+
nowPrefix: string;
|
|
623
|
+
finalPrefix: string;
|
|
607
624
|
};
|
|
608
625
|
};
|
|
609
626
|
eventList: {
|
|
@@ -815,6 +832,13 @@ interface AggUiLabels {
|
|
|
815
832
|
splitOrderDescription: string;
|
|
816
833
|
viewAllRoutes: (count: number) => string;
|
|
817
834
|
venueUnavailableInRegion: string;
|
|
835
|
+
platformFee: string;
|
|
836
|
+
estimatedFees: string;
|
|
837
|
+
estimatedFeesTooltipAria: string;
|
|
838
|
+
feeBreakdownVenueFees: string;
|
|
839
|
+
feeBreakdownBridgeFees: string;
|
|
840
|
+
feeBreakdownExecutionGas: string;
|
|
841
|
+
feeBreakdownTotalFees: string;
|
|
818
842
|
toWin: (tab: "buy" | "sell") => string;
|
|
819
843
|
buyingOutcome: (label: string) => string;
|
|
820
844
|
sellingOutcome: (label: string) => string;
|
|
@@ -1013,6 +1037,8 @@ interface AggUiFeatureFlagsConfig {
|
|
|
1013
1037
|
enableAnimations: boolean;
|
|
1014
1038
|
/** Enable live updates */
|
|
1015
1039
|
enableLiveUpdates: boolean;
|
|
1040
|
+
/** Enable fee UI in trading flows */
|
|
1041
|
+
showFeesBreakdown: boolean;
|
|
1016
1042
|
/** Enable gradients */
|
|
1017
1043
|
enableGradients: boolean;
|
|
1018
1044
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -101,6 +101,7 @@ type UserProfile = {
|
|
|
101
101
|
kycStatus: string;
|
|
102
102
|
}[] | null;
|
|
103
103
|
};
|
|
104
|
+
type PriceSource = "orderbook" | "cached" | "entry" | "settled";
|
|
104
105
|
type UnifiedBalanceResponse = {
|
|
105
106
|
cash: {
|
|
106
107
|
tokenSymbol: string;
|
|
@@ -182,6 +183,7 @@ type PositionGroup = {
|
|
|
182
183
|
currentPrice: number;
|
|
183
184
|
totalValue: number;
|
|
184
185
|
unrealizedPnlPercent: number;
|
|
186
|
+
priceSource: PriceSource;
|
|
185
187
|
}[];
|
|
186
188
|
};
|
|
187
189
|
targetMarketId: string;
|
|
@@ -593,17 +595,32 @@ interface AggUiLabels {
|
|
|
593
595
|
withdrawalTitle: (tokenSymbol: string) => string;
|
|
594
596
|
};
|
|
595
597
|
positions: {
|
|
598
|
+
activeFilter: string;
|
|
599
|
+
closedFilter: string;
|
|
600
|
+
marketHeader: string;
|
|
596
601
|
totalTradedHeader: string;
|
|
602
|
+
currentValueHeader: string;
|
|
603
|
+
statusHeader: string;
|
|
604
|
+
resolutionHeader: string;
|
|
605
|
+
payoutHeader: string;
|
|
606
|
+
resultHeader: string;
|
|
597
607
|
amountWonHeader: string;
|
|
598
608
|
claimHeader: string;
|
|
599
609
|
claim: string;
|
|
600
610
|
claimed: string;
|
|
601
611
|
pending: string;
|
|
612
|
+
open: string;
|
|
602
613
|
won: string;
|
|
603
614
|
lost: string;
|
|
615
|
+
sold: string;
|
|
604
616
|
resolved: string;
|
|
605
617
|
marketClosed: string;
|
|
606
618
|
closed: string;
|
|
619
|
+
searchPlaceholder: string;
|
|
620
|
+
noResults: string;
|
|
621
|
+
avgPrefix: string;
|
|
622
|
+
nowPrefix: string;
|
|
623
|
+
finalPrefix: string;
|
|
607
624
|
};
|
|
608
625
|
};
|
|
609
626
|
eventList: {
|
|
@@ -815,6 +832,13 @@ interface AggUiLabels {
|
|
|
815
832
|
splitOrderDescription: string;
|
|
816
833
|
viewAllRoutes: (count: number) => string;
|
|
817
834
|
venueUnavailableInRegion: string;
|
|
835
|
+
platformFee: string;
|
|
836
|
+
estimatedFees: string;
|
|
837
|
+
estimatedFeesTooltipAria: string;
|
|
838
|
+
feeBreakdownVenueFees: string;
|
|
839
|
+
feeBreakdownBridgeFees: string;
|
|
840
|
+
feeBreakdownExecutionGas: string;
|
|
841
|
+
feeBreakdownTotalFees: string;
|
|
818
842
|
toWin: (tab: "buy" | "sell") => string;
|
|
819
843
|
buyingOutcome: (label: string) => string;
|
|
820
844
|
sellingOutcome: (label: string) => string;
|
|
@@ -1013,6 +1037,8 @@ interface AggUiFeatureFlagsConfig {
|
|
|
1013
1037
|
enableAnimations: boolean;
|
|
1014
1038
|
/** Enable live updates */
|
|
1015
1039
|
enableLiveUpdates: boolean;
|
|
1040
|
+
/** Enable fee UI in trading flows */
|
|
1041
|
+
showFeesBreakdown: boolean;
|
|
1016
1042
|
/** Enable gradients */
|
|
1017
1043
|
enableGradients: boolean;
|
|
1018
1044
|
}
|
package/dist/index.js
CHANGED
|
@@ -741,17 +741,32 @@ var enUsLabels = {
|
|
|
741
741
|
withdrawalTitle: (tokenSymbol) => `Withdraw ${tokenSymbol}`
|
|
742
742
|
},
|
|
743
743
|
positions: {
|
|
744
|
+
activeFilter: "Active",
|
|
745
|
+
closedFilter: "Closed",
|
|
746
|
+
marketHeader: "Market",
|
|
744
747
|
totalTradedHeader: "Total traded",
|
|
748
|
+
currentValueHeader: "Current value",
|
|
749
|
+
statusHeader: "Status",
|
|
750
|
+
resolutionHeader: "Resolution",
|
|
751
|
+
payoutHeader: "Payout",
|
|
752
|
+
resultHeader: "Result",
|
|
745
753
|
amountWonHeader: "Amount won",
|
|
746
754
|
claimHeader: "Claim",
|
|
747
755
|
claim: "Claim",
|
|
748
756
|
claimed: "Claimed",
|
|
749
757
|
pending: "Pending",
|
|
758
|
+
open: "Open",
|
|
750
759
|
won: "Won",
|
|
751
760
|
lost: "Lost",
|
|
761
|
+
sold: "Sold",
|
|
752
762
|
resolved: "Resolved",
|
|
753
763
|
marketClosed: "Market closed",
|
|
754
|
-
closed: "Closed"
|
|
764
|
+
closed: "Closed",
|
|
765
|
+
searchPlaceholder: "Search...",
|
|
766
|
+
noResults: "No results",
|
|
767
|
+
avgPrefix: "avg",
|
|
768
|
+
nowPrefix: "now",
|
|
769
|
+
finalPrefix: "final"
|
|
755
770
|
}
|
|
756
771
|
},
|
|
757
772
|
eventList: {
|
|
@@ -889,7 +904,7 @@ var enUsLabels = {
|
|
|
889
904
|
settlementEmpty: "No settlement details available.",
|
|
890
905
|
disclaimer: "By trading, you agree to the Terms of Use of each exchange.",
|
|
891
906
|
geoBlockTermsLink: "Terms of Use",
|
|
892
|
-
geoBlockGenericMessage: "
|
|
907
|
+
geoBlockGenericMessage: "None of the venues for this market are available in your region. See ",
|
|
893
908
|
geoBlockVenueMessage: (venueLabel) => `Trading on ${venueLabel} is not available in your region. See `,
|
|
894
909
|
geoBlockMessageSuffix: " for more information.",
|
|
895
910
|
geoBlockModalAriaLabel: "Geo-restricted location",
|
|
@@ -969,6 +984,13 @@ var enUsLabels = {
|
|
|
969
984
|
splitOrderDescription: "We split your order for the best price:",
|
|
970
985
|
viewAllRoutes: (count) => `View all (${count})`,
|
|
971
986
|
venueUnavailableInRegion: "Unavailable in your region",
|
|
987
|
+
platformFee: "0% platform fees",
|
|
988
|
+
estimatedFees: "Estimated fees",
|
|
989
|
+
estimatedFeesTooltipAria: "Estimated fees breakdown",
|
|
990
|
+
feeBreakdownVenueFees: "Venue fees",
|
|
991
|
+
feeBreakdownBridgeFees: "Bridge fees",
|
|
992
|
+
feeBreakdownExecutionGas: "Execution gas",
|
|
993
|
+
feeBreakdownTotalFees: "Total fees",
|
|
972
994
|
toWin: (tab) => tab === "buy" ? "To win" : "Payout",
|
|
973
995
|
buyingOutcome: (label) => `Buying ${label}`,
|
|
974
996
|
sellingOutcome: (label) => `Selling ${label}`,
|
|
@@ -1240,6 +1262,7 @@ var defaultAggUiConfig = {
|
|
|
1240
1262
|
features: {
|
|
1241
1263
|
enableAnimations: true,
|
|
1242
1264
|
enableLiveUpdates: true,
|
|
1265
|
+
showFeesBreakdown: false,
|
|
1243
1266
|
enableGradients: false
|
|
1244
1267
|
},
|
|
1245
1268
|
market: {
|
|
@@ -1267,7 +1290,7 @@ var mergeAggUiSearchConfig = (config) => {
|
|
|
1267
1290
|
};
|
|
1268
1291
|
};
|
|
1269
1292
|
var mergeAggUiConfig = (persisted, config) => {
|
|
1270
|
-
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;
|
|
1293
|
+
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;
|
|
1271
1294
|
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;
|
|
1272
1295
|
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;
|
|
1273
1296
|
const formatters = createFormatters(locale);
|
|
@@ -1284,22 +1307,23 @@ var mergeAggUiConfig = (persisted, config) => {
|
|
|
1284
1307
|
features: {
|
|
1285
1308
|
enableAnimations: (_o = (_n = config == null ? void 0 : config.features) == null ? void 0 : _n.enableAnimations) != null ? _o : defaultAggUiConfig.features.enableAnimations,
|
|
1286
1309
|
enableLiveUpdates: (_q = (_p = config == null ? void 0 : config.features) == null ? void 0 : _p.enableLiveUpdates) != null ? _q : defaultAggUiConfig.features.enableLiveUpdates,
|
|
1287
|
-
|
|
1310
|
+
showFeesBreakdown: (_s = (_r = config == null ? void 0 : config.features) == null ? void 0 : _r.showFeesBreakdown) != null ? _s : defaultAggUiConfig.features.showFeesBreakdown,
|
|
1311
|
+
enableGradients: (_u = (_t = config == null ? void 0 : config.features) == null ? void 0 : _t.enableGradients) != null ? _u : defaultAggUiConfig.features.enableGradients
|
|
1288
1312
|
},
|
|
1289
1313
|
market: {
|
|
1290
|
-
arbitrageThreshold: (
|
|
1314
|
+
arbitrageThreshold: (_w = (_v = config == null ? void 0 : config.market) == null ? void 0 : _v.arbitrageThreshold) != null ? _w : defaultAggUiConfig.market.arbitrageThreshold
|
|
1291
1315
|
},
|
|
1292
1316
|
chart: {
|
|
1293
|
-
defaultChartTimeRange: (
|
|
1294
|
-
selectedChartTimeRange: (
|
|
1317
|
+
defaultChartTimeRange: (_y = (_x = config == null ? void 0 : config.chart) == null ? void 0 : _x.defaultChartTimeRange) != null ? _y : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
1318
|
+
selectedChartTimeRange: (_C = (_B = (_z = persisted.chart) == null ? void 0 : _z.selectedChartTimeRange) != null ? _B : (_A = config == null ? void 0 : config.chart) == null ? void 0 : _A.defaultChartTimeRange) != null ? _C : defaultAggUiConfig.chart.defaultChartTimeRange,
|
|
1295
1319
|
setSelectedChartTimeRange: defaultAggUiConfig.chart.setSelectedChartTimeRange
|
|
1296
1320
|
},
|
|
1297
1321
|
formatting: {
|
|
1298
|
-
formatNumber: (
|
|
1299
|
-
formatPercent: (
|
|
1300
|
-
formatCurrency: (
|
|
1301
|
-
formatCompactCurrency: (
|
|
1302
|
-
formatDate: (
|
|
1322
|
+
formatNumber: (_E = (_D = config == null ? void 0 : config.formatting) == null ? void 0 : _D.formatNumber) != null ? _E : formatters.formatNumber,
|
|
1323
|
+
formatPercent: (_G = (_F = config == null ? void 0 : config.formatting) == null ? void 0 : _F.formatPercent) != null ? _G : formatters.formatPercent,
|
|
1324
|
+
formatCurrency: (_I = (_H = config == null ? void 0 : config.formatting) == null ? void 0 : _H.formatCurrency) != null ? _I : formatters.formatCurrency,
|
|
1325
|
+
formatCompactCurrency: (_K = (_J = config == null ? void 0 : config.formatting) == null ? void 0 : _J.formatCompactCurrency) != null ? _K : formatters.formatCompactCurrency,
|
|
1326
|
+
formatDate: (_M = (_L = config == null ? void 0 : config.formatting) == null ? void 0 : _L.formatDate) != null ? _M : formatters.formatDate
|
|
1303
1327
|
},
|
|
1304
1328
|
search: mergeAggUiSearchConfig(config == null ? void 0 : config.search),
|
|
1305
1329
|
walletActions: config == null ? void 0 : config.walletActions,
|
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRampQuotes,
|
|
3
3
|
useRampSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-FKTRXKYA.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useWithdrawFlow,
|
|
7
7
|
useWithdrawalLifecycle
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KSSPFJM2.mjs";
|
|
9
9
|
import {
|
|
10
10
|
AggAuthContext,
|
|
11
11
|
AggBalanceProvider,
|
|
@@ -82,7 +82,7 @@ import {
|
|
|
82
82
|
useSdkUiConfig,
|
|
83
83
|
useSyncBalances,
|
|
84
84
|
useWithdrawManaged
|
|
85
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-U3DRHUR5.mjs";
|
|
86
86
|
|
|
87
87
|
// src/index.ts
|
|
88
88
|
import { QueryClient as QueryClient4, QueryClientProvider, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
|
package/dist/withdraw.js
CHANGED
|
@@ -328,17 +328,32 @@ var enUsLabels = {
|
|
|
328
328
|
withdrawalTitle: (tokenSymbol) => `Withdraw ${tokenSymbol}`
|
|
329
329
|
},
|
|
330
330
|
positions: {
|
|
331
|
+
activeFilter: "Active",
|
|
332
|
+
closedFilter: "Closed",
|
|
333
|
+
marketHeader: "Market",
|
|
331
334
|
totalTradedHeader: "Total traded",
|
|
335
|
+
currentValueHeader: "Current value",
|
|
336
|
+
statusHeader: "Status",
|
|
337
|
+
resolutionHeader: "Resolution",
|
|
338
|
+
payoutHeader: "Payout",
|
|
339
|
+
resultHeader: "Result",
|
|
332
340
|
amountWonHeader: "Amount won",
|
|
333
341
|
claimHeader: "Claim",
|
|
334
342
|
claim: "Claim",
|
|
335
343
|
claimed: "Claimed",
|
|
336
344
|
pending: "Pending",
|
|
345
|
+
open: "Open",
|
|
337
346
|
won: "Won",
|
|
338
347
|
lost: "Lost",
|
|
348
|
+
sold: "Sold",
|
|
339
349
|
resolved: "Resolved",
|
|
340
350
|
marketClosed: "Market closed",
|
|
341
|
-
closed: "Closed"
|
|
351
|
+
closed: "Closed",
|
|
352
|
+
searchPlaceholder: "Search...",
|
|
353
|
+
noResults: "No results",
|
|
354
|
+
avgPrefix: "avg",
|
|
355
|
+
nowPrefix: "now",
|
|
356
|
+
finalPrefix: "final"
|
|
342
357
|
}
|
|
343
358
|
},
|
|
344
359
|
eventList: {
|
|
@@ -476,7 +491,7 @@ var enUsLabels = {
|
|
|
476
491
|
settlementEmpty: "No settlement details available.",
|
|
477
492
|
disclaimer: "By trading, you agree to the Terms of Use of each exchange.",
|
|
478
493
|
geoBlockTermsLink: "Terms of Use",
|
|
479
|
-
geoBlockGenericMessage: "
|
|
494
|
+
geoBlockGenericMessage: "None of the venues for this market are available in your region. See ",
|
|
480
495
|
geoBlockVenueMessage: (venueLabel) => `Trading on ${venueLabel} is not available in your region. See `,
|
|
481
496
|
geoBlockMessageSuffix: " for more information.",
|
|
482
497
|
geoBlockModalAriaLabel: "Geo-restricted location",
|
|
@@ -556,6 +571,13 @@ var enUsLabels = {
|
|
|
556
571
|
splitOrderDescription: "We split your order for the best price:",
|
|
557
572
|
viewAllRoutes: (count) => `View all (${count})`,
|
|
558
573
|
venueUnavailableInRegion: "Unavailable in your region",
|
|
574
|
+
platformFee: "0% platform fees",
|
|
575
|
+
estimatedFees: "Estimated fees",
|
|
576
|
+
estimatedFeesTooltipAria: "Estimated fees breakdown",
|
|
577
|
+
feeBreakdownVenueFees: "Venue fees",
|
|
578
|
+
feeBreakdownBridgeFees: "Bridge fees",
|
|
579
|
+
feeBreakdownExecutionGas: "Execution gas",
|
|
580
|
+
feeBreakdownTotalFees: "Total fees",
|
|
559
581
|
toWin: (tab) => tab === "buy" ? "To win" : "Payout",
|
|
560
582
|
buyingOutcome: (label) => `Buying ${label}`,
|
|
561
583
|
sellingOutcome: (label) => `Selling ${label}`,
|
|
@@ -807,6 +829,7 @@ var defaultAggUiConfig = {
|
|
|
807
829
|
features: {
|
|
808
830
|
enableAnimations: true,
|
|
809
831
|
enableLiveUpdates: true,
|
|
832
|
+
showFeesBreakdown: false,
|
|
810
833
|
enableGradients: false
|
|
811
834
|
},
|
|
812
835
|
market: {
|
package/dist/withdraw.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useWithdrawFlow,
|
|
3
3
|
useWithdrawalLifecycle
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KSSPFJM2.mjs";
|
|
5
5
|
import {
|
|
6
6
|
useDepositAddresses,
|
|
7
7
|
useManagedBalances,
|
|
8
8
|
useWithdrawManaged
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-U3DRHUR5.mjs";
|
|
10
10
|
export {
|
|
11
11
|
useDepositAddresses,
|
|
12
12
|
useManagedBalances,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agg-build/hooks",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.2.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": "^1.0
|
|
86
|
+
"@agg-build/sdk": "^1.2.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
89
|
"@solana/wallet-adapter-react": {
|