@funkit/connect 10.1.0-next.0 → 10.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -1
- package/dist/clients/{chunk-ETB2YYFT.js → chunk-2NBYHUIW.js} +1 -1
- package/dist/clients/{chunk-JNZY3GAA.js → chunk-E3USJY7A.js} +1 -1
- package/dist/clients/{chunk-HD4Y4NKC.js → chunk-QR64CUND.js} +6 -6
- package/dist/clients/fanatics.css +1 -1
- package/dist/clients/fanatics.js +2 -2
- package/dist/clients/lighter.css +29 -11
- package/dist/clients/lighter.js +3 -3
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +29 -11
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +4 -4
- package/dist/clients/polymarket/index.css +29 -11
- package/dist/clients/polymarket/index.js +5 -5
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +11 -1
- package/dist/index.css +29 -11
- package/dist/index.js +225 -189
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +3 -3
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframe.css.d.ts +1 -0
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/wallets/walletConnectors/index.js +49 -49
- package/package.json +2 -2
- package/dist/clients/chunk-42XZD2Y3.js +0 -1112
- package/dist/clients/chunk-5UIZBNLC.js +0 -1175
- package/dist/clients/chunk-BO7AZVPG.js +0 -1112
- package/dist/clients/chunk-BUCJRBW7.js +0 -1472
- package/dist/clients/chunk-ME4OAQIY.js +0 -696
- package/dist/clients/chunk-PEVDOGEA.js +0 -109
- package/dist/clients/chunk-QIWGVVAW.js +0 -1113
- package/dist/clients/chunk-VJZW3MA3.js +0 -94
- package/dist/clients/chunk-WEETVC7U.js +0 -1113
- package/dist/clients/chunk-Y2KXVS36.js +0 -230
- package/dist/clients/polymarket/usePolymarketAccountBalances.d.ts +0 -66
- package/dist/hooks/useIsTokenWhitelisted.d.ts +0 -30
- package/dist/modals/CheckoutModal/buildRelayChains.d.ts +0 -12
- package/dist/providers/FunkitFlagsProvider.d.ts +0 -26
- package/dist/utils/flags/config.d.ts +0 -333
- package/dist/utils/flags/endpoint.d.ts +0 -22
- package/dist/utils/flags/hash.d.ts +0 -13
- package/dist/utils/flags/impl.d.ts +0 -10
- package/dist/utils/flags/types.d.ts +0 -49
- package/dist/wallets/walletConnectors/chunk-2VP2F6EK.js +0 -70
- package/dist/wallets/walletConnectors/chunk-4T6ZSRJF.js +0 -69
- package/dist/wallets/walletConnectors/chunk-6BW3HLBG.js +0 -96
- package/dist/wallets/walletConnectors/chunk-CCQV2ZET.js +0 -218
- package/dist/wallets/walletConnectors/chunk-CPI4TD43.js +0 -99
- package/dist/wallets/walletConnectors/chunk-F5XEEVG6.js +0 -98
- package/dist/wallets/walletConnectors/chunk-HNRB7KJU.js +0 -92
- package/dist/wallets/walletConnectors/chunk-HTHAK6XB.js +0 -93
- package/dist/wallets/walletConnectors/chunk-MIQTHJ6X.js +0 -66
- package/dist/wallets/walletConnectors/chunk-RB3HR4R2.js +0 -95
- package/dist/wallets/walletConnectors/chunk-RVOY537T.js +0 -100
- package/dist/wallets/walletConnectors/chunk-STVVP43G.js +0 -94
- package/dist/wallets/walletConnectors/chunk-UK7C2JXW.js +0 -87
- package/dist/wallets/walletConnectors/chunk-VAPGUPHO.js +0 -92
- package/dist/wallets/walletConnectors/chunk-VTM6EECM.js +0 -110
- package/dist/wallets/walletConnectors/chunk-X6CGV36L.js +0 -103
- package/dist/wallets/walletConnectors/chunk-YEZM4CK4.js +0 -96
- package/dist/wallets/walletConnectors/chunk-ZNX4EMPB.js +0 -106
- /package/dist/clients/{chunk-HMP3LHMW.js → chunk-LUHEVXPD.js} +0 -0
package/dist/index.js
CHANGED
|
@@ -1004,66 +1004,6 @@ import {
|
|
|
1004
1004
|
import * as dnum12 from "dnum";
|
|
1005
1005
|
import { erc20Abi as erc20Abi9, formatUnits as formatUnits5, isAddress } from "viem";
|
|
1006
1006
|
|
|
1007
|
-
// src/consts/customers.ts
|
|
1008
|
-
import {
|
|
1009
|
-
AAVE_API_KEY,
|
|
1010
|
-
AVANTIS_API_KEY,
|
|
1011
|
-
BASED_API_KEY,
|
|
1012
|
-
BSX_API_KEY,
|
|
1013
|
-
ETHEREAL_API_KEY,
|
|
1014
|
-
FANATICS_API_KEY,
|
|
1015
|
-
HYENA_API_KEY,
|
|
1016
|
-
HYPERDASH_API_KEY,
|
|
1017
|
-
LIGHTERXYZ_API_KEY,
|
|
1018
|
-
MALLARD_API_KEY,
|
|
1019
|
-
MONAD_API_KEY,
|
|
1020
|
-
MONKEY_TILT_API_KEY,
|
|
1021
|
-
NADO_API_KEY,
|
|
1022
|
-
OSTIUM_API_KEY,
|
|
1023
|
-
PERPL_API_KEY,
|
|
1024
|
-
POLYMARKET_API_KEY
|
|
1025
|
-
} from "@funkit/api-base";
|
|
1026
|
-
import { mainnet as mainnet2 } from "viem/chains";
|
|
1027
|
-
function isPolymarketCustomer(apiKey) {
|
|
1028
|
-
return apiKey === POLYMARKET_API_KEY;
|
|
1029
|
-
}
|
|
1030
|
-
function isOstiumCustomer(apiKey) {
|
|
1031
|
-
return apiKey === OSTIUM_API_KEY;
|
|
1032
|
-
}
|
|
1033
|
-
function isEtherealCustomer(apiKey) {
|
|
1034
|
-
return apiKey === ETHEREAL_API_KEY;
|
|
1035
|
-
}
|
|
1036
|
-
function isMonadCustomer(apiKey) {
|
|
1037
|
-
return apiKey === MONAD_API_KEY;
|
|
1038
|
-
}
|
|
1039
|
-
function isHyenaCustomer(apiKey) {
|
|
1040
|
-
return apiKey === HYENA_API_KEY;
|
|
1041
|
-
}
|
|
1042
|
-
function isLighterxyzCustomer(apiKey) {
|
|
1043
|
-
return apiKey === LIGHTERXYZ_API_KEY;
|
|
1044
|
-
}
|
|
1045
|
-
function isFanaticsCustomer(apiKey) {
|
|
1046
|
-
return apiKey === FANATICS_API_KEY;
|
|
1047
|
-
}
|
|
1048
|
-
function isAaveCustomer(apiKey) {
|
|
1049
|
-
return apiKey === AAVE_API_KEY;
|
|
1050
|
-
}
|
|
1051
|
-
function isNadoCustomer(apiKey) {
|
|
1052
|
-
return apiKey === NADO_API_KEY;
|
|
1053
|
-
}
|
|
1054
|
-
function isMallardCustomer(apiKey) {
|
|
1055
|
-
return apiKey === MALLARD_API_KEY;
|
|
1056
|
-
}
|
|
1057
|
-
function isCustomerNativeFastPathEnabled(apiKey) {
|
|
1058
|
-
return isAaveCustomer(apiKey);
|
|
1059
|
-
}
|
|
1060
|
-
function isLighterSpot(apiKey, checkoutConfig) {
|
|
1061
|
-
return !!checkoutConfig && isLighterxyzCustomer(apiKey) && (checkoutConfig.dynamicRoutingId ?? "").includes("SPOT");
|
|
1062
|
-
}
|
|
1063
|
-
function isLighterSlowDeposit(apiKey, checkoutConfig) {
|
|
1064
|
-
return !!checkoutConfig && isLighterxyzCustomer(apiKey) && checkoutConfig.targetChain === mainnet2.id.toString();
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
1007
|
// src/wagmi/actions.ts
|
|
1068
1008
|
import { erc20Abi, formatUnits } from "viem";
|
|
1069
1009
|
import {
|
|
@@ -1137,6 +1077,66 @@ import React300, {
|
|
|
1137
1077
|
import { flushSync as flushSync2 } from "react-dom";
|
|
1138
1078
|
import { v4 as uuid2 } from "uuid";
|
|
1139
1079
|
|
|
1080
|
+
// src/consts/customers.ts
|
|
1081
|
+
import {
|
|
1082
|
+
AAVE_API_KEY,
|
|
1083
|
+
AVANTIS_API_KEY,
|
|
1084
|
+
BASED_API_KEY,
|
|
1085
|
+
BSX_API_KEY,
|
|
1086
|
+
ETHEREAL_API_KEY,
|
|
1087
|
+
FANATICS_API_KEY,
|
|
1088
|
+
HYENA_API_KEY,
|
|
1089
|
+
HYPERDASH_API_KEY,
|
|
1090
|
+
LIGHTERXYZ_API_KEY,
|
|
1091
|
+
MALLARD_API_KEY,
|
|
1092
|
+
MONAD_API_KEY,
|
|
1093
|
+
MONKEY_TILT_API_KEY,
|
|
1094
|
+
NADO_API_KEY,
|
|
1095
|
+
OSTIUM_API_KEY,
|
|
1096
|
+
PERPL_API_KEY,
|
|
1097
|
+
POLYMARKET_API_KEY
|
|
1098
|
+
} from "@funkit/api-base";
|
|
1099
|
+
import { mainnet as mainnet2 } from "viem/chains";
|
|
1100
|
+
function isPolymarketCustomer(apiKey) {
|
|
1101
|
+
return apiKey === POLYMARKET_API_KEY;
|
|
1102
|
+
}
|
|
1103
|
+
function isOstiumCustomer(apiKey) {
|
|
1104
|
+
return apiKey === OSTIUM_API_KEY;
|
|
1105
|
+
}
|
|
1106
|
+
function isEtherealCustomer(apiKey) {
|
|
1107
|
+
return apiKey === ETHEREAL_API_KEY;
|
|
1108
|
+
}
|
|
1109
|
+
function isMonadCustomer(apiKey) {
|
|
1110
|
+
return apiKey === MONAD_API_KEY;
|
|
1111
|
+
}
|
|
1112
|
+
function isHyenaCustomer(apiKey) {
|
|
1113
|
+
return apiKey === HYENA_API_KEY;
|
|
1114
|
+
}
|
|
1115
|
+
function isLighterxyzCustomer(apiKey) {
|
|
1116
|
+
return apiKey === LIGHTERXYZ_API_KEY;
|
|
1117
|
+
}
|
|
1118
|
+
function isFanaticsCustomer(apiKey) {
|
|
1119
|
+
return apiKey === FANATICS_API_KEY;
|
|
1120
|
+
}
|
|
1121
|
+
function isAaveCustomer(apiKey) {
|
|
1122
|
+
return apiKey === AAVE_API_KEY;
|
|
1123
|
+
}
|
|
1124
|
+
function isNadoCustomer(apiKey) {
|
|
1125
|
+
return apiKey === NADO_API_KEY;
|
|
1126
|
+
}
|
|
1127
|
+
function isMallardCustomer(apiKey) {
|
|
1128
|
+
return apiKey === MALLARD_API_KEY;
|
|
1129
|
+
}
|
|
1130
|
+
function isCustomerNativeFastPathEnabled(apiKey) {
|
|
1131
|
+
return isAaveCustomer(apiKey);
|
|
1132
|
+
}
|
|
1133
|
+
function isLighterSpot(apiKey, checkoutConfig) {
|
|
1134
|
+
return !!checkoutConfig && isLighterxyzCustomer(apiKey) && (checkoutConfig.dynamicRoutingId ?? "").includes("SPOT");
|
|
1135
|
+
}
|
|
1136
|
+
function isLighterSlowDeposit(apiKey, checkoutConfig) {
|
|
1137
|
+
return !!checkoutConfig && isLighterxyzCustomer(apiKey) && checkoutConfig.targetChain === mainnet2.id.toString();
|
|
1138
|
+
}
|
|
1139
|
+
|
|
1140
1140
|
// src/consts/funkit.ts
|
|
1141
1141
|
import { FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS } from "@funkit/chains";
|
|
1142
1142
|
var NATIVE_TOKEN = FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS;
|
|
@@ -1687,7 +1687,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
1687
1687
|
localStorage.setItem(storageKey, version);
|
|
1688
1688
|
}
|
|
1689
1689
|
function getCurrentSdkVersion() {
|
|
1690
|
-
return "10.1.
|
|
1690
|
+
return "10.1.1";
|
|
1691
1691
|
}
|
|
1692
1692
|
function useFingerprint() {
|
|
1693
1693
|
const fingerprint = useCallback3(() => {
|
|
@@ -3394,12 +3394,6 @@ function useIsMeldEnabled() {
|
|
|
3394
3394
|
return meldEnabled && !!meldCurrencyCode;
|
|
3395
3395
|
}
|
|
3396
3396
|
|
|
3397
|
-
// src/hooks/useIsUsUser.ts
|
|
3398
|
-
function useIsUsUser() {
|
|
3399
|
-
const { userIpInfo } = useFunkitUserIp();
|
|
3400
|
-
return userIpInfo?.alpha2 === "US";
|
|
3401
|
-
}
|
|
3402
|
-
|
|
3403
3397
|
// src/hooks/useFrogAccount.ts
|
|
3404
3398
|
import {
|
|
3405
3399
|
createBridgeBankAccount,
|
|
@@ -4251,14 +4245,16 @@ function usePaymentMethodEnablement() {
|
|
|
4251
4245
|
const isBrokerageFlagEnabled = useDynamicConfig("enablebluvobrokerage");
|
|
4252
4246
|
const isSwappedFlagEnabled = useDynamicConfig("enableswappeddeposit");
|
|
4253
4247
|
const isLightningFlagEnabled = useDynamicConfig("enablebitcoinlightning");
|
|
4248
|
+
const isCashAppLightningFlagEnabled = useDynamicConfig(
|
|
4249
|
+
"enablecashapplightning"
|
|
4250
|
+
);
|
|
4254
4251
|
const isFiatEnabled = isFiatFlagEnabled;
|
|
4255
4252
|
const isTokenTransferEnabled = isTokenTransferFlagEnabled;
|
|
4256
4253
|
const isMeldEnabled = isMeldFlagEnabled && isTokenTransferEnabled;
|
|
4257
4254
|
const isSwappedEnabled = isSwappedFlagEnabled && (isTokenTransferEnabled || isTokenTransferComingSoon || isTokenTransferGeoblocked);
|
|
4258
4255
|
const isBrokerageEnabled = isBrokerageFlagEnabled && isTokenTransferEnabled;
|
|
4259
4256
|
const isLightningEnabled = isLightningFlagEnabled && isTokenTransferEnabled;
|
|
4260
|
-
const
|
|
4261
|
-
const isCashAppLightningEnabled = isLightningEnabled && isUsUser;
|
|
4257
|
+
const isCashAppLightningEnabled = isCashAppLightningFlagEnabled && isTokenTransferEnabled;
|
|
4262
4258
|
return {
|
|
4263
4259
|
isSwappedEnabled,
|
|
4264
4260
|
isFiatEnabled,
|
|
@@ -8502,6 +8498,9 @@ function useSwappedContext() {
|
|
|
8502
8498
|
return ctx;
|
|
8503
8499
|
}
|
|
8504
8500
|
|
|
8501
|
+
// src/modals/CheckoutModal/SwappedIframe/SwappedIframe.css.ts
|
|
8502
|
+
var scrollableIframeWrapper = "oxtlcp0";
|
|
8503
|
+
|
|
8505
8504
|
// src/modals/CheckoutModal/SwappedIframe/SwappedIframe.tsx
|
|
8506
8505
|
var SwappedIframe = () => {
|
|
8507
8506
|
const { iframeUrl, isSwappedReady, isActive, setIframeRef } = useSwappedContext();
|
|
@@ -8521,12 +8520,13 @@ var SwappedIframe = () => {
|
|
|
8521
8520
|
Box,
|
|
8522
8521
|
{
|
|
8523
8522
|
background: "modalBackground",
|
|
8523
|
+
className: scrollableIframeWrapper,
|
|
8524
8524
|
style: {
|
|
8525
8525
|
position: "absolute",
|
|
8526
8526
|
inset: 0,
|
|
8527
8527
|
width: "100%",
|
|
8528
8528
|
height: "100%",
|
|
8529
|
-
overflow: "
|
|
8529
|
+
overflow: "auto",
|
|
8530
8530
|
overscrollBehavior: "contain",
|
|
8531
8531
|
zIndex: shouldShow ? 1 : -1,
|
|
8532
8532
|
pointerEvents: shouldShow ? "auto" : "none",
|
|
@@ -9991,8 +9991,8 @@ var en_default = {
|
|
|
9991
9991
|
selectPaymentMethod: "Select payment method",
|
|
9992
9992
|
moreOptions: "More options",
|
|
9993
9993
|
mostPopular: "Most popular",
|
|
9994
|
-
savedPaymentMethods: "Saved
|
|
9995
|
-
otherOptions: "
|
|
9994
|
+
savedPaymentMethods: "Saved cards",
|
|
9995
|
+
otherOptions: "More options",
|
|
9996
9996
|
connected: "Connected",
|
|
9997
9997
|
more: "more",
|
|
9998
9998
|
walletDisplayLabel: "{{walletLabel}}",
|
|
@@ -10594,8 +10594,8 @@ var es_default = {
|
|
|
10594
10594
|
selectPaymentMethod: "Seleccionar m\xE9todo de pago",
|
|
10595
10595
|
moreOptions: "M\xE1s opciones",
|
|
10596
10596
|
mostPopular: "M\xE1s popular",
|
|
10597
|
-
savedPaymentMethods: "
|
|
10598
|
-
otherOptions: "
|
|
10597
|
+
savedPaymentMethods: "Tarjetas guardadas",
|
|
10598
|
+
otherOptions: "M\xE1s opciones",
|
|
10599
10599
|
more: "m\xE1s",
|
|
10600
10600
|
walletDisplayLabel: "{{walletLabel}}",
|
|
10601
10601
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -11197,8 +11197,8 @@ var fr_default = {
|
|
|
11197
11197
|
selectPaymentMethod: "S\xE9lectionnez le mode de paiement",
|
|
11198
11198
|
moreOptions: "Plus d'options",
|
|
11199
11199
|
mostPopular: "Les plus populaires",
|
|
11200
|
-
savedPaymentMethods: "
|
|
11201
|
-
otherOptions: "
|
|
11200
|
+
savedPaymentMethods: "Cartes enregistr\xE9es",
|
|
11201
|
+
otherOptions: "Plus d'options",
|
|
11202
11202
|
more: "plus",
|
|
11203
11203
|
walletDisplayLabel: "{{walletLabel}}",
|
|
11204
11204
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -11800,8 +11800,8 @@ var ja_default = {
|
|
|
11800
11800
|
selectPaymentMethod: "\u652F\u6255\u3044\u65B9\u6CD5\u3092\u9078\u629E",
|
|
11801
11801
|
moreOptions: "\u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3",
|
|
11802
11802
|
mostPopular: "\u4EBA\u6C17",
|
|
11803
|
-
savedPaymentMethods: "\u4FDD\u5B58\u6E08\u307F\
|
|
11804
|
-
otherOptions: "\u305D\u306E\u4ED6\u306E\
|
|
11803
|
+
savedPaymentMethods: "\u4FDD\u5B58\u6E08\u307F\u30AB\u30FC\u30C9",
|
|
11804
|
+
otherOptions: "\u305D\u306E\u4ED6\u306E\u30AA\u30D7\u30B7\u30E7\u30F3",
|
|
11805
11805
|
more: "\u3082\u3063\u3068\u898B\u308B",
|
|
11806
11806
|
walletDisplayLabel: "{{walletLabel}}",
|
|
11807
11807
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -12403,8 +12403,8 @@ var ko_default = {
|
|
|
12403
12403
|
selectPaymentMethod: "\uACB0\uC81C \uBC29\uBC95 \uC120\uD0DD",
|
|
12404
12404
|
moreOptions: "\uB354 \uB9CE\uC740 \uC635\uC158",
|
|
12405
12405
|
mostPopular: "\uC778\uAE30",
|
|
12406
|
-
savedPaymentMethods: "\uC800\uC7A5\uB41C \
|
|
12407
|
-
otherOptions: "\
|
|
12406
|
+
savedPaymentMethods: "\uC800\uC7A5\uB41C \uCE74\uB4DC",
|
|
12407
|
+
otherOptions: "\uB354 \uB9CE\uC740 \uC635\uC158",
|
|
12408
12408
|
more: "\uB354 \uBCF4\uAE30",
|
|
12409
12409
|
walletDisplayLabel: "{{walletLabel}}",
|
|
12410
12410
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -13006,8 +13006,8 @@ var ru_default = {
|
|
|
13006
13006
|
selectPaymentMethod: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0441\u043F\u043E\u0441\u043E\u0431 \u043E\u043F\u043B\u0430\u0442\u044B",
|
|
13007
13007
|
moreOptions: "\u0411\u043E\u043B\u044C\u0448\u0435 \u043E\u043F\u0446\u0438\u0439",
|
|
13008
13008
|
mostPopular: "\u0421\u0430\u043C\u044B\u0435 \u043F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
|
|
13009
|
-
savedPaymentMethods: "\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \
|
|
13010
|
-
otherOptions: "\
|
|
13009
|
+
savedPaymentMethods: "\u0421\u043E\u0445\u0440\u0430\u043D\u0451\u043D\u043D\u044B\u0435 \u043A\u0430\u0440\u0442\u044B",
|
|
13010
|
+
otherOptions: "\u0411\u043E\u043B\u044C\u0448\u0435 \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432",
|
|
13011
13011
|
more: "\u0431\u043E\u043B\u044C\u0448\u0435",
|
|
13012
13012
|
walletDisplayLabel: "{{walletLabel}}",
|
|
13013
13013
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -13609,8 +13609,8 @@ var tr_default = {
|
|
|
13609
13609
|
selectPaymentMethod: "\xD6deme y\xF6ntemi se\xE7in",
|
|
13610
13610
|
moreOptions: "Daha fazla se\xE7enek",
|
|
13611
13611
|
mostPopular: "En pop\xFCler",
|
|
13612
|
-
savedPaymentMethods: "Kay\u0131tl\u0131
|
|
13613
|
-
otherOptions: "
|
|
13612
|
+
savedPaymentMethods: "Kay\u0131tl\u0131 kartlar",
|
|
13613
|
+
otherOptions: "Daha fazla se\xE7enek",
|
|
13614
13614
|
more: "daha fazla",
|
|
13615
13615
|
walletDisplayLabel: "{{walletLabel}}",
|
|
13616
13616
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -14212,8 +14212,8 @@ var zh_default = {
|
|
|
14212
14212
|
selectPaymentMethod: "\u9009\u62E9\u652F\u4ED8\u65B9\u5F0F",
|
|
14213
14213
|
moreOptions: "\u66F4\u591A\u9009\u9879",
|
|
14214
14214
|
mostPopular: "\u6700\u53D7\u6B22\u8FCE",
|
|
14215
|
-
savedPaymentMethods: "\u5DF2\u4FDD\u5B58\u7684\
|
|
14216
|
-
otherOptions: "\
|
|
14215
|
+
savedPaymentMethods: "\u5DF2\u4FDD\u5B58\u7684\u5361\u7247",
|
|
14216
|
+
otherOptions: "\u66F4\u591A\u9009\u9879",
|
|
14217
14217
|
more: "\u66F4\u591A",
|
|
14218
14218
|
walletDisplayLabel: "{{walletLabel}}",
|
|
14219
14219
|
brokerageDisplayLabel: "{{brokerageLabel}}",
|
|
@@ -19629,9 +19629,7 @@ import {
|
|
|
19629
19629
|
FormOfPaymentType as FormOfPaymentType3
|
|
19630
19630
|
} from "@funkit/api-base";
|
|
19631
19631
|
import { lightningChain } from "@funkit/chains";
|
|
19632
|
-
import {
|
|
19633
|
-
formatCurrencyAndStringify as formatCurrencyAndStringify4
|
|
19634
|
-
} from "@funkit/utils";
|
|
19632
|
+
import { formatCurrencyAndStringify as formatCurrencyAndStringify4 } from "@funkit/utils";
|
|
19635
19633
|
import React92, { useEffect as useEffect33 } from "react";
|
|
19636
19634
|
|
|
19637
19635
|
// src/hooks/useCheckoutTimeEstimate.ts
|
|
@@ -20732,30 +20730,51 @@ function getIconFromUiConfig(paymentMethod, iconConfig, defaultIconSize = 12) {
|
|
|
20732
20730
|
);
|
|
20733
20731
|
}
|
|
20734
20732
|
}
|
|
20735
|
-
|
|
20736
|
-
const
|
|
20737
|
-
|
|
20738
|
-
|
|
20739
|
-
|
|
20740
|
-
|
|
20733
|
+
function resolveConnectWalletChainOrder(configuredOrder) {
|
|
20734
|
+
const defaultChainIds = getDefaultChains().map(({ id }) => String(id));
|
|
20735
|
+
if (!configuredOrder.length) {
|
|
20736
|
+
return defaultChainIds;
|
|
20737
|
+
}
|
|
20738
|
+
const defaultChainIdSet = new Set(defaultChainIds);
|
|
20739
|
+
const prioritized = configuredOrder.map(String).filter((id) => defaultChainIdSet.has(id));
|
|
20740
|
+
const prioritizedSet = new Set(prioritized);
|
|
20741
|
+
const remaining = defaultChainIds.filter((id) => !prioritizedSet.has(id));
|
|
20742
|
+
return [...prioritized, ...remaining];
|
|
20743
|
+
}
|
|
20744
|
+
function MoreIconsIndicator() {
|
|
20745
|
+
return /* @__PURE__ */ React92.createElement(
|
|
20746
|
+
Box,
|
|
20747
|
+
{
|
|
20748
|
+
background: "secondaryBackground",
|
|
20749
|
+
color: "secondaryText",
|
|
20750
|
+
borderRadius: "full",
|
|
20751
|
+
style: { width: 16, height: 16, flexShrink: 0, position: "relative" }
|
|
20752
|
+
},
|
|
20753
|
+
/* @__PURE__ */ React92.createElement(
|
|
20754
|
+
"svg",
|
|
20741
20755
|
{
|
|
20742
|
-
|
|
20743
|
-
|
|
20744
|
-
|
|
20756
|
+
width: "10",
|
|
20757
|
+
height: "10",
|
|
20758
|
+
viewBox: "0 0 10 10",
|
|
20759
|
+
style: {
|
|
20760
|
+
position: "absolute",
|
|
20761
|
+
top: "50%",
|
|
20762
|
+
left: "50%",
|
|
20763
|
+
transform: "translate(-50%,-50%)"
|
|
20764
|
+
}
|
|
20745
20765
|
},
|
|
20746
20766
|
/* @__PURE__ */ React92.createElement(
|
|
20747
|
-
|
|
20767
|
+
"path",
|
|
20748
20768
|
{
|
|
20749
|
-
|
|
20750
|
-
|
|
20751
|
-
|
|
20752
|
-
|
|
20753
|
-
width: 12
|
|
20769
|
+
d: "M5 1v8M1 5h8",
|
|
20770
|
+
stroke: "currentColor",
|
|
20771
|
+
strokeWidth: "1.5",
|
|
20772
|
+
strokeLinecap: "round"
|
|
20754
20773
|
}
|
|
20755
20774
|
)
|
|
20756
|
-
)
|
|
20757
|
-
|
|
20758
|
-
}
|
|
20775
|
+
)
|
|
20776
|
+
);
|
|
20777
|
+
}
|
|
20759
20778
|
function ConnectWalletItem({
|
|
20760
20779
|
isClickable,
|
|
20761
20780
|
isActive,
|
|
@@ -20766,12 +20785,16 @@ function ConnectWalletItem({
|
|
|
20766
20785
|
const { textCustomizations } = useFunkitConfig();
|
|
20767
20786
|
const { t } = useFunkitTranslation();
|
|
20768
20787
|
const walletLabel = useWalletLabel();
|
|
20788
|
+
const connectWalletChainIconOrder = useDynamicConfig(
|
|
20789
|
+
"connectwalletchainiconorder"
|
|
20790
|
+
);
|
|
20791
|
+
const chainIds = resolveConnectWalletChainOrder(connectWalletChainIconOrder);
|
|
20769
20792
|
return /* @__PURE__ */ React92.createElement(
|
|
20770
20793
|
FunPaymentMethodItem,
|
|
20771
20794
|
{
|
|
20772
20795
|
keyIcon: paymentIcon,
|
|
20773
20796
|
keyText: walletLabel,
|
|
20774
|
-
valueIcon: customValueIcon ??
|
|
20797
|
+
valueIcon: customValueIcon ?? /* @__PURE__ */ React92.createElement(SupportedChainList, { chainIdList: chainIds }),
|
|
20775
20798
|
onClick,
|
|
20776
20799
|
isDisabled: !isClickable,
|
|
20777
20800
|
disclaimerText: textCustomizations.paymentMethodSubtitles.accountBalance || t("payment.disclaimerText", {
|
|
@@ -20785,39 +20808,26 @@ function ConnectWalletItem({
|
|
|
20785
20808
|
}
|
|
20786
20809
|
function SupportedChainList({
|
|
20787
20810
|
chainIdList,
|
|
20788
|
-
iconSize =
|
|
20811
|
+
iconSize = 16,
|
|
20789
20812
|
style
|
|
20790
20813
|
}) {
|
|
20791
|
-
|
|
20792
|
-
|
|
20793
|
-
|
|
20794
|
-
|
|
20795
|
-
|
|
20796
|
-
|
|
20797
|
-
|
|
20798
|
-
|
|
20799
|
-
|
|
20800
|
-
|
|
20801
|
-
|
|
20802
|
-
|
|
20803
|
-
|
|
20804
|
-
|
|
20805
|
-
|
|
20806
|
-
|
|
20807
|
-
|
|
20808
|
-
/* @__PURE__ */ React92.createElement(
|
|
20809
|
-
AsyncImage,
|
|
20810
|
-
{
|
|
20811
|
-
alt: metadata?.name ?? "",
|
|
20812
|
-
borderRadius: "full",
|
|
20813
|
-
src: metadata?.iconUrl ?? "",
|
|
20814
|
-
height: iconSize,
|
|
20815
|
-
width: iconSize
|
|
20816
|
-
}
|
|
20817
|
-
)
|
|
20818
|
-
);
|
|
20819
|
-
})
|
|
20820
|
-
);
|
|
20814
|
+
const visibleChains = chainIdList.slice(0, 4);
|
|
20815
|
+
const hasMore = chainIdList.length > 4;
|
|
20816
|
+
return /* @__PURE__ */ React92.createElement(Box, { display: "flex", alignItems: "center", gap: "2", style }, visibleChains.map((chainId2) => {
|
|
20817
|
+
const metadata = chainMetadataById[chainId2];
|
|
20818
|
+
return /* @__PURE__ */ React92.createElement(
|
|
20819
|
+
AsyncImage,
|
|
20820
|
+
{
|
|
20821
|
+
key: chainId2,
|
|
20822
|
+
alt: metadata?.name ?? "",
|
|
20823
|
+
borderRadius: "full",
|
|
20824
|
+
borderColor: "generalBorderDim",
|
|
20825
|
+
src: metadata?.iconUrl ?? "",
|
|
20826
|
+
height: iconSize,
|
|
20827
|
+
width: iconSize
|
|
20828
|
+
}
|
|
20829
|
+
);
|
|
20830
|
+
}), hasMore && /* @__PURE__ */ React92.createElement(MoreIconsIndicator, null));
|
|
20821
20831
|
}
|
|
20822
20832
|
function PaymentMethodIcon({
|
|
20823
20833
|
paymentIcon,
|
|
@@ -20868,7 +20878,7 @@ var ConnectedBluvoPaymentMethodItem = ({
|
|
|
20868
20878
|
});
|
|
20869
20879
|
const hasLowBalance = !isPending && sourceBalance < getUsdMinAmount();
|
|
20870
20880
|
const isDisabled = disabled || isPending || !!isBalanceError || hasLowBalance || isUserGeoblocked;
|
|
20871
|
-
const icon = isPending ? /* @__PURE__ */ React92.createElement(SpinnerIcon, { size: 20 }) : label.icon;
|
|
20881
|
+
const icon = isPending ? /* @__PURE__ */ React92.createElement(SpinnerIcon, { size: 20 }) : /* @__PURE__ */ React92.createElement("div", { style: { borderRadius: "50%", overflow: "hidden" } }, label.icon);
|
|
20872
20882
|
useEffect33(() => {
|
|
20873
20883
|
if (isPending) {
|
|
20874
20884
|
return;
|
|
@@ -21066,13 +21076,15 @@ var BrokeragePaymentMethodItem = ({
|
|
|
21066
21076
|
const { isUserGeoblocked } = useFunkitUserIp();
|
|
21067
21077
|
const { t } = useFunkitTranslation();
|
|
21068
21078
|
const { textCustomizations } = useFunkitConfig();
|
|
21069
|
-
const { options: exchangeOptions } = useExchangeOptions({ iconSize:
|
|
21079
|
+
const { options: exchangeOptions } = useExchangeOptions({ iconSize: 16 });
|
|
21070
21080
|
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
21071
21081
|
null,
|
|
21072
21082
|
BROKERAGE_TIME_ESTIMATE,
|
|
21073
21083
|
PaymentMethod.BROKERAGE,
|
|
21074
21084
|
false
|
|
21075
21085
|
);
|
|
21086
|
+
const visibleExchangeOptions = exchangeOptions.slice(0, 4);
|
|
21087
|
+
const hasMoreExchanges = exchangeOptions.length > 4;
|
|
21076
21088
|
return /* @__PURE__ */ React92.createElement(
|
|
21077
21089
|
FunPaymentMethodItem,
|
|
21078
21090
|
{
|
|
@@ -21080,7 +21092,17 @@ var BrokeragePaymentMethodItem = ({
|
|
|
21080
21092
|
keyIcon: paymentIcon,
|
|
21081
21093
|
keyText: textCustomizations.brokerageOrExchange,
|
|
21082
21094
|
onClick,
|
|
21083
|
-
valueIcon: isUserGeoblocked ? null : customValueIcon ?? /* @__PURE__ */ React92.createElement(Box, { display: "flex", gap: "2", alignItems: "center" },
|
|
21095
|
+
valueIcon: isUserGeoblocked ? null : customValueIcon ?? /* @__PURE__ */ React92.createElement(Box, { display: "flex", gap: "2", alignItems: "center" }, visibleExchangeOptions.map((option) => /* @__PURE__ */ React92.createElement(
|
|
21096
|
+
"div",
|
|
21097
|
+
{
|
|
21098
|
+
key: brokerageOptionKey(option),
|
|
21099
|
+
style: {
|
|
21100
|
+
borderRadius: "50%",
|
|
21101
|
+
overflow: "hidden"
|
|
21102
|
+
}
|
|
21103
|
+
},
|
|
21104
|
+
option.icon
|
|
21105
|
+
)), hasMoreExchanges && /* @__PURE__ */ React92.createElement(MoreIconsIndicator, null)),
|
|
21084
21106
|
isDisabled: !isClickable,
|
|
21085
21107
|
disclaimerText: textCustomizations.paymentMethodSubtitles.brokerageOrExchange || t("payment.disclaimerText", {
|
|
21086
21108
|
time: estimatedTimeText,
|
|
@@ -21340,6 +21362,11 @@ function FopPaymentMethodItem({
|
|
|
21340
21362
|
borderRadius: "4"
|
|
21341
21363
|
}
|
|
21342
21364
|
);
|
|
21365
|
+
const processingTimeText = isBankTransfer ? FIAT_PROCESSING_TIME : t("payment.instant");
|
|
21366
|
+
const disclaimerText = disclaimerLimit ? t("payment.disclaimerTextWithLimit", {
|
|
21367
|
+
limit: disclaimerLimit,
|
|
21368
|
+
time: processingTimeText
|
|
21369
|
+
}) : processingTimeText;
|
|
21343
21370
|
return /* @__PURE__ */ React92.createElement(
|
|
21344
21371
|
FunPaymentMethodItem,
|
|
21345
21372
|
{
|
|
@@ -21348,10 +21375,7 @@ function FopPaymentMethodItem({
|
|
|
21348
21375
|
keyIcon,
|
|
21349
21376
|
keyText: labelText,
|
|
21350
21377
|
onClick,
|
|
21351
|
-
disclaimerText
|
|
21352
|
-
limit: disclaimerLimit,
|
|
21353
|
-
time: isBankTransfer ? FIAT_PROCESSING_TIME : t("payment.instant")
|
|
21354
|
-
}),
|
|
21378
|
+
disclaimerText,
|
|
21355
21379
|
testId: testId || `fop-${labelText.toLowerCase().replace(/\s+/g, "-")}`,
|
|
21356
21380
|
valueIcon: disabledBadgeReason ? /* @__PURE__ */ React92.createElement(PaymentMethodDisabledBadge, { reason: disabledBadgeReason }) : void 0
|
|
21357
21381
|
}
|
|
@@ -26516,7 +26540,10 @@ var WithdrawContent = ({
|
|
|
26516
26540
|
};
|
|
26517
26541
|
|
|
26518
26542
|
// src/modals/WithdrawalModal/WithdrawalMethodSelect.tsx
|
|
26519
|
-
import {
|
|
26543
|
+
import {
|
|
26544
|
+
getWithdrawalFopsDisclaimerLimit,
|
|
26545
|
+
isSyntheticFop as isSyntheticFop2
|
|
26546
|
+
} from "@funkit/connect-core";
|
|
26520
26547
|
import React139 from "react";
|
|
26521
26548
|
import { Trans as Trans9 } from "react-i18next";
|
|
26522
26549
|
|
|
@@ -27151,7 +27178,7 @@ function WithdrawalMethodSelect({
|
|
|
27151
27178
|
onCashFopSelect(fop);
|
|
27152
27179
|
},
|
|
27153
27180
|
exchangeRatesData: exchangeRates.data,
|
|
27154
|
-
getDisclaimerLimit:
|
|
27181
|
+
getDisclaimerLimit: (fop, rates) => getWithdrawalFopsDisclaimerLimit(fop, rates, eurMax),
|
|
27155
27182
|
enableSourceGroupLabels: false,
|
|
27156
27183
|
isBelowMinimumBalance
|
|
27157
27184
|
}
|
|
@@ -38240,31 +38267,40 @@ function CopyInputDisplayedAddressEN({
|
|
|
38240
38267
|
}, 2e3);
|
|
38241
38268
|
handleCopy();
|
|
38242
38269
|
}, [isActive, handleCopy, onAddressCopied]);
|
|
38243
|
-
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(
|
|
38244
|
-
|
|
38245
|
-
{
|
|
38246
|
-
className: copyInputTextDefault,
|
|
38247
|
-
key: `${char}-${i}`,
|
|
38248
|
-
style: {
|
|
38249
|
-
"--animation-name": isActive === null ? "none" : isActive ? textOut : textIn,
|
|
38250
|
-
"--animation-delay": `${i * 0.03 * (isActive ? 1 : i * 0.025) + (!isActive ? 0.05 : 0)}s`,
|
|
38251
|
-
"--animation-opacity": isActive === false ? "0" : "1"
|
|
38252
|
-
}
|
|
38253
|
-
},
|
|
38254
|
-
char === " " ? /* @__PURE__ */ React218.createElement(React218.Fragment, null, "\xA0") : char
|
|
38255
|
-
)), ["ied"].map((char, i) => /* @__PURE__ */ React218.createElement(
|
|
38256
|
-
"span",
|
|
38270
|
+
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(
|
|
38271
|
+
Box,
|
|
38257
38272
|
{
|
|
38258
|
-
|
|
38259
|
-
|
|
38260
|
-
|
|
38261
|
-
|
|
38262
|
-
"--animation-delay": `${i * 0.03 * (!isActive ? 1 : i * 0.05) + (isActive ? 0.1 : 0)}s`,
|
|
38263
|
-
"--animation-opacity": "0"
|
|
38264
|
-
}
|
|
38273
|
+
as: "button",
|
|
38274
|
+
onClick: handleClick,
|
|
38275
|
+
className: copyButton,
|
|
38276
|
+
testId: "copy-address-button"
|
|
38265
38277
|
},
|
|
38266
|
-
char
|
|
38267
|
-
|
|
38278
|
+
/* @__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(
|
|
38279
|
+
"span",
|
|
38280
|
+
{
|
|
38281
|
+
className: copyInputTextDefault,
|
|
38282
|
+
key: `${char}-${i}`,
|
|
38283
|
+
style: {
|
|
38284
|
+
"--animation-name": isActive === null ? "none" : isActive ? textOut : textIn,
|
|
38285
|
+
"--animation-delay": `${i * 0.03 * (isActive ? 1 : i * 0.025) + (!isActive ? 0.05 : 0)}s`,
|
|
38286
|
+
"--animation-opacity": isActive === false ? "0" : "1"
|
|
38287
|
+
}
|
|
38288
|
+
},
|
|
38289
|
+
char === " " ? /* @__PURE__ */ React218.createElement(React218.Fragment, null, "\xA0") : char
|
|
38290
|
+
)), ["ied"].map((char, i) => /* @__PURE__ */ React218.createElement(
|
|
38291
|
+
"span",
|
|
38292
|
+
{
|
|
38293
|
+
className: copyInputTextActive,
|
|
38294
|
+
key: `${char}-${i}`,
|
|
38295
|
+
style: {
|
|
38296
|
+
"--animation-name": isActive === null ? "none" : isActive ? textIn : textOut,
|
|
38297
|
+
"--animation-delay": `${i * 0.03 * (!isActive ? 1 : i * 0.05) + (isActive ? 0.1 : 0)}s`,
|
|
38298
|
+
"--animation-opacity": "0"
|
|
38299
|
+
}
|
|
38300
|
+
},
|
|
38301
|
+
char
|
|
38302
|
+
))))))
|
|
38303
|
+
));
|
|
38268
38304
|
}
|
|
38269
38305
|
function CopyInputDisplayedAddressI18n({
|
|
38270
38306
|
address,
|
|
@@ -38287,7 +38323,16 @@ function CopyInputDisplayedAddressI18n({
|
|
|
38287
38323
|
}, 2e3);
|
|
38288
38324
|
handleCopy();
|
|
38289
38325
|
}, [isActive, handleCopy]);
|
|
38290
|
-
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(
|
|
38326
|
+
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(
|
|
38327
|
+
Box,
|
|
38328
|
+
{
|
|
38329
|
+
as: "button",
|
|
38330
|
+
onClick: handleClick,
|
|
38331
|
+
className: copyButton,
|
|
38332
|
+
testId: "copy-address-button"
|
|
38333
|
+
},
|
|
38334
|
+
/* @__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)))
|
|
38335
|
+
));
|
|
38291
38336
|
}
|
|
38292
38337
|
function CopyInputDisplayedAddress(props) {
|
|
38293
38338
|
const { i18n: i18n2 } = useFunkitTranslation();
|
|
@@ -41994,7 +42039,7 @@ var BottomLinks = ({ links }) => {
|
|
|
41994
42039
|
};
|
|
41995
42040
|
|
|
41996
42041
|
// src/components/TransferTokenDetails/TransferTokenDetails.tsx
|
|
41997
|
-
import { formatNumberAndStringify
|
|
42042
|
+
import { formatNumberAndStringify } from "@funkit/utils";
|
|
41998
42043
|
import React256 from "react";
|
|
41999
42044
|
import { Trans as Trans21 } from "react-i18next";
|
|
42000
42045
|
|
|
@@ -42299,7 +42344,7 @@ var TransferTokenDetails = ({
|
|
|
42299
42344
|
{
|
|
42300
42345
|
text: `${estPriceImpact.label}:`,
|
|
42301
42346
|
prefix: estPriceImpact.value > 0 ? "< " : "",
|
|
42302
|
-
value: `${
|
|
42347
|
+
value: `${formatNumberAndStringify(estPriceImpact.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
|
|
42303
42348
|
icon: /* @__PURE__ */ React256.createElement(DollarIcon, null),
|
|
42304
42349
|
tooltip: /* @__PURE__ */ React256.createElement(
|
|
42305
42350
|
FunTooltip,
|
|
@@ -42328,7 +42373,7 @@ var TransferTokenDetails = ({
|
|
|
42328
42373
|
{
|
|
42329
42374
|
text: `${maxSlippage.label}:`,
|
|
42330
42375
|
prefix: maxSlippage.value > 0 ? `${t("common.auto")} \u2022 ` : "",
|
|
42331
|
-
value: `${
|
|
42376
|
+
value: `${formatNumberAndStringify(maxSlippage.value, void 0, { minimumFractionDigits: 2, maximumFractionDigits: 2 })}%`,
|
|
42332
42377
|
icon: /* @__PURE__ */ React256.createElement(PercentageIcon, null),
|
|
42333
42378
|
tooltip: /* @__PURE__ */ React256.createElement(
|
|
42334
42379
|
FunTooltip,
|
|
@@ -48407,13 +48452,10 @@ function useFunkitCheckout(props) {
|
|
|
48407
48452
|
if (!isCheckoutActivated) {
|
|
48408
48453
|
return { isActivated: false };
|
|
48409
48454
|
}
|
|
48410
|
-
const validationResult = await validateCheckoutConfig(
|
|
48411
|
-
|
|
48412
|
-
|
|
48413
|
-
|
|
48414
|
-
},
|
|
48415
|
-
apiKey
|
|
48416
|
-
);
|
|
48455
|
+
const validationResult = await validateCheckoutConfig({
|
|
48456
|
+
...props.config,
|
|
48457
|
+
...inputConfig
|
|
48458
|
+
});
|
|
48417
48459
|
onValidation?.(validationResult);
|
|
48418
48460
|
if (!validationResult.isValid) {
|
|
48419
48461
|
onErrorWrapper?.({
|
|
@@ -48499,7 +48541,7 @@ var DUMMY_TRANSFER_PARAMS = {
|
|
|
48499
48541
|
toAddress: "0x000000000000000000000000000000000000dEaD",
|
|
48500
48542
|
tokenAmount: 5
|
|
48501
48543
|
};
|
|
48502
|
-
async function validateCheckoutConfig(config
|
|
48544
|
+
async function validateCheckoutConfig(config) {
|
|
48503
48545
|
logger.log("validateCheckoutConfig_input", config);
|
|
48504
48546
|
if (!config.checkoutItemTitle) {
|
|
48505
48547
|
return {
|
|
@@ -48555,12 +48597,6 @@ async function validateCheckoutConfig(config, apiKey) {
|
|
|
48555
48597
|
message: "Invalid customRecipient configuration: Has to be a valid address."
|
|
48556
48598
|
};
|
|
48557
48599
|
}
|
|
48558
|
-
if (config.customRecipient && !!config.generateActionsParams && !isPolymarketCustomer(apiKey)) {
|
|
48559
|
-
return {
|
|
48560
|
-
isValid: false,
|
|
48561
|
-
message: "Invalid configuration: Not allowed to specify both customRecipient and generateActionsParams at the same time."
|
|
48562
|
-
};
|
|
48563
|
-
}
|
|
48564
48600
|
if (config.modalTitleMeta && typeof config.modalTitleMeta !== "string") {
|
|
48565
48601
|
return {
|
|
48566
48602
|
isValid: false,
|