@agg-build/hooks 1.2.11 → 1.3.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-JWPZNCGY.mjs → chunk-KXO3JOXF.mjs} +1 -1
- package/dist/{chunk-CWEJLBYY.mjs → chunk-OBHXWQ6L.mjs} +1 -1
- package/dist/{chunk-553OI6M2.mjs → chunk-VLYLQSDD.mjs} +211 -59
- package/dist/deposit.js +125 -20
- package/dist/deposit.mjs +2 -2
- package/dist/index.d.mts +311 -58
- package/dist/index.d.ts +311 -58
- package/dist/index.js +592 -230
- package/dist/index.mjs +283 -81
- package/dist/withdraw.d.mts +3 -3
- package/dist/withdraw.d.ts +3 -3
- package/dist/withdraw.js +128 -23
- package/dist/withdraw.mjs +2 -2
- package/package.json +2 -2
package/dist/deposit.js
CHANGED
|
@@ -287,11 +287,8 @@ var enUsLabels = {
|
|
|
287
287
|
loadingDescription: "This may take a few minutes. You can safely close this window and check the status later in your activity.",
|
|
288
288
|
summary: {
|
|
289
289
|
requestedWithdrawal: "Requested withdrawal",
|
|
290
|
-
//
|
|
291
|
-
//
|
|
292
|
-
// would imply receipt before the lifecycle has confirmed. Keep it
|
|
293
|
-
// honest as the submitted amount until the multi-stable quote
|
|
294
|
-
// layer (PR-E) populates `expected.outputRaw`.
|
|
290
|
+
// Calling this "Amount received" would imply receipt before the
|
|
291
|
+
// lifecycle has confirmed. Keep it honest as the submitted amount.
|
|
295
292
|
amountReceived: "Amount",
|
|
296
293
|
network: "Network",
|
|
297
294
|
toWallet: "To wallet",
|
|
@@ -339,9 +336,8 @@ var enUsLabels = {
|
|
|
339
336
|
}
|
|
340
337
|
},
|
|
341
338
|
summary: {
|
|
342
|
-
// Lifecycle-honest:
|
|
343
|
-
//
|
|
344
|
-
// a guaranteed net output.
|
|
339
|
+
// Lifecycle-honest: this is the submitted amount, not a guaranteed net
|
|
340
|
+
// output.
|
|
345
341
|
amountReceived: "Amount",
|
|
346
342
|
network: "Network"
|
|
347
343
|
}
|
|
@@ -352,14 +348,21 @@ var enUsLabels = {
|
|
|
352
348
|
},
|
|
353
349
|
home: {
|
|
354
350
|
trending: "Trending",
|
|
355
|
-
topMarkets: "
|
|
351
|
+
topMarkets: "Trending",
|
|
356
352
|
newMarkets: "New Markets",
|
|
357
353
|
categoryTabsAria: "Home page category tabs"
|
|
358
354
|
},
|
|
359
355
|
userProfile: {
|
|
360
356
|
activity: {
|
|
361
357
|
depositType: "Deposit",
|
|
358
|
+
redeemType: "Claim",
|
|
362
359
|
withdrawalType: "Withdrawal",
|
|
360
|
+
redeemStatusTitles: {
|
|
361
|
+
pending: "Processing claim",
|
|
362
|
+
completed: "Successful claim",
|
|
363
|
+
failed: "Failed claim",
|
|
364
|
+
canceled: "Canceled claim"
|
|
365
|
+
},
|
|
363
366
|
depositTitles: {
|
|
364
367
|
connectedWallet: "Deposit from connected wallet",
|
|
365
368
|
externalWallet: "Deposit from external wallet",
|
|
@@ -430,6 +433,15 @@ var enUsLabels = {
|
|
|
430
433
|
eventList: {
|
|
431
434
|
matchedTab: "Matched",
|
|
432
435
|
allTab: "All",
|
|
436
|
+
sortByLabel: "Sort by",
|
|
437
|
+
sortBy24hVolume: "24h volume",
|
|
438
|
+
sortByTopArbitrage: "Top arbitrage",
|
|
439
|
+
sortByTotalVolume: "Total volume",
|
|
440
|
+
sortByEndingSoon: "Ending soon",
|
|
441
|
+
subcategoriesLabel: "Subcategories",
|
|
442
|
+
subcategoriesAll: "All",
|
|
443
|
+
subcategoriesOpenAria: "Open subcategories",
|
|
444
|
+
subcategoriesCloseAria: "Close subcategories",
|
|
433
445
|
loading: (title) => `Loading ${title}`,
|
|
434
446
|
tabsAria: (title) => `${title} tabs`,
|
|
435
447
|
emptyAria: "No events found",
|
|
@@ -458,12 +470,14 @@ var enUsLabels = {
|
|
|
458
470
|
unavailableTitle: "Market unavailable",
|
|
459
471
|
unavailableDescription: "We could not load this market right now.",
|
|
460
472
|
arbitrage: "Arbitrage",
|
|
461
|
-
priceGap: "Price Gap",
|
|
462
473
|
volumeSuffix: "Vol.",
|
|
463
474
|
marketSingular: "Market",
|
|
464
475
|
marketPlural: "Markets",
|
|
465
476
|
venueSingular: "Venue",
|
|
466
|
-
venuePlural: "Venues"
|
|
477
|
+
venuePlural: "Venues",
|
|
478
|
+
matched: "Matched",
|
|
479
|
+
matchedCount: (count) => `${count} ${count === 1 ? "Match" : "Matches"}`,
|
|
480
|
+
priceGap: "Price Gap"
|
|
467
481
|
},
|
|
468
482
|
eventItemDetails: {
|
|
469
483
|
loading: "Loading market details",
|
|
@@ -575,8 +589,8 @@ var enUsLabels = {
|
|
|
575
589
|
})}\xA2 avg. price`,
|
|
576
590
|
balance: (value) => `Balance ${value}`,
|
|
577
591
|
shares: (value) => `${value.toLocaleString("en-US", {
|
|
578
|
-
minimumFractionDigits: Number.isInteger(value) ? 0 :
|
|
579
|
-
maximumFractionDigits:
|
|
592
|
+
minimumFractionDigits: Number.isInteger(value) ? 0 : 1,
|
|
593
|
+
maximumFractionDigits: 2
|
|
580
594
|
})} shares`,
|
|
581
595
|
maxShares: "Max",
|
|
582
596
|
slippage: (value) => `Slippage: ${value}%`,
|
|
@@ -617,6 +631,18 @@ var enUsLabels = {
|
|
|
617
631
|
noOrderbooks: "No live orderbooks are available for this market right now.",
|
|
618
632
|
quoteUnavailable: "Quote temporarily unavailable. Please try again.",
|
|
619
633
|
quoteBalanceMismatch: "Quote balance mismatch. Try a different amount.",
|
|
634
|
+
serviceTemporarilyUnavailable: "Service temporarily unavailable. Please try again in a moment.",
|
|
635
|
+
orderDeadlineExpiredBeforeSubmission: "Order deadline expired before submission. Please try again.",
|
|
636
|
+
sellNoOnchainPosition: "You don't currently hold any on-chain shares of this outcome. If you just sold or redeemed elsewhere, your position display will refresh shortly \u2014 try again after that.",
|
|
637
|
+
venueQuoteUnfillable: "The venue couldn't fill this order at the quoted price right now. Try a smaller size, a higher slippage tolerance, or wait a moment and re-quote.",
|
|
638
|
+
venueMinOrderSize: "Order size is below the venue minimum. Try a larger amount.",
|
|
639
|
+
sourceBalanceChanged: "Your balance changed since the quote. Refresh and try again, or pick a smaller amount.",
|
|
640
|
+
venueMarketResolved: "This market just resolved. Pick a different market or wait for the next round.",
|
|
641
|
+
dflowWalletUnverified: "Your Solana wallet needs to be verified with dFlow before you can trade Kalshi markets. Verify at https://dflow.net/proof, then try again.",
|
|
642
|
+
venueNoQuotePath: "No active quote path for this market right now. Try a different size, or wait a moment and re-quote.",
|
|
643
|
+
solanaBlockhashExpired: "Solana transaction expired before submission. Please re-quote and try again.",
|
|
644
|
+
venueRateLimited: "The venue is rate-limiting requests right now. Please wait a moment and try again.",
|
|
645
|
+
serviceBlockedOrder: "Something on our side blocked this order. Please contact support if it keeps happening \u2014 retrying with the same quote will hit the same issue.",
|
|
620
646
|
selectedVenueUnavailable: "The venue you selected is no longer available on this route. Review the updated options and try again.",
|
|
621
647
|
engineUnavailable: "The routing engine is temporarily unavailable. Please try again in a moment.",
|
|
622
648
|
insufficientInputAmount: "Trade amount is too small to cover bridging and execution costs. Increase your spend or deposit funds on the destination chain.",
|
|
@@ -630,6 +656,7 @@ var enUsLabels = {
|
|
|
630
656
|
deposit: "Deposit",
|
|
631
657
|
kycRequired: "Verify to trade Kalshi",
|
|
632
658
|
kycNotVerifiedTooltip: "You have not been verified yet",
|
|
659
|
+
kycVerify: "Verify Identity",
|
|
633
660
|
kycVerifyModalTitle: "Verify Your Identity",
|
|
634
661
|
kycVerifyModalDescription: "To start trading on Kalshi, you'll need to complete identity verification through dFlow. It only takes a few minutes and helps us stay compliant with regulations.",
|
|
635
662
|
kycStartVerification: "Start Verification",
|
|
@@ -643,12 +670,15 @@ var enUsLabels = {
|
|
|
643
670
|
splitOrderDescription: "We split your order for the best price:",
|
|
644
671
|
viewAllRoutes: (count) => `View all (${count})`,
|
|
645
672
|
venueUnavailableInRegion: "Unavailable in your region",
|
|
673
|
+
verified: "Verified",
|
|
646
674
|
platformFee: "0% platform fees",
|
|
647
675
|
estimatedFees: "Estimated fees",
|
|
648
676
|
estimatedFeesTooltipAria: "Estimated fees breakdown",
|
|
649
|
-
feeBreakdownVenueFees: "Venue
|
|
650
|
-
feeBreakdownBridgeFees: "
|
|
651
|
-
feeBreakdownExecutionGas: "
|
|
677
|
+
feeBreakdownVenueFees: "Venue",
|
|
678
|
+
feeBreakdownBridgeFees: "Bridging",
|
|
679
|
+
feeBreakdownExecutionGas: "Gas",
|
|
680
|
+
feeBreakdownAggMarket: "agg.market",
|
|
681
|
+
feeBreakdownPlatformFeeBadge: "0% fee",
|
|
652
682
|
feeBreakdownTotalFees: "Total fees",
|
|
653
683
|
toWin: (tab) => tab === "buy" ? "To win" : "Payout",
|
|
654
684
|
buyingOutcome: (label) => `Buying ${label}`,
|
|
@@ -834,6 +864,70 @@ var enUsLabels = {
|
|
|
834
864
|
header: {
|
|
835
865
|
bannerAria: "Site header",
|
|
836
866
|
logoAria: "Home"
|
|
867
|
+
},
|
|
868
|
+
notifications: {
|
|
869
|
+
order: {
|
|
870
|
+
filledTitle: "Order filled",
|
|
871
|
+
filledMessage: ({ venueLabel, sideLabel, amountLabel, priceLabel }) => {
|
|
872
|
+
const action = sideLabel ? `${sideLabel} filled` : "Filled";
|
|
873
|
+
const amount = amountLabel ? ` ${amountLabel}` : "";
|
|
874
|
+
const price = priceLabel ? ` at ${priceLabel}` : "";
|
|
875
|
+
const venue = venueLabel ? ` on ${venueLabel}` : "";
|
|
876
|
+
return `${action}${amount}${price}${venue}`.trim();
|
|
877
|
+
},
|
|
878
|
+
partialFilledTitle: "Order partially filled",
|
|
879
|
+
partialFilledMessage: ({ venueLabel, sideLabel, amountLabel, priceLabel }) => {
|
|
880
|
+
const action = sideLabel ? `${sideLabel} partially filled` : "Partially filled";
|
|
881
|
+
const amount = amountLabel ? ` ${amountLabel}` : "";
|
|
882
|
+
const price = priceLabel ? ` at ${priceLabel}` : "";
|
|
883
|
+
const venue = venueLabel ? ` on ${venueLabel}` : "";
|
|
884
|
+
return `${action}${amount}${price}${venue}`.trim();
|
|
885
|
+
},
|
|
886
|
+
failedTitle: "Order failed",
|
|
887
|
+
failedMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Your order could not be completed. Please try again."
|
|
888
|
+
},
|
|
889
|
+
deposit: {
|
|
890
|
+
completedTitle: "Deposit complete",
|
|
891
|
+
completedMessage: ({ amountLabel, tokenLabel }) => {
|
|
892
|
+
if (amountLabel && tokenLabel) return `${amountLabel} ${tokenLabel} added to your balance.`;
|
|
893
|
+
if (tokenLabel) return `Your ${tokenLabel} has been added to your balance.`;
|
|
894
|
+
return "Your funds have been added to your balance.";
|
|
895
|
+
},
|
|
896
|
+
failedTitle: "Deposit failed",
|
|
897
|
+
failedMessage: ({ amountLabel, tokenLabel }) => {
|
|
898
|
+
const what = amountLabel && tokenLabel ? `${amountLabel} ${tokenLabel}` : "deposit";
|
|
899
|
+
return `We couldn't complete your ${what}.`;
|
|
900
|
+
}
|
|
901
|
+
},
|
|
902
|
+
withdrawal: {
|
|
903
|
+
completedTitle: "Withdrawal complete",
|
|
904
|
+
completedMessage: ({ amountLabel, tokenLabel }) => {
|
|
905
|
+
if (amountLabel && tokenLabel) return `${amountLabel} ${tokenLabel} sent to your wallet.`;
|
|
906
|
+
if (tokenLabel) return `Your ${tokenLabel} has been sent to your wallet.`;
|
|
907
|
+
return "Your withdrawal has been sent to your wallet.";
|
|
908
|
+
},
|
|
909
|
+
partialTitle: "Withdrawal partially completed",
|
|
910
|
+
partialMessage: ({ amountLabel, tokenLabel }) => {
|
|
911
|
+
if (amountLabel && tokenLabel)
|
|
912
|
+
return `Part of your ${tokenLabel} was sent. The remainder was returned to your balance.`;
|
|
913
|
+
return "Part of your withdrawal was sent. The remainder was returned to your balance.";
|
|
914
|
+
},
|
|
915
|
+
failedTitle: "Withdrawal failed",
|
|
916
|
+
failedMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Your funds have been returned to your balance."
|
|
917
|
+
},
|
|
918
|
+
claim: {
|
|
919
|
+
pendingTitle: "Claim started",
|
|
920
|
+
pendingMessage: "Claiming your winnings.",
|
|
921
|
+
submittedTitle: "Claim submitted",
|
|
922
|
+
submittedMessage: "Your claim was submitted. It may take a little while to finish.",
|
|
923
|
+
successTitle: "Claim complete",
|
|
924
|
+
successMessage: "Your winnings have been claimed.",
|
|
925
|
+
partialTitle: "Claim partially completed",
|
|
926
|
+
partialMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Some winnings could not be claimed. Please try again.",
|
|
927
|
+
failedTitle: "Claim failed",
|
|
928
|
+
failedMessage: (errorReason) => errorReason && errorReason.length > 0 ? errorReason : "Your winnings could not be claimed. Please try again.",
|
|
929
|
+
missingOutcomeMessage: "This position is missing claimable outcome data. Please refresh."
|
|
930
|
+
}
|
|
837
931
|
}
|
|
838
932
|
};
|
|
839
933
|
var defaultAggUiLabelsByLocale = {
|
|
@@ -903,8 +997,11 @@ var defaultAggUiConfig = {
|
|
|
903
997
|
features: {
|
|
904
998
|
enableAnimations: true,
|
|
905
999
|
enableLiveUpdates: true,
|
|
1000
|
+
enablePriceGap: false,
|
|
906
1001
|
showFeesBreakdown: false,
|
|
907
|
-
enableGradients: false
|
|
1002
|
+
enableGradients: false,
|
|
1003
|
+
enableVenueEventDiscoveryFilters: false,
|
|
1004
|
+
enableNotifications: true
|
|
908
1005
|
},
|
|
909
1006
|
market: {
|
|
910
1007
|
arbitrageThreshold: 0
|
|
@@ -929,9 +1026,16 @@ var AggBalanceContext = (0, import_react.createContext)(null);
|
|
|
929
1026
|
// src/execution/query-keys.ts
|
|
930
1027
|
var executionKeys = {
|
|
931
1028
|
all: () => ["execution"],
|
|
932
|
-
balances: () => ["execution", "balances"],
|
|
933
|
-
positions: (cursor, limit, status) => ["execution", "positions", cursor != null ? cursor : null, limit != null ? limit : null, status != null ? status : null],
|
|
1029
|
+
balances: (mode) => mode ? ["execution", "balances", mode] : ["execution", "balances"],
|
|
1030
|
+
positions: (cursor, limit, status, mode) => mode ? ["execution", "positions", cursor != null ? cursor : null, limit != null ? limit : null, status != null ? status : null, mode] : ["execution", "positions", cursor != null ? cursor : null, limit != null ? limit : null, status != null ? status : null],
|
|
934
1031
|
positionsPrefix: () => ["execution", "positions"],
|
|
1032
|
+
claimablePositionsCount: () => ["execution", "positions", "claimable-count"],
|
|
1033
|
+
/**
|
|
1034
|
+
* @deprecated Misnomer — claimable (redeemStatus "eligible") groups live in
|
|
1035
|
+
* the ACTIVE bucket, not closed (won-but-unclaimed stays Active until a
|
|
1036
|
+
* redeem stamps redeemedAt). Same key value as `claimablePositionsCount`;
|
|
1037
|
+
* kept so existing invalidation call sites keep matching.
|
|
1038
|
+
*/
|
|
935
1039
|
claimableClosedPositionsCount: () => ["execution", "positions", "claimable-count"],
|
|
936
1040
|
orders: (status, cursor, limit) => ["execution", "orders", status != null ? status : null, cursor != null ? cursor : null, limit != null ? limit : null],
|
|
937
1041
|
ordersPrefix: () => ["execution", "orders"],
|
|
@@ -976,7 +1080,8 @@ var invalidatePositionQueries = (queryClient, options) => {
|
|
|
976
1080
|
});
|
|
977
1081
|
};
|
|
978
1082
|
var userActivityQueryKeys = {
|
|
979
|
-
all: () => ["user-activity"]
|
|
1083
|
+
all: () => ["user-activity"],
|
|
1084
|
+
feed: (type, limit) => ["user-activity", type != null ? type : "all", limit != null ? limit : 50]
|
|
980
1085
|
};
|
|
981
1086
|
var invalidateUserActivityQueries = (queryClient, options) => {
|
|
982
1087
|
var _a;
|
package/dist/deposit.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useRampQuotes,
|
|
3
3
|
useRampSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-KXO3JOXF.mjs";
|
|
5
5
|
import {
|
|
6
6
|
__async,
|
|
7
7
|
useAggAuthState,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
useAggUiConfig,
|
|
10
10
|
useDepositAddresses,
|
|
11
11
|
useSyncBalances
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-VLYLQSDD.mjs";
|
|
13
13
|
|
|
14
14
|
// src/deposit/normalize-wallet-error.ts
|
|
15
15
|
function normalizeWalletError(error, supportedChains) {
|