@funkit/connect 10.1.0 → 10.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/CHANGELOG.md +31 -0
- package/dist/clients/lighter.css +18 -0
- package/dist/clients/lighter.js +16 -5
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +18 -0
- package/dist/clients/polymarket/index.css +18 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +11 -1
- package/dist/index.css +18 -0
- package/dist/index.js +258 -148
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +3 -3
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.css.d.ts +1 -0
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +7 -2
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +15 -0
- package/dist/utils/customer.d.ts +32 -0
- package/dist/wallets/walletConnectors/index.js +18 -18
- package/package.json +5 -12
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
lightTheme
|
|
4
|
-
} from "./chunk-67BKQQNG.js";
|
|
5
2
|
import {
|
|
6
3
|
darkTheme
|
|
7
4
|
} from "./chunk-36KVHK22.js";
|
|
5
|
+
import {
|
|
6
|
+
lightTheme
|
|
7
|
+
} from "./chunk-67BKQQNG.js";
|
|
8
8
|
import {
|
|
9
9
|
systemFontStack
|
|
10
10
|
} from "./chunk-4YEAUICE.js";
|
|
@@ -1687,7 +1687,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
1687
1687
|
localStorage.setItem(storageKey, version);
|
|
1688
1688
|
}
|
|
1689
1689
|
function getCurrentSdkVersion() {
|
|
1690
|
-
return "10.
|
|
1690
|
+
return "10.2.0";
|
|
1691
1691
|
}
|
|
1692
1692
|
function useFingerprint() {
|
|
1693
1693
|
const fingerprint = useCallback3(() => {
|
|
@@ -2035,6 +2035,30 @@ function useFunkitConfig() {
|
|
|
2035
2035
|
|
|
2036
2036
|
// src/utils/customer.ts
|
|
2037
2037
|
var LIGHTER_MAIN_ACCOUNT_TYPE = 0;
|
|
2038
|
+
var LIGHTER_TRADING_MODE = {
|
|
2039
|
+
SIMPLE: 0,
|
|
2040
|
+
UNIFIED: 1
|
|
2041
|
+
};
|
|
2042
|
+
var LIGHTER_USDC_SPOT_ROUTING_IDS = /* @__PURE__ */ new Set([
|
|
2043
|
+
"LIGHTER_USDC_SPOT",
|
|
2044
|
+
"LIGHTER_USDC_SPOT_NEW_USER"
|
|
2045
|
+
]);
|
|
2046
|
+
var LIGHTER_USDC_SPOT_CANDIDATE_SYMBOL = "USDC (SPOT)";
|
|
2047
|
+
function stripLighterPerpsSuffix(symbol) {
|
|
2048
|
+
return symbol?.replace(/\s*\(perps\)\s*$/i, "");
|
|
2049
|
+
}
|
|
2050
|
+
function isLighterUsdcSpotCandidate(candidate) {
|
|
2051
|
+
if (candidate.dynamicRoutingId) {
|
|
2052
|
+
return LIGHTER_USDC_SPOT_ROUTING_IDS.has(candidate.dynamicRoutingId);
|
|
2053
|
+
}
|
|
2054
|
+
return candidate.tokenSymbol.toUpperCase() === LIGHTER_USDC_SPOT_CANDIDATE_SYMBOL;
|
|
2055
|
+
}
|
|
2056
|
+
function adaptLighterTargetAssetsForUnifiedAccount(candidates) {
|
|
2057
|
+
return candidates.filter((candidate) => !isLighterUsdcSpotCandidate(candidate)).map((candidate) => ({
|
|
2058
|
+
...candidate,
|
|
2059
|
+
tokenSymbol: stripLighterPerpsSuffix(candidate.tokenSymbol)
|
|
2060
|
+
}));
|
|
2061
|
+
}
|
|
2038
2062
|
async function getLighterAccountsByL1Address(address) {
|
|
2039
2063
|
const response = await fetch(
|
|
2040
2064
|
`https://mainnet.zklighter.elliot.ai/api/v1/accountsByL1Address?l1_address=${address}`
|
|
@@ -2107,6 +2131,9 @@ function useLighterAccounts({
|
|
|
2107
2131
|
return {
|
|
2108
2132
|
...query,
|
|
2109
2133
|
mainAccountIndex: mainAccount?.index?.toString(),
|
|
2134
|
+
// False until the accounts load — consumers fall back to the simple-mode
|
|
2135
|
+
// UI (both USDC variants shown) while the trading mode is unknown.
|
|
2136
|
+
isUnifiedTradingMode: mainAccount?.account_trading_mode === LIGHTER_TRADING_MODE.UNIFIED,
|
|
2110
2137
|
subAccounts
|
|
2111
2138
|
};
|
|
2112
2139
|
}
|
|
@@ -2124,6 +2151,7 @@ import { useEffect as useEffect9, useState as useState9 } from "react";
|
|
|
2124
2151
|
// src/hooks/queries/useFops.ts
|
|
2125
2152
|
import {
|
|
2126
2153
|
FormOfPaymentType as FormOfPaymentType2,
|
|
2154
|
+
RailConfigType,
|
|
2127
2155
|
getFops
|
|
2128
2156
|
} from "@funkit/api-base";
|
|
2129
2157
|
import { solanaChain as solanaChain2 } from "@funkit/chains";
|
|
@@ -4451,7 +4479,8 @@ var useFops = () => {
|
|
|
4451
4479
|
transferInit
|
|
4452
4480
|
);
|
|
4453
4481
|
const isValidRecipientAddress = !!recipientAddress && isAddressCompatibleWithChain(recipientAddress, Number(targetChain));
|
|
4454
|
-
const
|
|
4482
|
+
const countryCode = userIpInfo?.alpha2;
|
|
4483
|
+
const isEnabled = isSwappedEnabled && !comingSoon && !!apiKey && !!targetAsset && !!targetChain && !isSwappedCurrencyCodeLoading && isValidRecipientAddress && !!transferInit && !!countryCode;
|
|
4455
4484
|
const query = useQuery9({
|
|
4456
4485
|
// `prefillFiatEmail` is intentionally NOT in the queryKey: it's read inside
|
|
4457
4486
|
// `queryFn` and captured at fetch time, so post-mount changes don't trigger a refetch
|
|
@@ -4463,7 +4492,7 @@ var useFops = () => {
|
|
|
4463
4492
|
targetAsset,
|
|
4464
4493
|
targetChain,
|
|
4465
4494
|
swappedCurrencyCode,
|
|
4466
|
-
|
|
4495
|
+
countryCode,
|
|
4467
4496
|
apiKey,
|
|
4468
4497
|
themeConfig,
|
|
4469
4498
|
fopPriority,
|
|
@@ -4490,22 +4519,31 @@ var useFops = () => {
|
|
|
4490
4519
|
apiKey,
|
|
4491
4520
|
logger,
|
|
4492
4521
|
params: {
|
|
4522
|
+
// recipientAddress and destinationToken are required by the backend's
|
|
4523
|
+
// Zod schema but ignored when railConfigs is present — the
|
|
4524
|
+
// FIAT_TO_CRYPTO handler reads railConfigs[].recipientTargets.
|
|
4493
4525
|
recipientAddress,
|
|
4494
4526
|
userId,
|
|
4495
4527
|
destinationToken,
|
|
4496
4528
|
fiatCurrencyCode: swappedCurrencyCode,
|
|
4497
|
-
countryCode
|
|
4498
|
-
|
|
4499
|
-
{ recipientAddress, destinationToken },
|
|
4529
|
+
countryCode,
|
|
4530
|
+
railConfigs: [
|
|
4500
4531
|
{
|
|
4501
|
-
|
|
4502
|
-
|
|
4532
|
+
type: RailConfigType.FIAT_TO_CRYPTO,
|
|
4533
|
+
userId,
|
|
4534
|
+
countryCode,
|
|
4535
|
+
fiatCurrencyCode: swappedCurrencyCode,
|
|
4536
|
+
recipientTargets: [
|
|
4537
|
+
{ recipientAddress, destinationToken },
|
|
4538
|
+
{
|
|
4539
|
+
recipientAddress: transferInit.solanaAddr,
|
|
4540
|
+
destinationToken: secondaryDestinationToken
|
|
4541
|
+
}
|
|
4542
|
+
],
|
|
4543
|
+
thirdPartyPaymentConfigs,
|
|
4544
|
+
checkoutLimitsCriteria: { defaultMinAmount: defaultMinAmountEur }
|
|
4503
4545
|
}
|
|
4504
|
-
]
|
|
4505
|
-
thirdPartyPaymentConfigs,
|
|
4506
|
-
checkoutLimitsCriteria: {
|
|
4507
|
-
defaultMinAmount: defaultMinAmountEur
|
|
4508
|
-
}
|
|
4546
|
+
]
|
|
4509
4547
|
}
|
|
4510
4548
|
});
|
|
4511
4549
|
const validFopsData = validateFops(response, "useFops");
|
|
@@ -8498,6 +8536,9 @@ function useSwappedContext() {
|
|
|
8498
8536
|
return ctx;
|
|
8499
8537
|
}
|
|
8500
8538
|
|
|
8539
|
+
// src/modals/CheckoutModal/SwappedIframe/SwappedIframe.css.ts
|
|
8540
|
+
var scrollableIframeWrapper = "oxtlcp0";
|
|
8541
|
+
|
|
8501
8542
|
// src/modals/CheckoutModal/SwappedIframe/SwappedIframe.tsx
|
|
8502
8543
|
var SwappedIframe = () => {
|
|
8503
8544
|
const { iframeUrl, isSwappedReady, isActive, setIframeRef } = useSwappedContext();
|
|
@@ -8517,12 +8558,13 @@ var SwappedIframe = () => {
|
|
|
8517
8558
|
Box,
|
|
8518
8559
|
{
|
|
8519
8560
|
background: "modalBackground",
|
|
8561
|
+
className: scrollableIframeWrapper,
|
|
8520
8562
|
style: {
|
|
8521
8563
|
position: "absolute",
|
|
8522
8564
|
inset: 0,
|
|
8523
8565
|
width: "100%",
|
|
8524
8566
|
height: "100%",
|
|
8525
|
-
overflow: "
|
|
8567
|
+
overflow: "auto",
|
|
8526
8568
|
overscrollBehavior: "contain",
|
|
8527
8569
|
zIndex: shouldShow ? 1 : -1,
|
|
8528
8570
|
pointerEvents: shouldShow ? "auto" : "none",
|
|
@@ -9838,6 +9880,7 @@ var en_default = {
|
|
|
9838
9880
|
methodFast: "Fast",
|
|
9839
9881
|
methodSecure: "Native Bridge",
|
|
9840
9882
|
fastDisclaimer: "USDC Perps only \xB7 Multiple chains \xB7 Instant",
|
|
9883
|
+
fastDisclaimerUnified: "USDC only \xB7 Multiple chains \xB7 Instant",
|
|
9841
9884
|
secureDisclaimer: "All tokens \xB7 Ethereum chain only \xB7 {{delay}}",
|
|
9842
9885
|
secureFallbackDelay: "60+ minutes",
|
|
9843
9886
|
lighterSecureAddressTooltip: "You can only withdraw to your connected wallet",
|
|
@@ -9987,8 +10030,8 @@ var en_default = {
|
|
|
9987
10030
|
selectPaymentMethod: "Select payment method",
|
|
9988
10031
|
moreOptions: "More options",
|
|
9989
10032
|
mostPopular: "Most popular",
|
|
9990
|
-
savedPaymentMethods: "Saved
|
|
9991
|
-
otherOptions: "
|
|
10033
|
+
savedPaymentMethods: "Saved cards",
|
|
10034
|
+
otherOptions: "More options",
|
|
9992
10035
|
connected: "Connected",
|
|
9993
10036
|
more: "more",
|
|
9994
10037
|
walletDisplayLabel: "{{walletLabel}}",
|
|
@@ -10444,6 +10487,7 @@ var es_default = {
|
|
|
10444
10487
|
methodFast: "R\xE1pido",
|
|
10445
10488
|
methodSecure: "Puente Nativo",
|
|
10446
10489
|
fastDisclaimer: "Solo USDC Perps \xB7 M\xFAltiples cadenas \xB7 Instant\xE1neo",
|
|
10490
|
+
fastDisclaimerUnified: "Solo USDC \xB7 M\xFAltiples cadenas \xB7 Instant\xE1neo",
|
|
10447
10491
|
secureDisclaimer: "Todos los tokens \xB7 Solo cadena Ethereum \xB7 {{delay}}",
|
|
10448
10492
|
secureFallbackDelay: "60+ minutos",
|
|
10449
10493
|
lighterSecureAddressTooltip: "Solo puedes retirar a tu billetera conectada",
|
|
@@ -10590,8 +10634,8 @@ var es_default = {
|
|
|
10590
10634
|
selectPaymentMethod: "Seleccionar m\xE9todo de pago",
|
|
10591
10635
|
moreOptions: "M\xE1s opciones",
|
|
10592
10636
|
mostPopular: "M\xE1s popular",
|
|
10593
|
-
savedPaymentMethods: "
|
|
10594
|
-
otherOptions: "
|
|
10637
|
+
savedPaymentMethods: "Tarjetas guardadas",
|
|
10638
|
+
otherOptions: "M\xE1s opciones",
|
|
10595
10639
|
more: "m\xE1s",
|
|
10596
10640
|
walletDisplayLabel: "{{walletLabel}}",
|
|
10597
10641
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -11047,6 +11091,7 @@ var fr_default = {
|
|
|
11047
11091
|
methodFast: "Rapide",
|
|
11048
11092
|
methodSecure: "Pont natif",
|
|
11049
11093
|
fastDisclaimer: "USDC Perps uniquement \xB7 Plusieurs cha\xEEnes \xB7 Instantan\xE9",
|
|
11094
|
+
fastDisclaimerUnified: "USDC uniquement \xB7 Plusieurs cha\xEEnes \xB7 Instantan\xE9",
|
|
11050
11095
|
secureDisclaimer: "Tous les tokens \xB7 Cha\xEEne Ethereum uniquement \xB7 {{delay}}",
|
|
11051
11096
|
secureFallbackDelay: "60+ minutes",
|
|
11052
11097
|
lighterSecureAddressTooltip: "Vous ne pouvez retirer que vers votre portefeuille connect\xE9",
|
|
@@ -11193,8 +11238,8 @@ var fr_default = {
|
|
|
11193
11238
|
selectPaymentMethod: "S\xE9lectionnez le mode de paiement",
|
|
11194
11239
|
moreOptions: "Plus d'options",
|
|
11195
11240
|
mostPopular: "Les plus populaires",
|
|
11196
|
-
savedPaymentMethods: "
|
|
11197
|
-
otherOptions: "
|
|
11241
|
+
savedPaymentMethods: "Cartes enregistr\xE9es",
|
|
11242
|
+
otherOptions: "Plus d'options",
|
|
11198
11243
|
more: "plus",
|
|
11199
11244
|
walletDisplayLabel: "{{walletLabel}}",
|
|
11200
11245
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -11650,6 +11695,7 @@ var ja_default = {
|
|
|
11650
11695
|
methodFast: "\u9AD8\u901F",
|
|
11651
11696
|
methodSecure: "\u30CD\u30A4\u30C6\u30A3\u30D6\u30D6\u30EA\u30C3\u30B8",
|
|
11652
11697
|
fastDisclaimer: "USDC\u30D1\u30FC\u30D7\u30B9\u306E\u307F \xB7 \u8907\u6570\u30C1\u30A7\u30FC\u30F3 \xB7 \u5373\u6642",
|
|
11698
|
+
fastDisclaimerUnified: "USDC\u306E\u307F \xB7 \u8907\u6570\u30C1\u30A7\u30FC\u30F3 \xB7 \u5373\u6642",
|
|
11653
11699
|
secureDisclaimer: "\u5168\u30C8\u30FC\u30AF\u30F3 \xB7 \u30A4\u30FC\u30B5\u30EA\u30A2\u30E0\u30C1\u30A7\u30FC\u30F3\u306E\u307F \xB7 {{delay}}",
|
|
11654
11700
|
secureFallbackDelay: "60\u5206\u4EE5\u4E0A",
|
|
11655
11701
|
lighterSecureAddressTooltip: "\u63A5\u7D9A\u4E2D\u306E\u30A6\u30A9\u30EC\u30C3\u30C8\u306B\u306E\u307F\u51FA\u91D1\u3067\u304D\u307E\u3059",
|
|
@@ -11796,8 +11842,8 @@ var ja_default = {
|
|
|
11796
11842
|
selectPaymentMethod: "\u652F\u6255\u3044\u65B9\u6CD5\u3092\u9078\u629E",
|
|
11797
11843
|
moreOptions: "\u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3",
|
|
11798
11844
|
mostPopular: "\u4EBA\u6C17",
|
|
11799
|
-
savedPaymentMethods: "\u4FDD\u5B58\u6E08\u307F\
|
|
11800
|
-
otherOptions: "\u305D\u306E\u4ED6\u306E\
|
|
11845
|
+
savedPaymentMethods: "\u4FDD\u5B58\u6E08\u307F\u30AB\u30FC\u30C9",
|
|
11846
|
+
otherOptions: "\u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3",
|
|
11801
11847
|
more: "\u3082\u3063\u3068\u898B\u308B",
|
|
11802
11848
|
walletDisplayLabel: "{{walletLabel}}",
|
|
11803
11849
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -12253,6 +12299,7 @@ var ko_default = {
|
|
|
12253
12299
|
methodFast: "\uBE60\uB978",
|
|
12254
12300
|
methodSecure: "\uB124\uC774\uD2F0\uBE0C \uBE0C\uB9AC\uC9C0",
|
|
12255
12301
|
fastDisclaimer: "USDC \uD37C\uD504\uC2A4\uB9CC \xB7 \uB2E4\uC911 \uCCB4\uC778 \xB7 \uC989\uC2DC",
|
|
12302
|
+
fastDisclaimerUnified: "USDC\uB9CC \xB7 \uB2E4\uC911 \uCCB4\uC778 \xB7 \uC989\uC2DC",
|
|
12256
12303
|
secureDisclaimer: "\uBAA8\uB4E0 \uD1A0\uD070 \xB7 \uC774\uB354\uB9AC\uC6C0 \uCCB4\uC778\uB9CC \xB7 {{delay}}",
|
|
12257
12304
|
secureFallbackDelay: "60\uBD84 \uC774\uC0C1",
|
|
12258
12305
|
lighterSecureAddressTooltip: "\uC5F0\uACB0\uB41C \uC9C0\uAC11\uC73C\uB85C\uB9CC \uCD9C\uAE08\uD560 \uC218 \uC788\uC2B5\uB2C8\uB2E4",
|
|
@@ -12399,8 +12446,8 @@ var ko_default = {
|
|
|
12399
12446
|
selectPaymentMethod: "\uACB0\uC81C \uBC29\uBC95 \uC120\uD0DD",
|
|
12400
12447
|
moreOptions: "\uB354 \uB9CE\uC740 \uC635\uC158",
|
|
12401
12448
|
mostPopular: "\uC778\uAE30",
|
|
12402
|
-
savedPaymentMethods: "\uC800\uC7A5\uB41C \
|
|
12403
|
-
otherOptions: "\
|
|
12449
|
+
savedPaymentMethods: "\uC800\uC7A5\uB41C \uCE74\uB4DC",
|
|
12450
|
+
otherOptions: "\uB354 \uB9CE\uC740 \uC635\uC158",
|
|
12404
12451
|
more: "\uB354 \uBCF4\uAE30",
|
|
12405
12452
|
walletDisplayLabel: "{{walletLabel}}",
|
|
12406
12453
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -12856,6 +12903,7 @@ var ru_default = {
|
|
|
12856
12903
|
methodFast: "\u0411\u044B\u0441\u0442\u0440\u044B\u0439",
|
|
12857
12904
|
methodSecure: "\u041D\u0430\u0442\u0438\u0432\u043D\u044B\u0439 \u043C\u043E\u0441\u0442",
|
|
12858
12905
|
fastDisclaimer: "\u0422\u043E\u043B\u044C\u043A\u043E USDC \u0431\u0435\u0441\u0441\u0440\u043E\u0447\u043D\u044B\u0435 \xB7 \u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u0435\u0439 \xB7 \u041C\u0433\u043D\u043E\u0432\u0435\u043D\u043D\u043E",
|
|
12906
|
+
fastDisclaimerUnified: "\u0422\u043E\u043B\u044C\u043A\u043E USDC \xB7 \u041D\u0435\u0441\u043A\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u0435\u0439 \xB7 \u041C\u0433\u043D\u043E\u0432\u0435\u043D\u043D\u043E",
|
|
12859
12907
|
secureDisclaimer: "\u0412\u0441\u0435 \u0442\u043E\u043A\u0435\u043D\u044B \xB7 \u0422\u043E\u043B\u044C\u043A\u043E \u0441\u0435\u0442\u044C Ethereum \xB7 {{delay}}",
|
|
12860
12908
|
secureFallbackDelay: "60+ \u043C\u0438\u043D\u0443\u0442",
|
|
12861
12909
|
lighterSecureAddressTooltip: "\u0412\u044B\u0432\u043E\u0434 \u0432\u043E\u0437\u043C\u043E\u0436\u0435\u043D \u0442\u043E\u043B\u044C\u043A\u043E \u043D\u0430 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D\u043D\u044B\u0439 \u043A\u043E\u0448\u0435\u043B\u0451\u043A",
|
|
@@ -13002,8 +13050,8 @@ var ru_default = {
|
|
|
13002
13050
|
selectPaymentMethod: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B",
|
|
13003
13051
|
moreOptions: "\u0411\u043E\u043B\u044C\u0448\u0435 \u043E\u043F\u0446\u0438\u0439",
|
|
13004
13052
|
mostPopular: "\u0421\u0430\u043C\u044B\u0435 \u043F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
|
|
13005
|
-
savedPaymentMethods: "\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \
|
|
13006
|
-
otherOptions: "\
|
|
13053
|
+
savedPaymentMethods: "\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u043A\u0430\u0440\u0442\u044B",
|
|
13054
|
+
otherOptions: "\u0411\u043E\u043B\u044C\u0448\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432",
|
|
13007
13055
|
more: "\u0431\u043E\u043B\u044C\u0448\u0435",
|
|
13008
13056
|
walletDisplayLabel: "{{walletLabel}}",
|
|
13009
13057
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -13459,6 +13507,7 @@ var tr_default = {
|
|
|
13459
13507
|
methodFast: "H\u0131zl\u0131",
|
|
13460
13508
|
methodSecure: "Yerel K\xF6pr\xFC",
|
|
13461
13509
|
fastDisclaimer: "Yaln\u0131zca USDC Perps \xB7 Birden fazla zincir \xB7 An\u0131nda",
|
|
13510
|
+
fastDisclaimerUnified: "Yaln\u0131zca USDC \xB7 Birden fazla zincir \xB7 An\u0131nda",
|
|
13462
13511
|
secureDisclaimer: "T\xFCm tokenlar \xB7 Yaln\u0131zca Ethereum zinciri \xB7 {{delay}}",
|
|
13463
13512
|
secureFallbackDelay: "60+ dakika",
|
|
13464
13513
|
lighterSecureAddressTooltip: "Yaln\u0131zca ba\u011Fl\u0131 c\xFCzdan\u0131n\u0131za para \xE7ekebilirsiniz",
|
|
@@ -13605,8 +13654,8 @@ var tr_default = {
|
|
|
13605
13654
|
selectPaymentMethod: "\xD6deme y\xF6ntemi se\xE7in",
|
|
13606
13655
|
moreOptions: "Daha fazla se\xE7enek",
|
|
13607
13656
|
mostPopular: "En pop\xFCler",
|
|
13608
|
-
savedPaymentMethods: "Kay\u0131tl\u0131
|
|
13609
|
-
otherOptions: "
|
|
13657
|
+
savedPaymentMethods: "Kay\u0131tl\u0131 kartlar",
|
|
13658
|
+
otherOptions: "Daha fazla se\xE7enek",
|
|
13610
13659
|
more: "daha fazla",
|
|
13611
13660
|
walletDisplayLabel: "{{walletLabel}}",
|
|
13612
13661
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -14062,6 +14111,7 @@ var zh_default = {
|
|
|
14062
14111
|
methodFast: "\u5FEB\u901F",
|
|
14063
14112
|
methodSecure: "\u539F\u751F\u8DE8\u94FE\u6865",
|
|
14064
14113
|
fastDisclaimer: "\u4EC5\u9650USDC\u6C38\u7EED \xB7 \u591A\u94FE \xB7 \u5373\u65F6",
|
|
14114
|
+
fastDisclaimerUnified: "\u4EC5\u9650USDC \xB7 \u591A\u94FE \xB7 \u5373\u65F6",
|
|
14065
14115
|
secureDisclaimer: "\u6240\u6709\u4EE3\u5E01 \xB7 \u4EC5\u4EE5\u592A\u574A\u94FE \xB7 {{delay}}",
|
|
14066
14116
|
secureFallbackDelay: "60\u5206\u949F\u4EE5\u4E0A",
|
|
14067
14117
|
lighterSecureAddressTooltip: "\u60A8\u53EA\u80FD\u63D0\u73B0\u5230\u5DF2\u8FDE\u63A5\u7684\u94B1\u5305",
|
|
@@ -14208,8 +14258,8 @@ var zh_default = {
|
|
|
14208
14258
|
selectPaymentMethod: "\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",
|
|
14209
14259
|
moreOptions: "\u66F4\u591A\u9009\u9879",
|
|
14210
14260
|
mostPopular: "\u6700\u53D7\u6B22\u8FCE",
|
|
14211
|
-
savedPaymentMethods: "\u5DF2\u4FDD\u5B58\u7684\
|
|
14212
|
-
otherOptions: "\
|
|
14261
|
+
savedPaymentMethods: "\u5DF2\u4FDD\u5B58\u7684\u5361\u7247",
|
|
14262
|
+
otherOptions: "\u66F4\u591A\u9009\u9879",
|
|
14213
14263
|
more: "\u66F4\u591A",
|
|
14214
14264
|
walletDisplayLabel: "{{walletLabel}}",
|
|
14215
14265
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -19225,23 +19275,19 @@ function resolveLighterAssetIndex(lighterAssets, selectedSourceToken) {
|
|
|
19225
19275
|
)?.asset_id;
|
|
19226
19276
|
return lookupAssetId ?? (selectedSymbol === "USDC" ? LIGHTER_USDC_ASSET_INDEX : void 0);
|
|
19227
19277
|
}
|
|
19228
|
-
function buildLighterSourceTokenOptions(config, lighterAssets) {
|
|
19278
|
+
function buildLighterSourceTokenOptions(config, lighterAssets, isUnifiedTradingMode = false) {
|
|
19229
19279
|
const isLighterFast = config.sourceChainId === RELAY_LIGHTER_CHAIN_ID2;
|
|
19230
|
-
|
|
19231
|
-
return [
|
|
19232
|
-
{
|
|
19233
|
-
symbol: "USDC",
|
|
19234
|
-
label: "USDC (Perps)",
|
|
19235
|
-
iconSrc: getTokenIconUrl("USDC")
|
|
19236
|
-
}
|
|
19237
|
-
];
|
|
19238
|
-
}
|
|
19239
|
-
const usdcPerpsOption = {
|
|
19280
|
+
const usdcOption = {
|
|
19240
19281
|
symbol: "USDC",
|
|
19241
|
-
label: "USDC (Perps)",
|
|
19282
|
+
label: isUnifiedTradingMode ? "USDC" : "USDC (Perps)",
|
|
19242
19283
|
iconSrc: getTokenIconUrl("USDC")
|
|
19243
19284
|
};
|
|
19244
|
-
|
|
19285
|
+
if (isLighterFast) {
|
|
19286
|
+
return [usdcOption];
|
|
19287
|
+
}
|
|
19288
|
+
const spotOptions = lighterAssets.filter(
|
|
19289
|
+
(asset) => !(isUnifiedTradingMode && asset.symbol.toUpperCase() === "USDC")
|
|
19290
|
+
).map((asset) => {
|
|
19245
19291
|
if (asset.symbol.toUpperCase() === "USDC") {
|
|
19246
19292
|
return {
|
|
19247
19293
|
symbol: LIGHTER_USDC_SPOT_SYMBOL,
|
|
@@ -19255,7 +19301,7 @@ function buildLighterSourceTokenOptions(config, lighterAssets) {
|
|
|
19255
19301
|
iconSrc: getTokenIconUrl(asset.symbol)
|
|
19256
19302
|
};
|
|
19257
19303
|
});
|
|
19258
|
-
return [
|
|
19304
|
+
return [usdcOption, ...spotOptions];
|
|
19259
19305
|
}
|
|
19260
19306
|
function useLighterWithdrawal(config, setRecipientAddress) {
|
|
19261
19307
|
const { apiKey } = useFunkitConfig();
|
|
@@ -19267,7 +19313,7 @@ function useLighterWithdrawal(config, setRecipientAddress) {
|
|
|
19267
19313
|
setRecipientAddress(connectedAddress);
|
|
19268
19314
|
}
|
|
19269
19315
|
}, [isLighterSecure, connectedAddress, setRecipientAddress]);
|
|
19270
|
-
const { mainAccountIndex } = useLighterAccounts({
|
|
19316
|
+
const { mainAccountIndex, isUnifiedTradingMode } = useLighterAccounts({
|
|
19271
19317
|
address: connectedAddress
|
|
19272
19318
|
});
|
|
19273
19319
|
const {
|
|
@@ -19301,6 +19347,7 @@ function useLighterWithdrawal(config, setRecipientAddress) {
|
|
|
19301
19347
|
return {
|
|
19302
19348
|
isLighterSecure,
|
|
19303
19349
|
isLighterFast,
|
|
19350
|
+
isUnifiedTradingMode,
|
|
19304
19351
|
connectedAddress,
|
|
19305
19352
|
lighterBalances,
|
|
19306
19353
|
lighterAssets,
|
|
@@ -19308,11 +19355,15 @@ function useLighterWithdrawal(config, setRecipientAddress) {
|
|
|
19308
19355
|
invalidateLighterAccount
|
|
19309
19356
|
};
|
|
19310
19357
|
}
|
|
19311
|
-
function useLighterSourceTokenOptions(config, apiKey, lighterAssets) {
|
|
19358
|
+
function useLighterSourceTokenOptions(config, apiKey, lighterAssets, isUnifiedTradingMode = false) {
|
|
19312
19359
|
if (!isLighterxyzCustomer(apiKey)) {
|
|
19313
19360
|
return void 0;
|
|
19314
19361
|
}
|
|
19315
|
-
return buildLighterSourceTokenOptions(
|
|
19362
|
+
return buildLighterSourceTokenOptions(
|
|
19363
|
+
config,
|
|
19364
|
+
lighterAssets,
|
|
19365
|
+
isUnifiedTradingMode
|
|
19366
|
+
);
|
|
19316
19367
|
}
|
|
19317
19368
|
function LighterSecureLockedField({
|
|
19318
19369
|
tooltip,
|
|
@@ -19625,9 +19676,7 @@ import {
|
|
|
19625
19676
|
FormOfPaymentType as FormOfPaymentType3
|
|
19626
19677
|
} from "@funkit/api-base";
|
|
19627
19678
|
import { lightningChain } from "@funkit/chains";
|
|
19628
|
-
import {
|
|
19629
|
-
formatCurrencyAndStringify as formatCurrencyAndStringify4
|
|
19630
|
-
} from "@funkit/utils";
|
|
19679
|
+
import { formatCurrencyAndStringify as formatCurrencyAndStringify4 } from "@funkit/utils";
|
|
19631
19680
|
import React92, { useEffect as useEffect33 } from "react";
|
|
19632
19681
|
|
|
19633
19682
|
// src/hooks/useCheckoutTimeEstimate.ts
|
|
@@ -19701,7 +19750,7 @@ function useCheckoutTimeEstimate(latestQuote, originalTimeEstimationMs, paymentM
|
|
|
19701
19750
|
import { useMemo as useMemo28 } from "react";
|
|
19702
19751
|
|
|
19703
19752
|
// src/hooks/queries/useSwappedExchanges.ts
|
|
19704
|
-
import { RailConfigType, getFops as getFops2 } from "@funkit/api-base";
|
|
19753
|
+
import { RailConfigType as RailConfigType2, getFops as getFops2 } from "@funkit/api-base";
|
|
19705
19754
|
import { bitcoinChain as bitcoinChain2, solanaChain as solanaChain3, tronChain as tronChain2 } from "@funkit/chains";
|
|
19706
19755
|
import { keepPreviousData as keepPreviousData2, useQuery as useQuery14 } from "@tanstack/react-query";
|
|
19707
19756
|
import { useMemo as useMemo27 } from "react";
|
|
@@ -19820,7 +19869,7 @@ var useSwappedExchanges = () => {
|
|
|
19820
19869
|
countryCode,
|
|
19821
19870
|
railConfigs: [
|
|
19822
19871
|
{
|
|
19823
|
-
type:
|
|
19872
|
+
type: RailConfigType2.CRYPTO_TO_CRYPTO,
|
|
19824
19873
|
userId,
|
|
19825
19874
|
countryCode,
|
|
19826
19875
|
baseCurrencyCode: swappedCurrencyCode,
|
|
@@ -20728,30 +20777,51 @@ function getIconFromUiConfig(paymentMethod, iconConfig, defaultIconSize = 12) {
|
|
|
20728
20777
|
);
|
|
20729
20778
|
}
|
|
20730
20779
|
}
|
|
20731
|
-
|
|
20732
|
-
const
|
|
20733
|
-
|
|
20734
|
-
|
|
20735
|
-
|
|
20736
|
-
|
|
20780
|
+
function resolveConnectWalletChainOrder(configuredOrder) {
|
|
20781
|
+
const defaultChainIds = getDefaultChains().map(({ id }) => String(id));
|
|
20782
|
+
if (!configuredOrder.length) {
|
|
20783
|
+
return defaultChainIds;
|
|
20784
|
+
}
|
|
20785
|
+
const defaultChainIdSet = new Set(defaultChainIds);
|
|
20786
|
+
const prioritized = configuredOrder.map(String).filter((id) => defaultChainIdSet.has(id));
|
|
20787
|
+
const prioritizedSet = new Set(prioritized);
|
|
20788
|
+
const remaining = defaultChainIds.filter((id) => !prioritizedSet.has(id));
|
|
20789
|
+
return [...prioritized, ...remaining];
|
|
20790
|
+
}
|
|
20791
|
+
function MoreIconsIndicator() {
|
|
20792
|
+
return /* @__PURE__ */ React92.createElement(
|
|
20793
|
+
Box,
|
|
20794
|
+
{
|
|
20795
|
+
background: "secondaryBackground",
|
|
20796
|
+
color: "secondaryText",
|
|
20797
|
+
borderRadius: "full",
|
|
20798
|
+
style: { width: 16, height: 16, flexShrink: 0, position: "relative" }
|
|
20799
|
+
},
|
|
20800
|
+
/* @__PURE__ */ React92.createElement(
|
|
20801
|
+
"svg",
|
|
20737
20802
|
{
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20803
|
+
width: "10",
|
|
20804
|
+
height: "10",
|
|
20805
|
+
viewBox: "0 0 10 10",
|
|
20806
|
+
style: {
|
|
20807
|
+
position: "absolute",
|
|
20808
|
+
top: "50%",
|
|
20809
|
+
left: "50%",
|
|
20810
|
+
transform: "translate(-50%,-50%)"
|
|
20811
|
+
}
|
|
20741
20812
|
},
|
|
20742
20813
|
/* @__PURE__ */ React92.createElement(
|
|
20743
|
-
|
|
20814
|
+
"path",
|
|
20744
20815
|
{
|
|
20745
|
-
|
|
20746
|
-
|
|
20747
|
-
|
|
20748
|
-
|
|
20749
|
-
width: 12
|
|
20816
|
+
d: "M5 1v8M1 5h8",
|
|
20817
|
+
stroke: "currentColor",
|
|
20818
|
+
strokeWidth: "1.5",
|
|
20819
|
+
strokeLinecap: "round"
|
|
20750
20820
|
}
|
|
20751
20821
|
)
|
|
20752
|
-
)
|
|
20753
|
-
|
|
20754
|
-
}
|
|
20822
|
+
)
|
|
20823
|
+
);
|
|
20824
|
+
}
|
|
20755
20825
|
function ConnectWalletItem({
|
|
20756
20826
|
isClickable,
|
|
20757
20827
|
isActive,
|
|
@@ -20762,12 +20832,16 @@ function ConnectWalletItem({
|
|
|
20762
20832
|
const { textCustomizations } = useFunkitConfig();
|
|
20763
20833
|
const { t } = useFunkitTranslation();
|
|
20764
20834
|
const walletLabel = useWalletLabel();
|
|
20835
|
+
const connectWalletChainIconOrder = useDynamicConfig(
|
|
20836
|
+
"connectwalletchainiconorder"
|
|
20837
|
+
);
|
|
20838
|
+
const chainIds = resolveConnectWalletChainOrder(connectWalletChainIconOrder);
|
|
20765
20839
|
return /* @__PURE__ */ React92.createElement(
|
|
20766
20840
|
FunPaymentMethodItem,
|
|
20767
20841
|
{
|
|
20768
20842
|
keyIcon: paymentIcon,
|
|
20769
20843
|
keyText: walletLabel,
|
|
20770
|
-
valueIcon: customValueIcon ??
|
|
20844
|
+
valueIcon: customValueIcon ?? /* @__PURE__ */ React92.createElement(SupportedChainList, { chainIdList: chainIds }),
|
|
20771
20845
|
onClick,
|
|
20772
20846
|
isDisabled: !isClickable,
|
|
20773
20847
|
disclaimerText: textCustomizations.paymentMethodSubtitles.accountBalance || t("payment.disclaimerText", {
|
|
@@ -20781,39 +20855,26 @@ function ConnectWalletItem({
|
|
|
20781
20855
|
}
|
|
20782
20856
|
function SupportedChainList({
|
|
20783
20857
|
chainIdList,
|
|
20784
|
-
iconSize =
|
|
20858
|
+
iconSize = 16,
|
|
20785
20859
|
style
|
|
20786
20860
|
}) {
|
|
20787
|
-
|
|
20788
|
-
|
|
20789
|
-
|
|
20790
|
-
|
|
20791
|
-
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
20799
|
-
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
/* @__PURE__ */ React92.createElement(
|
|
20805
|
-
AsyncImage,
|
|
20806
|
-
{
|
|
20807
|
-
alt: metadata?.name ?? "",
|
|
20808
|
-
borderRadius: "full",
|
|
20809
|
-
src: metadata?.iconUrl ?? "",
|
|
20810
|
-
height: iconSize,
|
|
20811
|
-
width: iconSize
|
|
20812
|
-
}
|
|
20813
|
-
)
|
|
20814
|
-
);
|
|
20815
|
-
})
|
|
20816
|
-
);
|
|
20861
|
+
const visibleChains = chainIdList.slice(0, 4);
|
|
20862
|
+
const hasMore = chainIdList.length > 4;
|
|
20863
|
+
return /* @__PURE__ */ React92.createElement(Box, { display: "flex", alignItems: "center", gap: "2", style }, visibleChains.map((chainId2) => {
|
|
20864
|
+
const metadata = chainMetadataById[chainId2];
|
|
20865
|
+
return /* @__PURE__ */ React92.createElement(
|
|
20866
|
+
AsyncImage,
|
|
20867
|
+
{
|
|
20868
|
+
key: chainId2,
|
|
20869
|
+
alt: metadata?.name ?? "",
|
|
20870
|
+
borderRadius: "full",
|
|
20871
|
+
borderColor: "generalBorderDim",
|
|
20872
|
+
src: metadata?.iconUrl ?? "",
|
|
20873
|
+
height: iconSize,
|
|
20874
|
+
width: iconSize
|
|
20875
|
+
}
|
|
20876
|
+
);
|
|
20877
|
+
}), hasMore && /* @__PURE__ */ React92.createElement(MoreIconsIndicator, null));
|
|
20817
20878
|
}
|
|
20818
20879
|
function PaymentMethodIcon({
|
|
20819
20880
|
paymentIcon,
|
|
@@ -20864,7 +20925,7 @@ var ConnectedBluvoPaymentMethodItem = ({
|
|
|
20864
20925
|
});
|
|
20865
20926
|
const hasLowBalance = !isPending && sourceBalance < getUsdMinAmount();
|
|
20866
20927
|
const isDisabled = disabled || isPending || !!isBalanceError || hasLowBalance || isUserGeoblocked;
|
|
20867
|
-
const icon = isPending ? /* @__PURE__ */ React92.createElement(SpinnerIcon, { size: 20 }) : label.icon;
|
|
20928
|
+
const icon = isPending ? /* @__PURE__ */ React92.createElement(SpinnerIcon, { size: 20 }) : /* @__PURE__ */ React92.createElement("div", { style: { borderRadius: "50%", overflow: "hidden" } }, label.icon);
|
|
20868
20929
|
useEffect33(() => {
|
|
20869
20930
|
if (isPending) {
|
|
20870
20931
|
return;
|
|
@@ -21062,13 +21123,15 @@ var BrokeragePaymentMethodItem = ({
|
|
|
21062
21123
|
const { isUserGeoblocked } = useFunkitUserIp();
|
|
21063
21124
|
const { t } = useFunkitTranslation();
|
|
21064
21125
|
const { textCustomizations } = useFunkitConfig();
|
|
21065
|
-
const { options: exchangeOptions } = useExchangeOptions({ iconSize:
|
|
21126
|
+
const { options: exchangeOptions } = useExchangeOptions({ iconSize: 16 });
|
|
21066
21127
|
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
21067
21128
|
null,
|
|
21068
21129
|
BROKERAGE_TIME_ESTIMATE,
|
|
21069
21130
|
PaymentMethod.BROKERAGE,
|
|
21070
21131
|
false
|
|
21071
21132
|
);
|
|
21133
|
+
const visibleExchangeOptions = exchangeOptions.slice(0, 4);
|
|
21134
|
+
const hasMoreExchanges = exchangeOptions.length > 4;
|
|
21072
21135
|
return /* @__PURE__ */ React92.createElement(
|
|
21073
21136
|
FunPaymentMethodItem,
|
|
21074
21137
|
{
|
|
@@ -21076,7 +21139,17 @@ var BrokeragePaymentMethodItem = ({
|
|
|
21076
21139
|
keyIcon: paymentIcon,
|
|
21077
21140
|
keyText: textCustomizations.brokerageOrExchange,
|
|
21078
21141
|
onClick,
|
|
21079
|
-
valueIcon: isUserGeoblocked ? null : customValueIcon ?? /* @__PURE__ */ React92.createElement(Box, { display: "flex", gap: "2", alignItems: "center" },
|
|
21142
|
+
valueIcon: isUserGeoblocked ? null : customValueIcon ?? /* @__PURE__ */ React92.createElement(Box, { display: "flex", gap: "2", alignItems: "center" }, visibleExchangeOptions.map((option) => /* @__PURE__ */ React92.createElement(
|
|
21143
|
+
"div",
|
|
21144
|
+
{
|
|
21145
|
+
key: brokerageOptionKey(option),
|
|
21146
|
+
style: {
|
|
21147
|
+
borderRadius: "50%",
|
|
21148
|
+
overflow: "hidden"
|
|
21149
|
+
}
|
|
21150
|
+
},
|
|
21151
|
+
option.icon
|
|
21152
|
+
)), hasMoreExchanges && /* @__PURE__ */ React92.createElement(MoreIconsIndicator, null)),
|
|
21080
21153
|
isDisabled: !isClickable,
|
|
21081
21154
|
disclaimerText: textCustomizations.paymentMethodSubtitles.brokerageOrExchange || t("payment.disclaimerText", {
|
|
21082
21155
|
time: estimatedTimeText,
|
|
@@ -21336,6 +21409,11 @@ function FopPaymentMethodItem({
|
|
|
21336
21409
|
borderRadius: "4"
|
|
21337
21410
|
}
|
|
21338
21411
|
);
|
|
21412
|
+
const processingTimeText = isBankTransfer ? FIAT_PROCESSING_TIME : t("payment.instant");
|
|
21413
|
+
const disclaimerText = disclaimerLimit ? t("payment.disclaimerTextWithLimit", {
|
|
21414
|
+
limit: disclaimerLimit,
|
|
21415
|
+
time: processingTimeText
|
|
21416
|
+
}) : processingTimeText;
|
|
21339
21417
|
return /* @__PURE__ */ React92.createElement(
|
|
21340
21418
|
FunPaymentMethodItem,
|
|
21341
21419
|
{
|
|
@@ -21344,10 +21422,7 @@ function FopPaymentMethodItem({
|
|
|
21344
21422
|
keyIcon,
|
|
21345
21423
|
keyText: labelText,
|
|
21346
21424
|
onClick,
|
|
21347
|
-
disclaimerText
|
|
21348
|
-
limit: disclaimerLimit,
|
|
21349
|
-
time: isBankTransfer ? FIAT_PROCESSING_TIME : t("payment.instant")
|
|
21350
|
-
}),
|
|
21425
|
+
disclaimerText,
|
|
21351
21426
|
testId: testId || `fop-${labelText.toLowerCase().replace(/\s+/g, "-")}`,
|
|
21352
21427
|
valueIcon: disabledBadgeReason ? /* @__PURE__ */ React92.createElement(PaymentMethodDisabledBadge, { reason: disabledBadgeReason }) : void 0
|
|
21353
21428
|
}
|
|
@@ -25968,6 +26043,7 @@ var WithdrawContent = ({
|
|
|
25968
26043
|
const {
|
|
25969
26044
|
isLighterSecure,
|
|
25970
26045
|
isLighterFast,
|
|
26046
|
+
isUnifiedTradingMode,
|
|
25971
26047
|
connectedAddress,
|
|
25972
26048
|
lighterBalances,
|
|
25973
26049
|
lighterAssets,
|
|
@@ -26063,7 +26139,8 @@ var WithdrawContent = ({
|
|
|
26063
26139
|
const sourceTokenOptions = useLighterSourceTokenOptions(
|
|
26064
26140
|
config,
|
|
26065
26141
|
apiKey,
|
|
26066
|
-
lighterAssets
|
|
26142
|
+
lighterAssets,
|
|
26143
|
+
isUnifiedTradingMode
|
|
26067
26144
|
);
|
|
26068
26145
|
const normalizedSelectedToken = selectedToken?.toUpperCase();
|
|
26069
26146
|
const { checkoutItem } = useCheckoutContext();
|
|
@@ -26512,12 +26589,15 @@ var WithdrawContent = ({
|
|
|
26512
26589
|
};
|
|
26513
26590
|
|
|
26514
26591
|
// src/modals/WithdrawalModal/WithdrawalMethodSelect.tsx
|
|
26515
|
-
import {
|
|
26592
|
+
import {
|
|
26593
|
+
getWithdrawalFopsDisclaimerLimit,
|
|
26594
|
+
isSyntheticFop as isSyntheticFop2
|
|
26595
|
+
} from "@funkit/connect-core";
|
|
26516
26596
|
import React139 from "react";
|
|
26517
26597
|
import { Trans as Trans9 } from "react-i18next";
|
|
26518
26598
|
|
|
26519
26599
|
// src/hooks/queries/useWithdrawFops.ts
|
|
26520
|
-
import { RailConfigType as
|
|
26600
|
+
import { RailConfigType as RailConfigType3, getFops as getFops3 } from "@funkit/api-base";
|
|
26521
26601
|
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
26522
26602
|
import { useMemo as useMemo40 } from "react";
|
|
26523
26603
|
|
|
@@ -26629,7 +26709,7 @@ var useWithdrawFops = (params) => {
|
|
|
26629
26709
|
countryCode,
|
|
26630
26710
|
railConfigs: [
|
|
26631
26711
|
{
|
|
26632
|
-
type:
|
|
26712
|
+
type: RailConfigType3.CRYPTO_TO_FIAT,
|
|
26633
26713
|
userId,
|
|
26634
26714
|
countryCode,
|
|
26635
26715
|
fiatCurrencyCode: swappedCurrencyCode,
|
|
@@ -27147,7 +27227,7 @@ function WithdrawalMethodSelect({
|
|
|
27147
27227
|
onCashFopSelect(fop);
|
|
27148
27228
|
},
|
|
27149
27229
|
exchangeRatesData: exchangeRates.data,
|
|
27150
|
-
getDisclaimerLimit:
|
|
27230
|
+
getDisclaimerLimit: (fop, rates) => getWithdrawalFopsDisclaimerLimit(fop, rates, eurMax),
|
|
27151
27231
|
enableSourceGroupLabels: false,
|
|
27152
27232
|
isBelowMinimumBalance
|
|
27153
27233
|
}
|
|
@@ -38236,31 +38316,40 @@ function CopyInputDisplayedAddressEN({
|
|
|
38236
38316
|
}, 2e3);
|
|
38237
38317
|
handleCopy();
|
|
38238
38318
|
}, [isActive, handleCopy, onAddressCopied]);
|
|
38239
|
-
return /* @__PURE__ */ React218.createElement(Box, { className: copyButtonWrapper }, /* @__PURE__ */ React218.createElement(Box, { paddingY: "8", paddingX: "12", width: "full" }, /* @__PURE__ */ React218.createElement(Text, { size: "depositAddressFontSize", className: displayedAddressText }, displayAddress)), /* @__PURE__ */ React218.createElement(FunDivider, { borderColor: "mediumStroke" }), /* @__PURE__ */ React218.createElement(
|
|
38240
|
-
|
|
38241
|
-
{
|
|
38242
|
-
className: copyInputTextDefault,
|
|
38243
|
-
key: `${char}-${i}`,
|
|
38244
|
-
style: {
|
|
38245
|
-
"--animation-name": isActive === null ? "none" : isActive ? textOut : textIn,
|
|
38246
|
-
"--animation-delay": `${i * 0.03 * (isActive ? 1 : i * 0.025) + (!isActive ? 0.05 : 0)}s`,
|
|
38247
|
-
"--animation-opacity": isActive === false ? "0" : "1"
|
|
38248
|
-
}
|
|
38249
|
-
},
|
|
38250
|
-
char === " " ? /* @__PURE__ */ React218.createElement(React218.Fragment, null, "\xA0") : char
|
|
38251
|
-
)), ["ied"].map((char, i) => /* @__PURE__ */ React218.createElement(
|
|
38252
|
-
"span",
|
|
38319
|
+
return /* @__PURE__ */ React218.createElement(Box, { className: copyButtonWrapper }, /* @__PURE__ */ React218.createElement(Box, { paddingY: "8", paddingX: "12", width: "full" }, /* @__PURE__ */ React218.createElement(Text, { size: "depositAddressFontSize", className: displayedAddressText }, displayAddress)), /* @__PURE__ */ React218.createElement(FunDivider, { borderColor: "mediumStroke" }), /* @__PURE__ */ React218.createElement(
|
|
38320
|
+
Box,
|
|
38253
38321
|
{
|
|
38254
|
-
|
|
38255
|
-
|
|
38256
|
-
|
|
38257
|
-
|
|
38258
|
-
"--animation-delay": `${i * 0.03 * (!isActive ? 1 : i * 0.05) + (isActive ? 0.1 : 0)}s`,
|
|
38259
|
-
"--animation-opacity": "0"
|
|
38260
|
-
}
|
|
38322
|
+
as: "button",
|
|
38323
|
+
onClick: handleClick,
|
|
38324
|
+
className: copyButton,
|
|
38325
|
+
testId: "copy-address-button"
|
|
38261
38326
|
},
|
|
38262
|
-
char
|
|
38263
|
-
|
|
38327
|
+
/* @__PURE__ */ React218.createElement("div", { className: isActive ? copyInputTextBoxActive : copyInputTextBox }, /* @__PURE__ */ React218.createElement("div", { className: isActive ? copyButtonIconActive : copyButtonIcon }, /* @__PURE__ */ React218.createElement(CheckIcon, { className: copyButtonIconBase })), /* @__PURE__ */ React218.createElement(Text, { size: "inputLabel", weight: "inputLabel" }, /* @__PURE__ */ React218.createElement("div", { className: copyInputText }, /* @__PURE__ */ React218.createElement("span", null, "Cop"), /* @__PURE__ */ React218.createElement("span", { className: copyInputTextWrapper }, ["y", " ", ...label.split("")].map((char, i) => /* @__PURE__ */ React218.createElement(
|
|
38328
|
+
"span",
|
|
38329
|
+
{
|
|
38330
|
+
className: copyInputTextDefault,
|
|
38331
|
+
key: `${char}-${i}`,
|
|
38332
|
+
style: {
|
|
38333
|
+
"--animation-name": isActive === null ? "none" : isActive ? textOut : textIn,
|
|
38334
|
+
"--animation-delay": `${i * 0.03 * (isActive ? 1 : i * 0.025) + (!isActive ? 0.05 : 0)}s`,
|
|
38335
|
+
"--animation-opacity": isActive === false ? "0" : "1"
|
|
38336
|
+
}
|
|
38337
|
+
},
|
|
38338
|
+
char === " " ? /* @__PURE__ */ React218.createElement(React218.Fragment, null, "\xA0") : char
|
|
38339
|
+
)), ["ied"].map((char, i) => /* @__PURE__ */ React218.createElement(
|
|
38340
|
+
"span",
|
|
38341
|
+
{
|
|
38342
|
+
className: copyInputTextActive,
|
|
38343
|
+
key: `${char}-${i}`,
|
|
38344
|
+
style: {
|
|
38345
|
+
"--animation-name": isActive === null ? "none" : isActive ? textIn : textOut,
|
|
38346
|
+
"--animation-delay": `${i * 0.03 * (!isActive ? 1 : i * 0.05) + (isActive ? 0.1 : 0)}s`,
|
|
38347
|
+
"--animation-opacity": "0"
|
|
38348
|
+
}
|
|
38349
|
+
},
|
|
38350
|
+
char
|
|
38351
|
+
))))))
|
|
38352
|
+
));
|
|
38264
38353
|
}
|
|
38265
38354
|
function CopyInputDisplayedAddressI18n({
|
|
38266
38355
|
address,
|
|
@@ -38283,7 +38372,16 @@ function CopyInputDisplayedAddressI18n({
|
|
|
38283
38372
|
}, 2e3);
|
|
38284
38373
|
handleCopy();
|
|
38285
38374
|
}, [isActive, handleCopy]);
|
|
38286
|
-
return /* @__PURE__ */ React218.createElement(Box, { className: copyButtonWrapper }, /* @__PURE__ */ React218.createElement(Box, { paddingY: "8", paddingX: "12", width: "full" }, /* @__PURE__ */ React218.createElement(Text, { size: "depositAddressFontSize", className: displayedAddressText }, displayAddress)), /* @__PURE__ */ React218.createElement(FunDivider, { borderColor: "mediumStroke" }), /* @__PURE__ */ React218.createElement(
|
|
38375
|
+
return /* @__PURE__ */ React218.createElement(Box, { className: copyButtonWrapper }, /* @__PURE__ */ React218.createElement(Box, { paddingY: "8", paddingX: "12", width: "full" }, /* @__PURE__ */ React218.createElement(Text, { size: "depositAddressFontSize", className: displayedAddressText }, displayAddress)), /* @__PURE__ */ React218.createElement(FunDivider, { borderColor: "mediumStroke" }), /* @__PURE__ */ React218.createElement(
|
|
38376
|
+
Box,
|
|
38377
|
+
{
|
|
38378
|
+
as: "button",
|
|
38379
|
+
onClick: handleClick,
|
|
38380
|
+
className: copyButton,
|
|
38381
|
+
testId: "copy-address-button"
|
|
38382
|
+
},
|
|
38383
|
+
/* @__PURE__ */ React218.createElement("div", { className: copyInputTextBox }, /* @__PURE__ */ React218.createElement("div", { className: copyButtonIcon }, /* @__PURE__ */ React218.createElement(CheckIcon, { className: copyButtonIconBase })), /* @__PURE__ */ React218.createElement(Text, { size: "inputLabel", weight: "inputLabel" }, /* @__PURE__ */ React218.createElement("div", { className: copyInputText }, buttonText)))
|
|
38384
|
+
));
|
|
38287
38385
|
}
|
|
38288
38386
|
function CopyInputDisplayedAddress(props) {
|
|
38289
38387
|
const { i18n: i18n2 } = useFunkitTranslation();
|
|
@@ -40242,7 +40340,7 @@ function AccountSelectAsset({
|
|
|
40242
40340
|
applyDynamicRouting
|
|
40243
40341
|
} = useCheckoutContext();
|
|
40244
40342
|
const { walletAddress } = useGeneralWallet();
|
|
40245
|
-
const { mainAccountIndex } = useLighterAccounts({
|
|
40343
|
+
const { mainAccountIndex, isUnifiedTradingMode } = useLighterAccounts({
|
|
40246
40344
|
address: walletAddress
|
|
40247
40345
|
});
|
|
40248
40346
|
const bottomSectionRef = useBottomSectionRef();
|
|
@@ -40288,7 +40386,9 @@ function AccountSelectAsset({
|
|
|
40288
40386
|
applyDynamicRouting({
|
|
40289
40387
|
targetAsset: dynamicPath.path.targetAsset,
|
|
40290
40388
|
targetChain: dynamicPath.path.targetChain,
|
|
40291
|
-
|
|
40389
|
+
// Lighter Unified accounts have no spot/perps split — the perps route
|
|
40390
|
+
// ticker ("USDC (Perps)") displays as plain "USDC".
|
|
40391
|
+
targetAssetTicker: isUnifiedTradingMode ? stripLighterPerpsSuffix(dynamicPath.path.targetAssetTicker) : dynamicPath.path.targetAssetTicker,
|
|
40292
40392
|
iconSrc: dynamicPath.path.iconSrc,
|
|
40293
40393
|
generateActionsParams: walletAddress ? dynamicPath.path.generateActionsParams?.(walletAddress) : void 0,
|
|
40294
40394
|
customRecipient: dynamicPath.path.getCustomRecipient?.({
|
|
@@ -41126,7 +41226,17 @@ function SourceChange({
|
|
|
41126
41226
|
const paymentListScroll = useScrollDivider();
|
|
41127
41227
|
const { paymentMethodInfo, targetChainId } = modalState;
|
|
41128
41228
|
const checkoutConfig = checkoutItem?.initSettings.config;
|
|
41129
|
-
const
|
|
41229
|
+
const { walletAddress } = useGeneralWallet();
|
|
41230
|
+
const { isUnifiedTradingMode: isLighterUnifiedAccount } = useLighterAccounts({
|
|
41231
|
+
address: walletAddress
|
|
41232
|
+
});
|
|
41233
|
+
const dynamicTargetAssets = useMemo60(() => {
|
|
41234
|
+
const candidates = checkoutConfig?.dynamicTargetAssetCandidates;
|
|
41235
|
+
if (!candidates || !isLighterUnifiedAccount) {
|
|
41236
|
+
return candidates;
|
|
41237
|
+
}
|
|
41238
|
+
return adaptLighterTargetAssetsForUnifiedAccount(candidates);
|
|
41239
|
+
}, [checkoutConfig?.dynamicTargetAssetCandidates, isLighterUnifiedAccount]);
|
|
41130
41240
|
const isAutoContinue = !isOstiumCustomer(apiKey);
|
|
41131
41241
|
const isLighter = isLighterxyzCustomer(apiKey);
|
|
41132
41242
|
const {
|
|
@@ -41516,7 +41626,7 @@ function SourceChange({
|
|
|
41516
41626
|
chainId: Number(selectedTargetAsset.tokenChainId),
|
|
41517
41627
|
displayedChainId: isLighter ? LIGHTER_CHAIN_ID3 : void 0,
|
|
41518
41628
|
onTokenSelected: handleTargetAssetChange,
|
|
41519
|
-
selectedToken: selectedTargetAsset?.tokenSymbol,
|
|
41629
|
+
selectedToken: isLighterUnifiedAccount ? stripLighterPerpsSuffix(selectedTargetAsset?.tokenSymbol) : selectedTargetAsset?.tokenSymbol,
|
|
41520
41630
|
tokens: dynamicTargetAssets
|
|
41521
41631
|
}
|
|
41522
41632
|
))
|
|
@@ -41990,7 +42100,7 @@ var BottomLinks = ({ links }) => {
|
|
|
41990
42100
|
};
|
|
41991
42101
|
|
|
41992
42102
|
// src/components/TransferTokenDetails/TransferTokenDetails.tsx
|
|
41993
|
-
import { formatNumberAndStringify
|
|
42103
|
+
import { formatNumberAndStringify } from "@funkit/utils";
|
|
41994
42104
|
import React256 from "react";
|
|
41995
42105
|
import { Trans as Trans21 } from "react-i18next";
|
|
41996
42106
|
|
|
@@ -42295,7 +42405,7 @@ var TransferTokenDetails = ({
|
|
|
42295
42405
|
{
|
|
42296
42406
|
text: `${estPriceImpact.label}:`,
|
|
42297
42407
|
prefix: estPriceImpact.value > 0 ? "< " : "",
|
|
42298
|
-
value: `${
|
|
42408
|
+
value: `${formatNumberAndStringify(estPriceImpact.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
|
|
42299
42409
|
icon: /* @__PURE__ */ React256.createElement(DollarIcon, null),
|
|
42300
42410
|
tooltip: /* @__PURE__ */ React256.createElement(
|
|
42301
42411
|
FunTooltip,
|
|
@@ -42324,7 +42434,7 @@ var TransferTokenDetails = ({
|
|
|
42324
42434
|
{
|
|
42325
42435
|
text: `${maxSlippage.label}:`,
|
|
42326
42436
|
prefix: maxSlippage.value > 0 ? `${t("common.auto")} \u2022 ` : "",
|
|
42327
|
-
value: `${
|
|
42437
|
+
value: `${formatNumberAndStringify(maxSlippage.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
|
|
42328
42438
|
icon: /* @__PURE__ */ React256.createElement(PercentageIcon, null),
|
|
42329
42439
|
tooltip: /* @__PURE__ */ React256.createElement(
|
|
42330
42440
|
FunTooltip,
|