@funkit/connect 6.15.2 → 6.15.3
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 +8 -0
- package/dist/components/FunInput/FunInput.css.d.ts +4 -0
- package/dist/components/FunInput/FunInput.d.ts +2 -0
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +2 -2
- package/dist/components/TransactionStatus/TransactionStatus.d.ts +1 -0
- package/dist/hooks/useCheckoutTimeEstimate.d.ts +7 -3
- package/dist/index.css +53 -13
- package/dist/index.js +178 -99
- package/dist/utils/checkout.d.ts +2 -1
- package/dist/utils/flags/config.d.ts +1 -1
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +29 -29
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +2 -2
- package/dist/wallets/walletConnectors/{chunk-UYGJO62F.js → chunk-2HYNUNAS.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-3CICVJUN.js → chunk-2KUBG3S6.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-J3LI3FYZ.js → chunk-2L43XSW3.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-LNEC5RNX.js → chunk-2STUC6QL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CNPKISHN.js → chunk-7QONTUXT.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-UIASLGLV.js → chunk-A5N6B5UW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-CJGUM55H.js → chunk-FKJJQNKX.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-ZSI5N4VV.js → chunk-JWFF4AAL.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-2GJQ4XZQ.js → chunk-M3NZ6R2E.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-EC6CHBSZ.js → chunk-NT2HYJKW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-QLVVUKYB.js → chunk-NWIQNBJU.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-KIDC67XJ.js → chunk-OBOVHCEI.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-Q3H3TRBS.js → chunk-SULRQO27.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-VWCLFMWJ.js → chunk-TCAGNB4B.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-5W7VDOCL.js → chunk-TDAVGY5F.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AFXHGWBH.js → chunk-TDIEHTMB.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-JCHN6A47.js → chunk-VR4TBQ6S.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-RKPCWHXL.js → chunk-VYBAYMP3.js} +3 -3
package/dist/index.js
CHANGED
|
@@ -1237,6 +1237,8 @@ function abortCheckoutQuote() {
|
|
|
1237
1237
|
// src/utils/checkout.ts
|
|
1238
1238
|
import {
|
|
1239
1239
|
CheckoutState as CheckoutState2,
|
|
1240
|
+
ETHEREAL_API_KEY as ETHEREAL_API_KEY3,
|
|
1241
|
+
HYENA_API_KEY as HYENA_API_KEY3,
|
|
1240
1242
|
getAssetPriceInfo
|
|
1241
1243
|
} from "@funkit/api-base";
|
|
1242
1244
|
import {
|
|
@@ -1483,7 +1485,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
1483
1485
|
localStorage.setItem(storageKey, version);
|
|
1484
1486
|
}
|
|
1485
1487
|
function getCurrentSdkVersion() {
|
|
1486
|
-
return "6.15.
|
|
1488
|
+
return "6.15.3";
|
|
1487
1489
|
}
|
|
1488
1490
|
function useFingerprint() {
|
|
1489
1491
|
const fingerprint = useCallback2(() => {
|
|
@@ -2374,6 +2376,7 @@ import {
|
|
|
2374
2376
|
BULLPEN_API_KEY,
|
|
2375
2377
|
CAMBRIA_API_KEY,
|
|
2376
2378
|
ETHEREAL_API_KEY,
|
|
2379
|
+
FELIX_API_KEY,
|
|
2377
2380
|
HYENA_API_KEY,
|
|
2378
2381
|
HYPERBEAT_API_KEY,
|
|
2379
2382
|
HYPERDASH_API_KEY,
|
|
@@ -2606,7 +2609,8 @@ var flagConfig = {
|
|
|
2606
2609
|
BULLPEN_API_KEY,
|
|
2607
2610
|
LIGHTERXYZ_API_KEY,
|
|
2608
2611
|
PERPL_API_KEY,
|
|
2609
|
-
HYPEREDGE_API_KEY
|
|
2612
|
+
HYPEREDGE_API_KEY,
|
|
2613
|
+
FELIX_API_KEY
|
|
2610
2614
|
]
|
|
2611
2615
|
}
|
|
2612
2616
|
],
|
|
@@ -4983,6 +4987,27 @@ function computeDisplayDestinationToken(checkoutConfig, displayAssetAmount) {
|
|
|
4983
4987
|
stakingTokenIcon
|
|
4984
4988
|
};
|
|
4985
4989
|
}
|
|
4990
|
+
var LZOFT_CUSTOMERS = [ETHEREAL_API_KEY3, HYENA_API_KEY3];
|
|
4991
|
+
function isLayerZeroOftCheckout(apiKey, checkoutItem) {
|
|
4992
|
+
if (!LZOFT_CUSTOMERS.includes(apiKey)) {
|
|
4993
|
+
return false;
|
|
4994
|
+
}
|
|
4995
|
+
if (!checkoutItem) {
|
|
4996
|
+
return false;
|
|
4997
|
+
}
|
|
4998
|
+
const checkoutConfig = checkoutItem.initSettings.config;
|
|
4999
|
+
const sourceChainId = checkoutItem.selectedSourceAssetInfo.chainId;
|
|
5000
|
+
const sourceTokenAddress = checkoutItem.selectedSourceAssetInfo.address || "";
|
|
5001
|
+
const isNonDefaultDynamicTargetAsset = !!checkoutConfig.dynamicTargetAssetCandidates?.find(
|
|
5002
|
+
(cand) => !cand.isDefault && isTokenEquivalent2({
|
|
5003
|
+
firstTokenChainId: cand.tokenChainId,
|
|
5004
|
+
firstTokenAddress: cand.tokenAddress,
|
|
5005
|
+
secondTokenChainId: sourceChainId,
|
|
5006
|
+
secondTokenAddress: sourceTokenAddress
|
|
5007
|
+
})
|
|
5008
|
+
);
|
|
5009
|
+
return isNonDefaultDynamicTargetAsset;
|
|
5010
|
+
}
|
|
4986
5011
|
|
|
4987
5012
|
// src/utils/purifyCheckoutHistoryItem.ts
|
|
4988
5013
|
import {
|
|
@@ -5982,12 +6007,12 @@ var DEFAULT_TEXT_CONFIG_STEPS = {
|
|
|
5982
6007
|
title: "Submitting transaction...",
|
|
5983
6008
|
description: "Filling your transaction on the blockchain."
|
|
5984
6009
|
},
|
|
5985
|
-
2: ({ durationUnits, isWithdrawal }) => isWithdrawal ? {
|
|
6010
|
+
2: ({ durationUnits, isWithdrawal, finalizeVerb }) => isWithdrawal ? {
|
|
5986
6011
|
title: "Withdrawing from your account...",
|
|
5987
6012
|
description: `Your funds will arrive in a few ${durationUnits}.`
|
|
5988
6013
|
} : {
|
|
5989
6014
|
title: "Depositing into your account...",
|
|
5990
|
-
description: `It will take a few ${durationUnits} to
|
|
6015
|
+
description: `It will take a few ${durationUnits} to ${finalizeVerb}.`
|
|
5991
6016
|
}
|
|
5992
6017
|
};
|
|
5993
6018
|
var STEP_SPINNER_SIZE = 30;
|
|
@@ -6441,7 +6466,8 @@ function TransactionStatus({
|
|
|
6441
6466
|
const { description, title } = useMemo11(() => {
|
|
6442
6467
|
return typeof textConfig === "function" ? textConfig({
|
|
6443
6468
|
durationUnits: isLayerZero ? "minutes" : "seconds",
|
|
6444
|
-
isWithdrawal
|
|
6469
|
+
isWithdrawal,
|
|
6470
|
+
finalizeVerb: isLayerZero ? "credit" : "finalize"
|
|
6445
6471
|
}) : textConfig;
|
|
6446
6472
|
}, [isLayerZero, isWithdrawal, textConfig]);
|
|
6447
6473
|
const [descriptionKey, setDescriptionKey] = useState8(0);
|
|
@@ -6636,6 +6662,30 @@ function extractStartTimeMs(historyCheckoutItemId, activeCheckoutItem, { created
|
|
|
6636
6662
|
|
|
6637
6663
|
// src/components/FunCheckoutHistory/FunDirectExecutionStatus.tsx
|
|
6638
6664
|
import React27, { useEffect as useEffect12, useState as useState10 } from "react";
|
|
6665
|
+
|
|
6666
|
+
// src/hooks/useCheckoutTimeEstimate.ts
|
|
6667
|
+
import { FlagKey as FlagKey7, formatSecondsToReadableForm } from "@funkit/utils";
|
|
6668
|
+
var LAYERZEO_OFT_TIME_ESTIMATE_SECONDS = 180;
|
|
6669
|
+
function useCheckoutTimeEstimate(apiKey, checkoutItem, originalTimeEstimationMs, paymentMethod, bypassFlag) {
|
|
6670
|
+
const timeEstimatesJsonString = useFlag(FlagKey7.CheckoutTimeEstimateOverrides);
|
|
6671
|
+
const timeEstimates = safeJSONParse(
|
|
6672
|
+
timeEstimatesJsonString
|
|
6673
|
+
);
|
|
6674
|
+
if (isLayerZeroOftCheckout(apiKey, checkoutItem)) {
|
|
6675
|
+
return {
|
|
6676
|
+
estimatedTime: LAYERZEO_OFT_TIME_ESTIMATE_SECONDS,
|
|
6677
|
+
estimatedTimeText: "2 - 5 mins"
|
|
6678
|
+
};
|
|
6679
|
+
}
|
|
6680
|
+
const hasFlagEstimate = !!timeEstimates?.[paymentMethod];
|
|
6681
|
+
const estimatedTime = hasFlagEstimate && !bypassFlag ? timeEstimates[paymentMethod] : Math.ceil((originalTimeEstimationMs || 0) / 1e3);
|
|
6682
|
+
return {
|
|
6683
|
+
estimatedTime,
|
|
6684
|
+
estimatedTimeText: estimatedTime === 0 ? "-" : formatSecondsToReadableForm(estimatedTime, true)
|
|
6685
|
+
};
|
|
6686
|
+
}
|
|
6687
|
+
|
|
6688
|
+
// src/components/FunCheckoutHistory/FunDirectExecutionStatus.tsx
|
|
6639
6689
|
function FunDirectExecutionStatus({
|
|
6640
6690
|
directExecution,
|
|
6641
6691
|
isActiveCheckout,
|
|
@@ -6683,7 +6733,7 @@ function FunDirectExecutionStatusLoaded({
|
|
|
6683
6733
|
return () => clearInterval(interval);
|
|
6684
6734
|
}, []);
|
|
6685
6735
|
const elapsedSeconds = (currentTimeMs - startTimeMs) / 1e3;
|
|
6686
|
-
const delayedDepositCutoff = dangerousCustomDelayedAutoTriggerCutoff ?? 60;
|
|
6736
|
+
const delayedDepositCutoff = dangerousCustomDelayedAutoTriggerCutoff ?? (isLayerZero ? LAYERZEO_OFT_TIME_ESTIMATE_SECONDS : 60);
|
|
6687
6737
|
if (isRefunded) {
|
|
6688
6738
|
return null;
|
|
6689
6739
|
}
|
|
@@ -7211,7 +7261,7 @@ var ErrorFallback = () => /* @__PURE__ */ React35.createElement(
|
|
|
7211
7261
|
);
|
|
7212
7262
|
|
|
7213
7263
|
// src/components/FunBottomBar/FunBottomBar.tsx
|
|
7214
|
-
import { FlagKey as
|
|
7264
|
+
import { FlagKey as FlagKey8, isMobile as isMobile2 } from "@funkit/utils";
|
|
7215
7265
|
import React39 from "react";
|
|
7216
7266
|
|
|
7217
7267
|
// src/components/FunButton/FunButton.tsx
|
|
@@ -7532,7 +7582,7 @@ var FunBottomBar = ({
|
|
|
7532
7582
|
onClose
|
|
7533
7583
|
}) => {
|
|
7534
7584
|
const { uiCustomizations } = useFunkitConfig();
|
|
7535
|
-
const showTagline = useFlag(
|
|
7585
|
+
const showTagline = useFlag(FlagKey8.ShowPoweredTagline);
|
|
7536
7586
|
const defaultBottomSection = showTagline ? /* @__PURE__ */ React39.createElement(FunPoweredTagline, null) : void 0;
|
|
7537
7587
|
const bottomSectionComponent = bottomSection ?? defaultBottomSection;
|
|
7538
7588
|
const hasMultipleButtons = !!onClose;
|
|
@@ -8196,7 +8246,7 @@ Dialog.BottomBar = FunBottomBar;
|
|
|
8196
8246
|
import { RelayQuoteError } from "@funkit/api-base";
|
|
8197
8247
|
import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO8 } from "@funkit/chains";
|
|
8198
8248
|
import {
|
|
8199
|
-
FlagKey as
|
|
8249
|
+
FlagKey as FlagKey14,
|
|
8200
8250
|
formatCryptoAndStringify as formatCryptoAndStringify3,
|
|
8201
8251
|
formatCurrencyAndStringify as formatCurrencyAndStringify3
|
|
8202
8252
|
} from "@funkit/utils";
|
|
@@ -8376,7 +8426,7 @@ var getRemoteImageStyles = (isRemoteImage, isRemoteImageLoaded, src) => {
|
|
|
8376
8426
|
import React62 from "react";
|
|
8377
8427
|
|
|
8378
8428
|
// src/components/Dropdown/ChainDropdown.tsx
|
|
8379
|
-
import { FlagKey as
|
|
8429
|
+
import { FlagKey as FlagKey9 } from "@funkit/utils";
|
|
8380
8430
|
import React59 from "react";
|
|
8381
8431
|
|
|
8382
8432
|
// src/components/FunTooltip/FunTooltip.tsx
|
|
@@ -8613,10 +8663,14 @@ var SearchIcon = () => {
|
|
|
8613
8663
|
|
|
8614
8664
|
// src/components/FunInput/FunInput.css.ts
|
|
8615
8665
|
var baseWrapperStyles = "zue0i60";
|
|
8616
|
-
var
|
|
8617
|
-
var
|
|
8618
|
-
var
|
|
8619
|
-
var
|
|
8666
|
+
var baseWrapperStylesNoTransition = "zue0i61";
|
|
8667
|
+
var inputClass = "zue0i64 _1rsrm2fgh _1rsrm2fdq _1rsrm2fen _1rsrm2ffk _1rsrm2f1qg";
|
|
8668
|
+
var inputClassDisabled = "zue0i68 _1rsrm2fgh _1rsrm2fdq _1rsrm2fen _1rsrm2ffk _1rsrm2f1ry";
|
|
8669
|
+
var inputClassDisabledNoTransition = "zue0i6a _1rsrm2fgh _1rsrm2fdq _1rsrm2fen _1rsrm2ffk _1rsrm2f1ry";
|
|
8670
|
+
var inputClassError = "zue0i6c _1rsrm2fgh _1rsrm2fdq _1rsrm2fen _1rsrm2ffk _1rsrm2f1qg";
|
|
8671
|
+
var inputClassErrorNoTransition = "zue0i6e _1rsrm2fgh _1rsrm2fdq _1rsrm2fen _1rsrm2ffk _1rsrm2f1qg";
|
|
8672
|
+
var inputClassNoTransition = "zue0i66 _1rsrm2fgh _1rsrm2fdq _1rsrm2fen _1rsrm2ffk _1rsrm2f1qg";
|
|
8673
|
+
var numberInputResetStyle = "zue0i62";
|
|
8620
8674
|
|
|
8621
8675
|
// src/components/FunInput/FunInput.tsx
|
|
8622
8676
|
var DEFAULT_ICON_FONT_SIZE = "57px";
|
|
@@ -8646,6 +8700,7 @@ var FunInput = forwardRef3(function FunInputWithRef({
|
|
|
8646
8700
|
borderRadius = "connectButton",
|
|
8647
8701
|
isLoading = false,
|
|
8648
8702
|
allowMultiline = false,
|
|
8703
|
+
ignoreBaseTransitions = false,
|
|
8649
8704
|
// widthFitContent,
|
|
8650
8705
|
testId
|
|
8651
8706
|
}, ref) {
|
|
@@ -8701,7 +8756,7 @@ var FunInput = forwardRef3(function FunInputWithRef({
|
|
|
8701
8756
|
e.currentTarget.blur();
|
|
8702
8757
|
},
|
|
8703
8758
|
className: clsx9(
|
|
8704
|
-
error ? inputClassError : inputProps.disabled ? inputClassDisabled : inputClass,
|
|
8759
|
+
error ? ignoreBaseTransitions ? inputClassErrorNoTransition : inputClassError : inputProps.disabled ? ignoreBaseTransitions ? inputClassDisabledNoTransition : inputClassDisabled : ignoreBaseTransitions ? inputClassNoTransition : inputClass,
|
|
8705
8760
|
numberInputResetStyle
|
|
8706
8761
|
),
|
|
8707
8762
|
...inputProps,
|
|
@@ -8780,7 +8835,7 @@ var FunInput = forwardRef3(function FunInputWithRef({
|
|
|
8780
8835
|
borderStyle: "solid",
|
|
8781
8836
|
fontWeight: "medium",
|
|
8782
8837
|
...ignoreFontSize ? {} : { fontSize: "13" },
|
|
8783
|
-
className: baseWrapperStyles,
|
|
8838
|
+
className: ignoreBaseTransitions ? baseWrapperStylesNoTransition : baseWrapperStyles,
|
|
8784
8839
|
background: overrideBackground || {
|
|
8785
8840
|
base: "inputBackground",
|
|
8786
8841
|
hover: "offBackground"
|
|
@@ -9463,9 +9518,9 @@ var ChainDropdown = ({
|
|
|
9463
9518
|
tagComponent,
|
|
9464
9519
|
testId
|
|
9465
9520
|
}) => {
|
|
9466
|
-
const defaultChainIdJson = useFlag(
|
|
9521
|
+
const defaultChainIdJson = useFlag(FlagKey9.TokenTransferDefaultChainId);
|
|
9467
9522
|
const defaultChainId = safeJSONParse(defaultChainIdJson);
|
|
9468
|
-
const chainSortOrderJson = useFlag(
|
|
9523
|
+
const chainSortOrderJson = useFlag(FlagKey9.ChainIdSortOrder);
|
|
9469
9524
|
const chainSortOrder = safeJSONParse(chainSortOrderJson) || [];
|
|
9470
9525
|
const chainIds = getSortedChainIds();
|
|
9471
9526
|
const options = allowUnselect ? [DEFAULT_VALUE, ...chainIds] : chainIds;
|
|
@@ -9573,7 +9628,7 @@ var ChainDropdown = ({
|
|
|
9573
9628
|
};
|
|
9574
9629
|
|
|
9575
9630
|
// src/components/Dropdown/TokenDropdown.tsx
|
|
9576
|
-
import { FlagKey as
|
|
9631
|
+
import { FlagKey as FlagKey10 } from "@funkit/utils";
|
|
9577
9632
|
import React61, { useState as useState18 } from "react";
|
|
9578
9633
|
|
|
9579
9634
|
// src/utils/flags/patches/enable-bitcoin-patch.ts
|
|
@@ -9716,12 +9771,12 @@ var NewTokenBadge = ({ iconSymbol }) => {
|
|
|
9716
9771
|
// src/components/Dropdown/TokenDropdown.tsx
|
|
9717
9772
|
var TOKEN_ICON_SIZE = 16;
|
|
9718
9773
|
var useNewTokens = () => {
|
|
9719
|
-
const enableBitcoin = useFlag(
|
|
9720
|
-
const bannerJson = useFlag(
|
|
9774
|
+
const enableBitcoin = useFlag(FlagKey10.EnableBitcoin);
|
|
9775
|
+
const bannerJson = useFlag(FlagKey10.NewTokenAssetSelectionBanner);
|
|
9721
9776
|
const bannerData = useSafeJSONParse(bannerJson);
|
|
9722
9777
|
const addBitcoinToNewTokensMiddleware = enableBitcoin ? addBitcoinToNewTokens : void 0;
|
|
9723
9778
|
const newBadgeTokensJson = useFlag(
|
|
9724
|
-
|
|
9779
|
+
FlagKey10.TokenTransferNewTokens,
|
|
9725
9780
|
void 0,
|
|
9726
9781
|
addBitcoinToNewTokensMiddleware
|
|
9727
9782
|
);
|
|
@@ -9742,7 +9797,7 @@ var TokenDropdown = ({
|
|
|
9742
9797
|
hideNewTokenBadge,
|
|
9743
9798
|
testId
|
|
9744
9799
|
}) => {
|
|
9745
|
-
const defaultTokensJson = useFlag(
|
|
9800
|
+
const defaultTokensJson = useFlag(FlagKey10.TokenTransferDefaultTokens);
|
|
9746
9801
|
const defaultTokens = safeJSONParse(defaultTokensJson);
|
|
9747
9802
|
const enabledTokens = assets[selectedChainId];
|
|
9748
9803
|
const allTokens = getSortedTokens();
|
|
@@ -11460,13 +11515,13 @@ var useAssetSymbolPrice = ({
|
|
|
11460
11515
|
};
|
|
11461
11516
|
|
|
11462
11517
|
// src/hooks/useTokenChain.ts
|
|
11463
|
-
import { FlagKey as
|
|
11518
|
+
import { FlagKey as FlagKey12 } from "@funkit/utils";
|
|
11464
11519
|
import { useEffect as useEffect25, useState as useState20 } from "react";
|
|
11465
11520
|
import { polygon as polygon3 } from "viem/chains";
|
|
11466
11521
|
|
|
11467
11522
|
// src/hooks/useEnabledTokenTransferChainTokens.ts
|
|
11468
11523
|
import { bitcoinChain as bitcoinChain2, solanaChain as solanaChain4 } from "@funkit/chains";
|
|
11469
|
-
import { FlagKey as
|
|
11524
|
+
import { FlagKey as FlagKey11 } from "@funkit/utils";
|
|
11470
11525
|
import { base as base5 } from "viem/chains";
|
|
11471
11526
|
|
|
11472
11527
|
// src/hooks/useIsUsUser.ts
|
|
@@ -11483,14 +11538,14 @@ function useIsUsBankrUser() {
|
|
|
11483
11538
|
// src/hooks/useEnabledTokenTransferChainTokens.ts
|
|
11484
11539
|
function useEnabledTokenTransferChainTokens(transferInit, isWithdrawal) {
|
|
11485
11540
|
const isBankrUsUser = useIsUsBankrUser();
|
|
11486
|
-
const enableBitcoin = useFlag(
|
|
11541
|
+
const enableBitcoin = useFlag(FlagKey11.EnableBitcoin);
|
|
11487
11542
|
const addBitcoinToSourceChainsAndAssetsMiddleware = enableBitcoin ? addBitcoinToSourceChainsAndAssets : void 0;
|
|
11488
11543
|
const depositAssets = useFlag(
|
|
11489
|
-
|
|
11544
|
+
FlagKey11.TokenTransferSourceChainsAndAssets,
|
|
11490
11545
|
void 0,
|
|
11491
11546
|
addBitcoinToSourceChainsAndAssetsMiddleware
|
|
11492
11547
|
);
|
|
11493
|
-
const withdrawalAssets = useFlag(
|
|
11548
|
+
const withdrawalAssets = useFlag(FlagKey11.WithdrawalChainsAndAssets);
|
|
11494
11549
|
const assetsJsonString = isWithdrawal ? withdrawalAssets : depositAssets;
|
|
11495
11550
|
const assets = safeJSONParse(assetsJsonString);
|
|
11496
11551
|
if (!assets) {
|
|
@@ -11527,7 +11582,7 @@ var useTokenAndChainSelection = (transferInit, defaultValues, isWithdrawal) => {
|
|
|
11527
11582
|
transferInit ?? null,
|
|
11528
11583
|
isWithdrawal
|
|
11529
11584
|
);
|
|
11530
|
-
const defaultChainIdFlag = useFlag(
|
|
11585
|
+
const defaultChainIdFlag = useFlag(FlagKey12.TokenTransferDefaultChainId);
|
|
11531
11586
|
const defaultChainId = defaultValues?.chainId ?? Number(defaultChainIdFlag);
|
|
11532
11587
|
const validDefaultChainId = filteredAssets[defaultChainId] !== void 0 ? defaultChainId : polygon3.id;
|
|
11533
11588
|
const [selectedChainId, setSelectedChainId] = useState20(validDefaultChainId);
|
|
@@ -11750,7 +11805,7 @@ import { arbitrum as arbitrum4 } from "viem/chains";
|
|
|
11750
11805
|
|
|
11751
11806
|
// src/hooks/useTokenTransfer.ts
|
|
11752
11807
|
import { bitcoinChain as bitcoinChain3, solanaChain as solanaChain5 } from "@funkit/chains";
|
|
11753
|
-
import { FlagKey as
|
|
11808
|
+
import { FlagKey as FlagKey13 } from "@funkit/utils";
|
|
11754
11809
|
import { useMemo as useMemo17 } from "react";
|
|
11755
11810
|
import { arbitrum as arbitrum3, mainnet as mainnet8, polygon as polygon5 } from "viem/chains";
|
|
11756
11811
|
|
|
@@ -11774,7 +11829,7 @@ var useTokenTransfer = (selectedChainId, selectedToken, chainIds) => {
|
|
|
11774
11829
|
const { apiKey } = useFunkitConfig();
|
|
11775
11830
|
const { checkoutItem } = useCheckoutContext();
|
|
11776
11831
|
const enableUniversal = useFlag(
|
|
11777
|
-
|
|
11832
|
+
FlagKey13.EnableTokenTransferUniversalDepositAddress,
|
|
11778
11833
|
false
|
|
11779
11834
|
);
|
|
11780
11835
|
const estPriceImpact = usePriceImpactEstimation(
|
|
@@ -11827,7 +11882,7 @@ var useTokenTransfer = (selectedChainId, selectedToken, chainIds) => {
|
|
|
11827
11882
|
};
|
|
11828
11883
|
var useMinTransferLimits = () => {
|
|
11829
11884
|
const { userIpInfo } = useFunkitUserIp();
|
|
11830
|
-
const minTransferValueJsonString = useFlag(
|
|
11885
|
+
const minTransferValueJsonString = useFlag(FlagKey13.MinTokenTransferValue);
|
|
11831
11886
|
const minTransferValue = safeJSONParse(
|
|
11832
11887
|
minTransferValueJsonString
|
|
11833
11888
|
);
|
|
@@ -13005,7 +13060,7 @@ function useWithdrawalAssets(config) {
|
|
|
13005
13060
|
},
|
|
13006
13061
|
true
|
|
13007
13062
|
);
|
|
13008
|
-
const excludedTokenStr = useFlag(
|
|
13063
|
+
const excludedTokenStr = useFlag(FlagKey14.WithdrawalExcludeTokens);
|
|
13009
13064
|
const excludedTokens = safeJSONParse(excludedTokenStr);
|
|
13010
13065
|
if (excludedTokens) {
|
|
13011
13066
|
for (const chainIdStr of Object.keys(excludedTokens)) {
|
|
@@ -13644,7 +13699,6 @@ import React217 from "react";
|
|
|
13644
13699
|
import { createPortal as createPortal20 } from "react-dom";
|
|
13645
13700
|
|
|
13646
13701
|
// src/components/FunTransactionSummary/PaymentMethodSummary.tsx
|
|
13647
|
-
import { formatSecondsToReadableForm as formatSecondsToReadableForm5 } from "@funkit/utils";
|
|
13648
13702
|
import React210 from "react";
|
|
13649
13703
|
|
|
13650
13704
|
// src/components/FunTransactionSummary/FunTxSummaryComponents.tsx
|
|
@@ -13708,11 +13762,7 @@ import { useAccount as useAccount6 } from "wagmi";
|
|
|
13708
13762
|
|
|
13709
13763
|
// src/components/FunPayments/FunPaymentMethods.tsx
|
|
13710
13764
|
import { BridgeCustomerStatus as BridgeCustomerStatus3 } from "@funkit/api-base";
|
|
13711
|
-
import {
|
|
13712
|
-
FlagKey as FlagKey16,
|
|
13713
|
-
formatCurrencyAndStringify as formatCurrencyAndStringify4,
|
|
13714
|
-
formatSecondsToReadableForm
|
|
13715
|
-
} from "@funkit/utils";
|
|
13765
|
+
import { FlagKey as FlagKey16, formatCurrencyAndStringify as formatCurrencyAndStringify4 } from "@funkit/utils";
|
|
13716
13766
|
import React78, { useEffect as useEffect30 } from "react";
|
|
13717
13767
|
|
|
13718
13768
|
// src/domains/bridge.ts
|
|
@@ -13808,20 +13858,6 @@ function isKycUninitialized(customerStatus) {
|
|
|
13808
13858
|
var isSoftRejected = (customer) => customer && isKycUninitialized(customer.status) && customer.rejection_reasons.length > 0;
|
|
13809
13859
|
var FIAT_PROCESSING_TIME = "1-2 business days";
|
|
13810
13860
|
|
|
13811
|
-
// src/hooks/useCheckoutTimeEstimate.ts
|
|
13812
|
-
import { FlagKey as FlagKey14 } from "@funkit/utils";
|
|
13813
|
-
function useCheckoutTimeEstimate(originalTimeEstimationMs, paymentMethod = "card" /* CARD */, bypassFlag = false) {
|
|
13814
|
-
const timeEstimatesJsonString = useFlag(FlagKey14.CheckoutTimeEstimateOverrides);
|
|
13815
|
-
const timeEstimates = safeJSONParse(
|
|
13816
|
-
timeEstimatesJsonString
|
|
13817
|
-
);
|
|
13818
|
-
const hasFlagEstimate = !!timeEstimates?.[paymentMethod];
|
|
13819
|
-
if (bypassFlag || !hasFlagEstimate) {
|
|
13820
|
-
return Math.ceil((originalTimeEstimationMs || 0) / 1e3);
|
|
13821
|
-
}
|
|
13822
|
-
return timeEstimates[paymentMethod];
|
|
13823
|
-
}
|
|
13824
|
-
|
|
13825
13861
|
// src/hooks/useFrogAccount.ts
|
|
13826
13862
|
import {
|
|
13827
13863
|
createBridgeBankAccount,
|
|
@@ -15426,6 +15462,7 @@ var ConnectedMeshPaymentMethodItem = ({
|
|
|
15426
15462
|
onBrokerageError,
|
|
15427
15463
|
showSelectedCheckmark = true
|
|
15428
15464
|
}) => {
|
|
15465
|
+
const { apiKey } = useFunkitConfig();
|
|
15429
15466
|
const {
|
|
15430
15467
|
data: assetHoldings,
|
|
15431
15468
|
// Checking for isPending since isLoading is false initially while query is disabled
|
|
@@ -15435,11 +15472,14 @@ var ConnectedMeshPaymentMethodItem = ({
|
|
|
15435
15472
|
} = useBluvoExchangeBalance({ exchange: paymentMethodInfo.exchange });
|
|
15436
15473
|
const sourceBalance = assetHoldings ? getTotalAssetBalance(assetHoldings) : 0;
|
|
15437
15474
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo);
|
|
15438
|
-
const
|
|
15475
|
+
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
15476
|
+
apiKey,
|
|
15477
|
+
null,
|
|
15439
15478
|
BROKERAGE_TIME_ESTIMATE,
|
|
15440
|
-
"brokerage" /* BROKERAGE
|
|
15479
|
+
"brokerage" /* BROKERAGE */,
|
|
15480
|
+
false
|
|
15441
15481
|
);
|
|
15442
|
-
const disclaimerText = isPending ? "Fetching balance..." : isBalanceError ? "Couldn't fetch balance" : `${formatCurrencyAndStringify4(sourceBalance)} \u2022 ${
|
|
15482
|
+
const disclaimerText = isPending ? "Fetching balance..." : isBalanceError ? "Couldn't fetch balance" : `${formatCurrencyAndStringify4(sourceBalance)} \u2022 ${estimatedTimeText}`;
|
|
15443
15483
|
const hasLowBalance = !isPending && sourceBalance < getUsdMinAmount();
|
|
15444
15484
|
const isDisabled = isPending || !!isBalanceError || hasLowBalance;
|
|
15445
15485
|
const icon = isPending ? /* @__PURE__ */ React78.createElement(SpinnerIcon, { size: 20 }) : label.icon;
|
|
@@ -15506,10 +15546,13 @@ var CardPaymentMethodItem = ({
|
|
|
15506
15546
|
onClick,
|
|
15507
15547
|
paymentIcon
|
|
15508
15548
|
}) => {
|
|
15509
|
-
const { textCustomizations } = useFunkitConfig();
|
|
15510
|
-
const
|
|
15549
|
+
const { apiKey, textCustomizations } = useFunkitConfig();
|
|
15550
|
+
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
15551
|
+
apiKey,
|
|
15552
|
+
null,
|
|
15511
15553
|
CARD_TIME_ESTIMATE,
|
|
15512
|
-
"card" /* CARD
|
|
15554
|
+
"card" /* CARD */,
|
|
15555
|
+
false
|
|
15513
15556
|
);
|
|
15514
15557
|
return /* @__PURE__ */ React78.createElement(
|
|
15515
15558
|
FunPaymentMethodItem,
|
|
@@ -15520,7 +15563,7 @@ var CardPaymentMethodItem = ({
|
|
|
15520
15563
|
valueIcon: customValueIcon ?? /* @__PURE__ */ React78.createElement(CombinedCreditCardOptionsIcon, null),
|
|
15521
15564
|
onClick,
|
|
15522
15565
|
isDisabled: !isClickable,
|
|
15523
|
-
disclaimerText: `$50,000 limit \u2022 ${
|
|
15566
|
+
disclaimerText: `$50,000 limit \u2022 ${estimatedTimeText}`,
|
|
15524
15567
|
testId: "card-payment-method"
|
|
15525
15568
|
}
|
|
15526
15569
|
);
|
|
@@ -15569,14 +15612,17 @@ var BrokeragePaymentMethodItem = ({
|
|
|
15569
15612
|
onClick,
|
|
15570
15613
|
paymentIcon
|
|
15571
15614
|
}) => {
|
|
15572
|
-
const { textCustomizations } = useFunkitConfig();
|
|
15615
|
+
const { apiKey, textCustomizations } = useFunkitConfig();
|
|
15573
15616
|
const { exchangeOptions } = useBluvoSupportedExchanges({
|
|
15574
15617
|
iconSize: 12,
|
|
15575
15618
|
filterBy: ["live" /* Live */, "coming_soon" /* ComingSoon */]
|
|
15576
15619
|
});
|
|
15577
|
-
const
|
|
15620
|
+
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
15621
|
+
apiKey,
|
|
15622
|
+
null,
|
|
15578
15623
|
BROKERAGE_TIME_ESTIMATE,
|
|
15579
|
-
"brokerage" /* BROKERAGE
|
|
15624
|
+
"brokerage" /* BROKERAGE */,
|
|
15625
|
+
false
|
|
15580
15626
|
);
|
|
15581
15627
|
return /* @__PURE__ */ React78.createElement(
|
|
15582
15628
|
FunPaymentMethodItem,
|
|
@@ -15587,7 +15633,7 @@ var BrokeragePaymentMethodItem = ({
|
|
|
15587
15633
|
onClick,
|
|
15588
15634
|
valueIcon: customValueIcon ?? /* @__PURE__ */ React78.createElement(Box, { display: "flex", gap: "2", alignItems: "center" }, exchangeOptions.map(({ exchange, exchangeIcon }) => /* @__PURE__ */ React78.createElement(React78.Fragment, { key: exchange }, exchangeIcon))),
|
|
15589
15635
|
isDisabled: !isClickable,
|
|
15590
|
-
disclaimerText: `No limit \u2022 ${
|
|
15636
|
+
disclaimerText: `No limit \u2022 ${estimatedTimeText}`
|
|
15591
15637
|
}
|
|
15592
15638
|
);
|
|
15593
15639
|
};
|
|
@@ -21557,7 +21603,7 @@ function ConfirmationStep({
|
|
|
21557
21603
|
}) {
|
|
21558
21604
|
const { checkoutItem, updateTargetAssetAmount } = useCheckoutContext();
|
|
21559
21605
|
const { latestQuote } = useQuoteContext();
|
|
21560
|
-
const
|
|
21606
|
+
const { apiKey, uiCustomizations } = useFunkitConfig();
|
|
21561
21607
|
const { getDirectExecutionInfo } = useCheckoutDirectExecution();
|
|
21562
21608
|
const { bluvoClient } = useFunkitBrokerageContext();
|
|
21563
21609
|
const { paymentMethodInfo } = modalState;
|
|
@@ -21651,7 +21697,9 @@ function ConfirmationStep({
|
|
|
21651
21697
|
checkoutConfig: checkoutItem?.initSettings.config,
|
|
21652
21698
|
hideAmount: true
|
|
21653
21699
|
});
|
|
21654
|
-
const
|
|
21700
|
+
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
21701
|
+
apiKey,
|
|
21702
|
+
checkoutItem,
|
|
21655
21703
|
latestQuote?.finalTimeEstimationMs,
|
|
21656
21704
|
paymentMethodInfo.paymentMethod,
|
|
21657
21705
|
isDirectExecution
|
|
@@ -21680,7 +21728,6 @@ function ConfirmationStep({
|
|
|
21680
21728
|
};
|
|
21681
21729
|
const isQuoteLoading = isInitialQuoting || isQuoting;
|
|
21682
21730
|
const isStepLoading = isInitialQuoting || isContinuing || isRefreshing;
|
|
21683
|
-
const uiCustomizations = funkitConfig.uiCustomizations?.confirmationScreen;
|
|
21684
21731
|
const customRecipient = checkoutItem?.initSettings.config.customRecipient;
|
|
21685
21732
|
const showKatanaBridgeAlert = useMemo33(() => {
|
|
21686
21733
|
const relayQuoteMetadata = latestQuote?.baseQuote?.metadata;
|
|
@@ -21688,14 +21735,14 @@ function ConfirmationStep({
|
|
|
21688
21735
|
return false;
|
|
21689
21736
|
}
|
|
21690
21737
|
const { swapImpact, appFeePercent } = extractRelayFeeInfo(relayQuoteMetadata);
|
|
21691
|
-
return isKatanaCustomer(
|
|
21738
|
+
return isKatanaCustomer(apiKey) && // Don't show for earn flow
|
|
21692
21739
|
!isKatanaEarnFlow({
|
|
21693
|
-
apiKey
|
|
21740
|
+
apiKey,
|
|
21694
21741
|
checkoutConfig: checkoutItem?.initSettings.config
|
|
21695
21742
|
}) && // Don't take totalImpact, just sum swapImpact and appFeePercent
|
|
21696
21743
|
// https://fun-xyz.slack.com/archives/C08PVUDA1M2/p1752179735981389?thread_ts=1752176009.628309&cid=C08PVUDA1M2
|
|
21697
21744
|
swapImpact + appFeePercent > KATANA_BRIDGE_ALERT_THRESHOLD_PERCENT;
|
|
21698
|
-
}, [
|
|
21745
|
+
}, [apiKey, latestQuote, checkoutItem]);
|
|
21699
21746
|
const checkoutConfig = checkoutItem?.initSettings.config;
|
|
21700
21747
|
const hasStakingToken = Boolean(checkoutConfig?.stakingToken);
|
|
21701
21748
|
const isVaultDeposit = checkoutConfig && isVaultDepositCheckout(checkoutConfig, {
|
|
@@ -21714,7 +21761,7 @@ function ConfirmationStep({
|
|
|
21714
21761
|
checkoutItem && !hidePrimaryInfo && /* @__PURE__ */ React145.createElement(
|
|
21715
21762
|
CheckoutPrimaryInfo,
|
|
21716
21763
|
{
|
|
21717
|
-
showTokenAmount: uiCustomizations?.showTokenAmount,
|
|
21764
|
+
showTokenAmount: uiCustomizations?.confirmationScreen?.showTokenAmount,
|
|
21718
21765
|
config: checkoutItem.initSettings.config,
|
|
21719
21766
|
usdAmount: latestQuote?.baseQuote.estSubtotalUsd,
|
|
21720
21767
|
isLoading: isQuoteLoading
|
|
@@ -21726,7 +21773,7 @@ function ConfirmationStep({
|
|
|
21726
21773
|
paymentMethodInfo,
|
|
21727
21774
|
customRecipient,
|
|
21728
21775
|
isLoading: isQuoteLoading,
|
|
21729
|
-
|
|
21776
|
+
estimatedTimeText
|
|
21730
21777
|
}
|
|
21731
21778
|
),
|
|
21732
21779
|
/* @__PURE__ */ React145.createElement(
|
|
@@ -21799,8 +21846,11 @@ var DirectExecutionNotifCenterContent = ({
|
|
|
21799
21846
|
}) => {
|
|
21800
21847
|
const { checkoutItem } = useCheckoutContext();
|
|
21801
21848
|
const { latestQuote } = useQuoteContext();
|
|
21849
|
+
const { apiKey } = useFunkitConfig();
|
|
21802
21850
|
const bottomSectionRef = useBottomSectionRef();
|
|
21803
|
-
const
|
|
21851
|
+
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
21852
|
+
apiKey,
|
|
21853
|
+
checkoutItem,
|
|
21804
21854
|
latestQuote?.finalTimeEstimationMs,
|
|
21805
21855
|
paymentMethodInfo.paymentMethod,
|
|
21806
21856
|
false
|
|
@@ -21851,7 +21901,7 @@ var DirectExecutionNotifCenterContent = ({
|
|
|
21851
21901
|
paymentMethodInfo,
|
|
21852
21902
|
customRecipient,
|
|
21853
21903
|
isLoading: false,
|
|
21854
|
-
|
|
21904
|
+
estimatedTimeText
|
|
21855
21905
|
}
|
|
21856
21906
|
),
|
|
21857
21907
|
/* @__PURE__ */ React146.createElement(
|
|
@@ -24697,14 +24747,16 @@ function useAmountInputUI({
|
|
|
24697
24747
|
fiatCurrency,
|
|
24698
24748
|
handleSubmit
|
|
24699
24749
|
}) {
|
|
24700
|
-
const [
|
|
24750
|
+
const [isLayoutAnimating, setisLayoutAnimating] = React161.useState(true);
|
|
24701
24751
|
const { targetAssetTicker, stakingToken } = checkoutConfig;
|
|
24702
24752
|
const handleIsAmountInAbsoluteToggle = () => {
|
|
24753
|
+
setisLayoutAnimating(true);
|
|
24703
24754
|
if (!stakingToken) {
|
|
24704
24755
|
toggleInputInFiat();
|
|
24705
24756
|
}
|
|
24706
24757
|
};
|
|
24707
24758
|
const handleKeyDown = (event) => {
|
|
24759
|
+
setisLayoutAnimating(false);
|
|
24708
24760
|
if (event.key !== "Enter") {
|
|
24709
24761
|
return;
|
|
24710
24762
|
}
|
|
@@ -24745,6 +24797,7 @@ function useAmountInputUI({
|
|
|
24745
24797
|
fontVariantNumeric: "proportional-nums"
|
|
24746
24798
|
},
|
|
24747
24799
|
ignoreFontSize: true,
|
|
24800
|
+
ignoreBaseTransitions: true,
|
|
24748
24801
|
overrideBorderWidth: "0",
|
|
24749
24802
|
overrideBackground: "transparent",
|
|
24750
24803
|
placeholder,
|
|
@@ -24756,7 +24809,7 @@ function useAmountInputUI({
|
|
|
24756
24809
|
duration: 0.2,
|
|
24757
24810
|
ease: [0.25, 1, 0.5, 1],
|
|
24758
24811
|
layout: {
|
|
24759
|
-
duration: 0.2,
|
|
24812
|
+
duration: isLayoutAnimating ? 0.2 : 0,
|
|
24760
24813
|
ease: [0.25, 1, 0.5, 1]
|
|
24761
24814
|
}
|
|
24762
24815
|
};
|
|
@@ -24768,8 +24821,6 @@ function useAmountInputUI({
|
|
|
24768
24821
|
input: {
|
|
24769
24822
|
transition,
|
|
24770
24823
|
animate: { fontSize },
|
|
24771
|
-
onAnimationStart: () => setIsAnimating(true),
|
|
24772
|
-
onAnimationComplete: () => setIsAnimating(false),
|
|
24773
24824
|
style: {
|
|
24774
24825
|
color: "var(--fk-color-primary-text)",
|
|
24775
24826
|
display: "flex",
|
|
@@ -24783,8 +24834,6 @@ function useAmountInputUI({
|
|
|
24783
24834
|
switch: {
|
|
24784
24835
|
transition,
|
|
24785
24836
|
animate: { fontSize: "inherit" },
|
|
24786
|
-
onAnimationStart: () => setIsAnimating(true),
|
|
24787
|
-
onAnimationComplete: () => setIsAnimating(false),
|
|
24788
24837
|
style: {
|
|
24789
24838
|
color: "var(--fk-color-secondary-text)",
|
|
24790
24839
|
zIndex: 100,
|
|
@@ -24809,7 +24858,7 @@ function useAmountInputUI({
|
|
|
24809
24858
|
opacity: 0
|
|
24810
24859
|
},
|
|
24811
24860
|
animate: {
|
|
24812
|
-
opacity:
|
|
24861
|
+
opacity: isLayoutAnimating ? 1 : 0
|
|
24813
24862
|
},
|
|
24814
24863
|
transition,
|
|
24815
24864
|
style: {
|
|
@@ -24843,7 +24892,27 @@ function useAmountInputUI({
|
|
|
24843
24892
|
width: inputWidth
|
|
24844
24893
|
}
|
|
24845
24894
|
},
|
|
24846
|
-
isInputInFiat ? /* @__PURE__ */ React161.createElement(
|
|
24895
|
+
isInputInFiat ? /* @__PURE__ */ React161.createElement(
|
|
24896
|
+
motion9.div,
|
|
24897
|
+
{
|
|
24898
|
+
key: "fiat",
|
|
24899
|
+
layoutId: isLayoutAnimating ? "fiat" : void 0,
|
|
24900
|
+
...motionProps.input
|
|
24901
|
+
},
|
|
24902
|
+
inputAffix.type === "prefix" && affixElement,
|
|
24903
|
+
/* @__PURE__ */ React161.createElement(FunInput, { ...sharedInputProps }),
|
|
24904
|
+
/* @__PURE__ */ React161.createElement(Backdrop, null)
|
|
24905
|
+
) : /* @__PURE__ */ React161.createElement(
|
|
24906
|
+
motion9.div,
|
|
24907
|
+
{
|
|
24908
|
+
key: "asset",
|
|
24909
|
+
layoutId: isLayoutAnimating ? "asset" : void 0,
|
|
24910
|
+
...motionProps.input
|
|
24911
|
+
},
|
|
24912
|
+
/* @__PURE__ */ React161.createElement(FunInput, { ...sharedInputProps }),
|
|
24913
|
+
inputAffix.type === "suffix" && affixElement,
|
|
24914
|
+
/* @__PURE__ */ React161.createElement(Backdrop, null)
|
|
24915
|
+
)
|
|
24847
24916
|
)
|
|
24848
24917
|
);
|
|
24849
24918
|
const innerSwitch = (() => {
|
|
@@ -25867,7 +25936,8 @@ function MeldRedirect({
|
|
|
25867
25936
|
// src/modals/CheckoutModal/SelectAsset.tsx
|
|
25868
25937
|
import {
|
|
25869
25938
|
FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST as FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST2,
|
|
25870
|
-
etherealChain
|
|
25939
|
+
etherealChain,
|
|
25940
|
+
hyperEvmChain as hyperEvmChain3
|
|
25871
25941
|
} from "@funkit/chains";
|
|
25872
25942
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify11, isTokenEquivalent as isTokenEquivalent8 } from "@funkit/utils";
|
|
25873
25943
|
import React172, { useEffect as useEffect45, useMemo as useMemo40, useState as useState53 } from "react";
|
|
@@ -26612,6 +26682,16 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates) {
|
|
|
26612
26682
|
return true;
|
|
26613
26683
|
}
|
|
26614
26684
|
}
|
|
26685
|
+
if (isHyenaCustomer(apiKey)) {
|
|
26686
|
+
if (isTokenEquivalent8({
|
|
26687
|
+
firstTokenChainId: hyperEvmChain3.id.toString(),
|
|
26688
|
+
firstTokenAddress: "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
|
|
26689
|
+
secondTokenChainId: asset.pickedChainId,
|
|
26690
|
+
secondTokenAddress: asset.tokenAddress
|
|
26691
|
+
})) {
|
|
26692
|
+
return true;
|
|
26693
|
+
}
|
|
26694
|
+
}
|
|
26615
26695
|
return dynamicTargetAssetCandidates.some(
|
|
26616
26696
|
(token) => isTokenEquivalent8({
|
|
26617
26697
|
firstTokenChainId: token.tokenChainId,
|
|
@@ -27335,10 +27415,7 @@ var QRCodeSkeletonLoader = ({
|
|
|
27335
27415
|
var QRCodeSkeletonLoader_default = QRCodeSkeletonLoader;
|
|
27336
27416
|
|
|
27337
27417
|
// src/components/TransferTokenDetails/TransferTokenDetails.tsx
|
|
27338
|
-
import {
|
|
27339
|
-
formatNumberAndStringify,
|
|
27340
|
-
formatSecondsToReadableForm as formatSecondsToReadableForm4
|
|
27341
|
-
} from "@funkit/utils";
|
|
27418
|
+
import { formatNumberAndStringify } from "@funkit/utils";
|
|
27342
27419
|
import React186 from "react";
|
|
27343
27420
|
|
|
27344
27421
|
// src/components/Icons/New/DollarIcon.tsx
|
|
@@ -27629,7 +27706,10 @@ var TransferTokenDetails = ({
|
|
|
27629
27706
|
estPriceImpact,
|
|
27630
27707
|
maxSlippage
|
|
27631
27708
|
}) => {
|
|
27632
|
-
const
|
|
27709
|
+
const { apiKey } = useFunkitConfig();
|
|
27710
|
+
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
27711
|
+
apiKey,
|
|
27712
|
+
null,
|
|
27633
27713
|
// not provided on purpose for <1min default visuals
|
|
27634
27714
|
estProcessingTime,
|
|
27635
27715
|
"token_transfer" /* TOKEN_TRANSFER */,
|
|
@@ -27694,7 +27774,7 @@ var TransferTokenDetails = ({
|
|
|
27694
27774
|
] : [],
|
|
27695
27775
|
{
|
|
27696
27776
|
text: "Processing time:",
|
|
27697
|
-
value:
|
|
27777
|
+
value: estimatedTimeText,
|
|
27698
27778
|
icon: /* @__PURE__ */ React186.createElement(SpeedometerIcon, null)
|
|
27699
27779
|
},
|
|
27700
27780
|
{
|
|
@@ -30003,7 +30083,7 @@ var PaymentRouteSummarySkeletonLoader = () => /* @__PURE__ */ React209.createEle
|
|
|
30003
30083
|
function PaymentMethodSummary({
|
|
30004
30084
|
paymentMethodInfo,
|
|
30005
30085
|
customRecipient,
|
|
30006
|
-
|
|
30086
|
+
estimatedTimeText,
|
|
30007
30087
|
isLoading,
|
|
30008
30088
|
isWithdrawal = false
|
|
30009
30089
|
}) {
|
|
@@ -30024,7 +30104,7 @@ function PaymentMethodSummary({
|
|
|
30024
30104
|
width: "54"
|
|
30025
30105
|
}
|
|
30026
30106
|
)
|
|
30027
|
-
) : /* @__PURE__ */ React210.createElement(Text, { weight: "medium", size: "12", textAlign: "right" },
|
|
30107
|
+
) : /* @__PURE__ */ React210.createElement(Text, { weight: "medium", size: "12", textAlign: "right" }, estimatedTimeText)));
|
|
30028
30108
|
}
|
|
30029
30109
|
|
|
30030
30110
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotifications.tsx
|
|
@@ -31247,8 +31327,11 @@ var DirectExecutionNotifCenterContent2 = ({
|
|
|
31247
31327
|
paymentMethodInfo,
|
|
31248
31328
|
quote
|
|
31249
31329
|
}) => {
|
|
31330
|
+
const { apiKey } = useFunkitConfig();
|
|
31250
31331
|
const bottomSectionRef = useBottomSectionRef();
|
|
31251
|
-
const
|
|
31332
|
+
const { estimatedTimeText } = useCheckoutTimeEstimate(
|
|
31333
|
+
apiKey,
|
|
31334
|
+
null,
|
|
31252
31335
|
quote?.finalTimeEstimationMs,
|
|
31253
31336
|
paymentMethodInfo.paymentMethod,
|
|
31254
31337
|
false
|
|
@@ -31299,8 +31382,8 @@ var DirectExecutionNotifCenterContent2 = ({
|
|
|
31299
31382
|
paymentMethodInfo,
|
|
31300
31383
|
customRecipient,
|
|
31301
31384
|
isLoading: false,
|
|
31302
|
-
|
|
31303
|
-
|
|
31385
|
+
isWithdrawal: true,
|
|
31386
|
+
estimatedTimeText
|
|
31304
31387
|
}
|
|
31305
31388
|
),
|
|
31306
31389
|
/* @__PURE__ */ React217.createElement(HelpAlert, { onHelp })
|
|
@@ -32908,7 +32991,6 @@ function FunCheckoutModalInner({
|
|
|
32908
32991
|
const checkoutConfig = hideModalTitleMetaIfTrue(
|
|
32909
32992
|
checkoutItem.initSettings.config,
|
|
32910
32993
|
HIDE_MODAL_META_TITLE_AND_DIVIDER.includes(modalState.step)
|
|
32911
|
-
// any is fine here, as we're just checking if the step is in the array
|
|
32912
32994
|
);
|
|
32913
32995
|
const { onScroll, topbar, withTopDivider } = useCustomStatusAnimationAboveTopbar({
|
|
32914
32996
|
depositAddress: checkoutItem.depositAddress ?? void 0,
|
|
@@ -32929,10 +33011,7 @@ function FunCheckoutModalInner({
|
|
|
32929
33011
|
withTopDivider: checkoutConfig.modalTitleMeta ? "always" : "scroll",
|
|
32930
33012
|
scrollableContent: CHECKOUT_DIALOG_CONTENT_ID
|
|
32931
33013
|
});
|
|
32932
|
-
const showBottomDivider = NEVER_SHOW_BOTTOM_DIVIDER_STEPS.includes(
|
|
32933
|
-
modalState.step
|
|
32934
|
-
// any is fine here, as we're just checking if the step is in the array
|
|
32935
|
-
) || modalState.hideBottomDivider ? "never" : ALWAYS_SHOW_BOTTOM_DIVIDER_STEPS.includes(modalState.step) ? "always" : "scroll";
|
|
33014
|
+
const showBottomDivider = NEVER_SHOW_BOTTOM_DIVIDER_STEPS.includes(modalState.step) || modalState.hideBottomDivider ? "never" : ALWAYS_SHOW_BOTTOM_DIVIDER_STEPS.includes(modalState.step) ? "always" : "scroll";
|
|
32936
33015
|
return /* @__PURE__ */ React239.createElement(
|
|
32937
33016
|
Dialog,
|
|
32938
33017
|
{
|