@funkit/connect 9.27.0 → 9.28.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 +59 -0
- package/dist/clients/{chunk-4IWQ2UT5.js → chunk-4O4YAFYK.js} +69 -7
- package/dist/clients/{chunk-O5CTDT3L.js → chunk-7LKK5QMZ.js} +1 -1
- package/dist/clients/{chunk-VT3ERWXE.js → chunk-CGHPNWIF.js} +1 -1
- package/dist/clients/{chunk-F4SCUKY6.js → chunk-TQVRP3Z2.js} +10 -6
- package/dist/clients/lighter.css +7 -1
- package/dist/clients/lighter.js +2 -2
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +7 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +5 -6
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +2 -2
- package/dist/clients/polymarket/index.css +7 -1
- package/dist/clients/polymarket/index.js +5 -6
- package/dist/clients/polymarket/polymarket.js +1 -1
- package/dist/components/BitcoinLightningBanner/BitcoinLightningBanner.d.ts +12 -0
- package/dist/domains/clientMetadata.d.ts +2 -3
- package/dist/domains/quoteMode/types.d.ts +0 -1
- package/dist/hooks/queries/useRecentDeposits.d.ts +1 -1
- package/dist/hooks/useInjectedAssetHoldings.d.ts +10 -13
- package/dist/hooks/usePaymentSources.d.ts +1 -1
- package/dist/hooks/useStartBitcoinLightning.d.ts +11 -0
- package/dist/hooks/useXstockAssetHoldings.d.ts +3 -1
- package/dist/index.css +7 -1
- package/dist/index.js +659 -770
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +4 -9
- package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +1 -3
- package/dist/modals/CheckoutModal/TransferToken/TransferToken.d.ts +1 -1
- package/dist/modals/PolymarketPerpsTransfer/PolymarketPerpsTransferScreen.d.ts +1 -1
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +6 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +0 -2
- package/dist/utils/checkout.d.ts +0 -10
- package/dist/utils/withdrawal.d.ts +12 -0
- 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 +51 -51
- 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 +5 -5
- package/dist/clients/chunk-ZEXZQOAO.js +0 -96
- package/dist/clients/polymarket/usePolymarketAccountBalances.js +0 -12
- package/dist/{clients/polymarket → hooks}/usePolymarketAccountBalances.d.ts +0 -0
- package/dist/wallets/walletConnectors/{chunk-W2LCLDPX.js → chunk-2VP2F6EK.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-IULPZP2Q.js → chunk-4T6ZSRJF.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-WAHGI5L7.js → chunk-6BW3HLBG.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YO2K4MBH.js → chunk-CCQV2ZET.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-TKB2OY6G.js → chunk-CPI4TD43.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-OX37G4YT.js → chunk-F5XEEVG6.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-JPN6TWIT.js → chunk-HNRB7KJU.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-WKNQMP4A.js → chunk-HTHAK6XB.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-GUQM4QSL.js → chunk-MIQTHJ6X.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-4NV5BYRP.js → chunk-RB3HR4R2.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-SWFF3TWJ.js → chunk-RVOY537T.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-KI5Y2BBF.js → chunk-STVVP43G.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-OEEGYENV.js → chunk-UK7C2JXW.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-YQFGVZGR.js → chunk-VAPGUPHO.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-XCNHV3HS.js → chunk-VTM6EECM.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-NR2OGDHQ.js → chunk-X6CGV36L.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-AVDUNQUW.js → chunk-YEZM4CK4.js} +3 -3
- package/dist/wallets/walletConnectors/{chunk-KCRO2AGO.js → chunk-ZNX4EMPB.js} +3 -3
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
darkTheme
|
|
4
|
-
} from "./chunk-36KVHK22.js";
|
|
5
2
|
import {
|
|
6
3
|
lightTheme
|
|
7
4
|
} from "./chunk-67BKQQNG.js";
|
|
5
|
+
import {
|
|
6
|
+
darkTheme
|
|
7
|
+
} from "./chunk-36KVHK22.js";
|
|
8
8
|
import {
|
|
9
9
|
systemFontStack
|
|
10
10
|
} from "./chunk-4YEAUICE.js";
|
|
@@ -968,7 +968,7 @@ function useMainnetEnsName(address) {
|
|
|
968
968
|
import {
|
|
969
969
|
getAllWalletTokens
|
|
970
970
|
} from "@funkit/api-base";
|
|
971
|
-
import { keepPreviousData as keepPreviousData4, useQuery as
|
|
971
|
+
import { keepPreviousData as keepPreviousData4, useQuery as useQuery29 } from "@tanstack/react-query";
|
|
972
972
|
import { arbitrum as arbitrum7, polygon as polygon8 } from "viem/chains";
|
|
973
973
|
|
|
974
974
|
// src/domains/asset.ts
|
|
@@ -978,7 +978,7 @@ import {
|
|
|
978
978
|
monadChain as monadChain2,
|
|
979
979
|
solanaChain as solanaChain6
|
|
980
980
|
} from "@funkit/chains";
|
|
981
|
-
import {
|
|
981
|
+
import { isEVMAddressEquivalent as isEVMAddressEquivalent7, isTokenEquivalent as isTokenEquivalent15 } from "@funkit/utils";
|
|
982
982
|
import { arbitrum as arbitrum6, base as base6, bsc as bsc2, mainnet as mainnet13, optimism as optimism2, polygon as polygon7 } from "viem/chains";
|
|
983
983
|
|
|
984
984
|
// src/utils/checkout.ts
|
|
@@ -990,16 +990,15 @@ import {
|
|
|
990
990
|
import {
|
|
991
991
|
FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS as FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS5,
|
|
992
992
|
FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO12,
|
|
993
|
-
lightningChain as
|
|
993
|
+
lightningChain as lightningChain7,
|
|
994
994
|
solanaChain as solanaChain5,
|
|
995
995
|
tronChain as tronChain4
|
|
996
996
|
} from "@funkit/chains";
|
|
997
997
|
import { getRelayAssetInfo } from "@funkit/fun-relay";
|
|
998
998
|
import {
|
|
999
|
-
formatCryptoAndStringify as
|
|
999
|
+
formatCryptoAndStringify as formatCryptoAndStringify9,
|
|
1000
1000
|
isNumericString,
|
|
1001
|
-
|
|
1002
|
-
isTokenEquivalent as isTokenEquivalent14,
|
|
1001
|
+
isEVMAddressEquivalent as isEVMAddressEquivalent6,
|
|
1003
1002
|
round as round3
|
|
1004
1003
|
} from "@funkit/utils";
|
|
1005
1004
|
import * as dnum12 from "dnum";
|
|
@@ -1127,10 +1126,10 @@ import {
|
|
|
1127
1126
|
FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO11,
|
|
1128
1127
|
SOLANA_MAINNET_CHAIN_ID as SOLANA_MAINNET_CHAIN_ID2
|
|
1129
1128
|
} from "@funkit/chains";
|
|
1130
|
-
import { isNotNullish as isNotNullish8,
|
|
1129
|
+
import { isNotNullish as isNotNullish8, isEVMAddressEquivalent as isEVMAddressEquivalent5 } from "@funkit/utils";
|
|
1131
1130
|
import React300, {
|
|
1132
1131
|
createContext as createContext21,
|
|
1133
|
-
useCallback as
|
|
1132
|
+
useCallback as useCallback59,
|
|
1134
1133
|
useContext as useContext21,
|
|
1135
1134
|
useEffect as useEffect83,
|
|
1136
1135
|
useState as useState87
|
|
@@ -1520,7 +1519,7 @@ function createPaymentMethodInfo(params) {
|
|
|
1520
1519
|
case PaymentMethod.BITCOIN_LIGHTNING:
|
|
1521
1520
|
return {
|
|
1522
1521
|
paymentMethod: PaymentMethod.BITCOIN_LIGHTNING,
|
|
1523
|
-
title: "Bitcoin
|
|
1522
|
+
title: "Bitcoin Lightning",
|
|
1524
1523
|
description: ""
|
|
1525
1524
|
};
|
|
1526
1525
|
case PaymentMethod.VIRTUAL_BANK:
|
|
@@ -1557,7 +1556,6 @@ function createNewCheckoutConfig({
|
|
|
1557
1556
|
// field is re-bound below.
|
|
1558
1557
|
...serializedConfig,
|
|
1559
1558
|
dynamicTargetAssetCandidates: isActiveCheckout && liveConfig ? liveConfig.dynamicTargetAssetCandidates : serializedConfig.dynamicTargetAssetCandidates,
|
|
1560
|
-
finalizedToken: isActiveCheckout && liveConfig ? liveConfig.finalizedToken : serializedConfig.finalizedToken,
|
|
1561
1559
|
modalTitle: liveConfig?.modalTitle ?? serializedConfig.modalTitle,
|
|
1562
1560
|
withdrawalSourceTokenBalance: liveConfig?.withdrawalSourceTokenBalance,
|
|
1563
1561
|
getMinDepositUSD: isActiveCheckout ? liveConfig?.getMinDepositUSD : void 0,
|
|
@@ -1683,7 +1681,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
1683
1681
|
localStorage.setItem(storageKey, version);
|
|
1684
1682
|
}
|
|
1685
1683
|
function getCurrentSdkVersion() {
|
|
1686
|
-
return "9.
|
|
1684
|
+
return "9.28.0";
|
|
1687
1685
|
}
|
|
1688
1686
|
function useFingerprint() {
|
|
1689
1687
|
const fingerprint = useCallback3(() => {
|
|
@@ -1865,7 +1863,7 @@ var DEFAULT_TEXT_CUSTOMIZATIONS = {
|
|
|
1865
1863
|
sourceMethodTitle: "Your source",
|
|
1866
1864
|
tokensListTitle: "Your tokens",
|
|
1867
1865
|
transferTokens: "Transfer Crypto",
|
|
1868
|
-
bitcoinLightning: "Bitcoin
|
|
1866
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
1869
1867
|
receiveDropdownTitle: "",
|
|
1870
1868
|
// Default to empty
|
|
1871
1869
|
receiveDropdownLabel: "Asset to Receive",
|
|
@@ -3968,51 +3966,10 @@ function useGetAssetHoldingsFromRpc({
|
|
|
3968
3966
|
});
|
|
3969
3967
|
}
|
|
3970
3968
|
|
|
3971
|
-
// src/hooks/useXstocksWrappedTokenAddress.ts
|
|
3972
|
-
import { getXstocksAsset, xstocksNetworkFromChainId } from "@funkit/api-base";
|
|
3973
|
-
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
3974
|
-
function useXstocksWrappedTokenAddress({ enabled = true } = {}) {
|
|
3975
|
-
const { checkoutItem } = useCheckoutContext();
|
|
3976
|
-
const { apiKey } = useFunkitConfig();
|
|
3977
|
-
const config = checkoutItem?.initSettings.config;
|
|
3978
|
-
const targetChain = config?.targetChain;
|
|
3979
|
-
const ticker = config?.targetAssetTicker;
|
|
3980
|
-
const isXstockTarget = isXStockTargetAsset(
|
|
3981
|
-
getActiveDynamicTargetAsset(config)
|
|
3982
|
-
);
|
|
3983
|
-
const network = targetChain ? xstocksNetworkFromChainId(targetChain) : void 0;
|
|
3984
|
-
const isEnabled = enabled && isXstockTarget && !!targetChain && !!ticker && !!network;
|
|
3985
|
-
const { data, isLoading } = useQuery7({
|
|
3986
|
-
queryKey: ["nadoTargetWrappedTokenAddress", targetChain, ticker],
|
|
3987
|
-
enabled: isEnabled,
|
|
3988
|
-
// Wrapped token address is effectively immutable; cache aggressively.
|
|
3989
|
-
staleTime: 5 * 60 * 1e3,
|
|
3990
|
-
retry: false,
|
|
3991
|
-
queryFn: async () => {
|
|
3992
|
-
if (!ticker || !network) {
|
|
3993
|
-
return null;
|
|
3994
|
-
}
|
|
3995
|
-
const symbol = parseXstocksSymbolFromTicker(ticker);
|
|
3996
|
-
const asset = await getXstocksAsset({ symbol, network, logger, apiKey });
|
|
3997
|
-
const deployment = asset.deployments?.find(
|
|
3998
|
-
(d) => d.network?.toLowerCase() === network.toLowerCase()
|
|
3999
|
-
);
|
|
4000
|
-
const wrappedTokenAddress = deployment?.wrapperAddressV2;
|
|
4001
|
-
logger.info("nadoTargetWrappedToken:resolved", {
|
|
4002
|
-
ticker,
|
|
4003
|
-
targetChain,
|
|
4004
|
-
network,
|
|
4005
|
-
hasWrappedToken: !!wrappedTokenAddress
|
|
4006
|
-
});
|
|
4007
|
-
return wrappedTokenAddress ? wrappedTokenAddress : null;
|
|
4008
|
-
}
|
|
4009
|
-
});
|
|
4010
|
-
return { data: data ?? void 0, isLoading };
|
|
4011
|
-
}
|
|
4012
|
-
|
|
4013
3969
|
// src/hooks/useXstockAssetHoldings.ts
|
|
4014
3970
|
function useXstockAssetHoldings({
|
|
4015
3971
|
targetChainId,
|
|
3972
|
+
wrappedTokenAddress,
|
|
4016
3973
|
enabled = true
|
|
4017
3974
|
}) {
|
|
4018
3975
|
const { checkoutItem } = useCheckoutContext();
|
|
@@ -4023,7 +3980,6 @@ function useXstockAssetHoldings({
|
|
|
4023
3980
|
const ticker = parseXstocksSymbolFromTicker(config?.targetAssetTicker ?? "");
|
|
4024
3981
|
const dynamicTargetAsset = getActiveDynamicTargetAsset(config);
|
|
4025
3982
|
const isEnabled = enabled && !!walletAddress && !!targetAsset && !!targetChain && targetChain === targetChainId && !!isXStockTargetAsset(dynamicTargetAsset);
|
|
4026
|
-
const { data: wrappedTokenAddress, isLoading: isWrappedTokenAddressLoading } = useXstocksWrappedTokenAddress({ enabled: isEnabled });
|
|
4027
3983
|
const targetTokenQuery = useGetAssetHoldingsFromRpc({
|
|
4028
3984
|
chainId: targetChain,
|
|
4029
3985
|
tokenAddress: targetAsset,
|
|
@@ -4049,7 +4005,7 @@ function useXstockAssetHoldings({
|
|
|
4049
4005
|
);
|
|
4050
4006
|
return {
|
|
4051
4007
|
data,
|
|
4052
|
-
isLoading: targetTokenQuery.isLoading || wrappedTokenQuery.isLoading
|
|
4008
|
+
isLoading: targetTokenQuery.isLoading || wrappedTokenQuery.isLoading
|
|
4053
4009
|
};
|
|
4054
4010
|
}
|
|
4055
4011
|
|
|
@@ -4057,11 +4013,13 @@ function useXstockAssetHoldings({
|
|
|
4057
4013
|
var EMPTY_HOLDINGS = {};
|
|
4058
4014
|
function useInjectedAssetHoldings({
|
|
4059
4015
|
targetChainId,
|
|
4060
|
-
existingHoldings
|
|
4016
|
+
existingHoldings,
|
|
4017
|
+
xstockWrappedTokenAddress
|
|
4061
4018
|
}) {
|
|
4062
4019
|
const isEnabled = useFeatureGate("enable-rpc-xstock-assets");
|
|
4063
4020
|
const { data: injectableHoldings, isLoading } = useXstockAssetHoldings({
|
|
4064
4021
|
targetChainId,
|
|
4022
|
+
wrappedTokenAddress: xstockWrappedTokenAddress,
|
|
4065
4023
|
enabled: isEnabled
|
|
4066
4024
|
});
|
|
4067
4025
|
const holdings = useMemo13(() => {
|
|
@@ -4084,7 +4042,49 @@ function useInjectedAssetHoldings({
|
|
|
4084
4042
|
}
|
|
4085
4043
|
return injected2;
|
|
4086
4044
|
}, [isEnabled, injectableHoldings, existingHoldings]);
|
|
4087
|
-
return { holdings, isLoading
|
|
4045
|
+
return { holdings, isLoading };
|
|
4046
|
+
}
|
|
4047
|
+
|
|
4048
|
+
// src/hooks/useXstocksWrappedTokenAddress.ts
|
|
4049
|
+
import { getXstocksAsset, xstocksNetworkFromChainId } from "@funkit/api-base";
|
|
4050
|
+
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
4051
|
+
function useXstocksWrappedTokenAddress({ enabled = true } = {}) {
|
|
4052
|
+
const { checkoutItem } = useCheckoutContext();
|
|
4053
|
+
const { apiKey } = useFunkitConfig();
|
|
4054
|
+
const config = checkoutItem?.initSettings.config;
|
|
4055
|
+
const targetChain = config?.targetChain;
|
|
4056
|
+
const ticker = config?.targetAssetTicker;
|
|
4057
|
+
const isXstockTarget = isXStockTargetAsset(
|
|
4058
|
+
getActiveDynamicTargetAsset(config)
|
|
4059
|
+
);
|
|
4060
|
+
const network = targetChain ? xstocksNetworkFromChainId(targetChain) : void 0;
|
|
4061
|
+
const isEnabled = enabled && isXstockTarget && !!targetChain && !!ticker && !!network;
|
|
4062
|
+
const { data, isLoading } = useQuery7({
|
|
4063
|
+
queryKey: ["nadoTargetWrappedTokenAddress", targetChain, ticker],
|
|
4064
|
+
enabled: isEnabled,
|
|
4065
|
+
// Wrapped token address is effectively immutable
|
|
4066
|
+
staleTime: 60 * 60 * 1e3,
|
|
4067
|
+
retry: false,
|
|
4068
|
+
queryFn: async () => {
|
|
4069
|
+
if (!ticker || !network) {
|
|
4070
|
+
return null;
|
|
4071
|
+
}
|
|
4072
|
+
const symbol = parseXstocksSymbolFromTicker(ticker);
|
|
4073
|
+
const asset = await getXstocksAsset({ symbol, network, logger, apiKey });
|
|
4074
|
+
const deployment = asset.deployments?.find(
|
|
4075
|
+
(d) => d.network?.toLowerCase() === network.toLowerCase()
|
|
4076
|
+
);
|
|
4077
|
+
const wrappedTokenAddress = deployment?.wrapperAddressV2;
|
|
4078
|
+
logger.info("nadoTargetWrappedToken:resolved", {
|
|
4079
|
+
ticker,
|
|
4080
|
+
targetChain,
|
|
4081
|
+
network,
|
|
4082
|
+
hasWrappedToken: !!wrappedTokenAddress
|
|
4083
|
+
});
|
|
4084
|
+
return wrappedTokenAddress ? wrappedTokenAddress : null;
|
|
4085
|
+
}
|
|
4086
|
+
});
|
|
4087
|
+
return { data: data ?? void 0, isLoading };
|
|
4088
4088
|
}
|
|
4089
4089
|
|
|
4090
4090
|
// src/hooks/useWalletAssetHoldings.ts
|
|
@@ -4160,9 +4160,14 @@ function useWalletAssetHoldings(targetChain) {
|
|
|
4160
4160
|
() => processWalletAssets(walletAssets, targetChain, isStablecoin),
|
|
4161
4161
|
[targetChain, walletAssets, isStablecoin]
|
|
4162
4162
|
);
|
|
4163
|
-
const {
|
|
4163
|
+
const {
|
|
4164
|
+
data: xstockWrappedTokenAddress,
|
|
4165
|
+
isLoading: isLoadingXstockWrappedTokenAddress
|
|
4166
|
+
} = useXstocksWrappedTokenAddress();
|
|
4167
|
+
const { holdings: injectedHoldings, isLoading: isLoadingInjectedAssets } = useInjectedAssetHoldings({
|
|
4164
4168
|
targetChainId: targetChain,
|
|
4165
|
-
existingHoldings: processedAssets
|
|
4169
|
+
existingHoldings: processedAssets,
|
|
4170
|
+
xstockWrappedTokenAddress
|
|
4166
4171
|
});
|
|
4167
4172
|
const holdings = useMemo14(() => {
|
|
4168
4173
|
const hasInjected = Object.keys(injectedHoldings).length > 0;
|
|
@@ -4213,7 +4218,7 @@ function useWalletAssetHoldings(targetChain) {
|
|
|
4213
4218
|
]);
|
|
4214
4219
|
return {
|
|
4215
4220
|
data: holdings,
|
|
4216
|
-
isLoading: isLoading || isAllowedAssetsLoading ||
|
|
4221
|
+
isLoading: isLoading || isAllowedAssetsLoading || isLoadingInjectedAssets || isLoadingXstockWrappedTokenAddress,
|
|
4217
4222
|
totalBalance: totalWalletAssetsUsd,
|
|
4218
4223
|
hasUsableBalance,
|
|
4219
4224
|
minValueThreshold
|
|
@@ -5176,6 +5181,7 @@ import {
|
|
|
5176
5181
|
} from "@funkit/connect-core";
|
|
5177
5182
|
|
|
5178
5183
|
// src/utils/withdrawal.ts
|
|
5184
|
+
import { isEVMAddressEquivalent, isTokenEquivalent as isTokenEquivalent3 } from "@funkit/utils";
|
|
5179
5185
|
import { parseUnits } from "viem";
|
|
5180
5186
|
function safeEvaluateWithdrawalSourceTokenBalance(fn) {
|
|
5181
5187
|
const raw = fn?.();
|
|
@@ -5192,6 +5198,25 @@ function safeEvaluateWithdrawalSourceTokenBalance(fn) {
|
|
|
5192
5198
|
function isWalletWithdrawalConfig(config) {
|
|
5193
5199
|
return "wallet" in config;
|
|
5194
5200
|
}
|
|
5201
|
+
function isNoOpSelfWithdrawal({
|
|
5202
|
+
config,
|
|
5203
|
+
recipientAddress,
|
|
5204
|
+
selectedChainId,
|
|
5205
|
+
destinationTokenAddress
|
|
5206
|
+
}) {
|
|
5207
|
+
if (!isWalletWithdrawalConfig(config) || recipientAddress === "" || !destinationTokenAddress) {
|
|
5208
|
+
return false;
|
|
5209
|
+
}
|
|
5210
|
+
return isEVMAddressEquivalent({
|
|
5211
|
+
firstAddress: recipientAddress,
|
|
5212
|
+
secondAddress: config.wallet.address()
|
|
5213
|
+
}) && isTokenEquivalent3({
|
|
5214
|
+
firstTokenChainId: String(selectedChainId),
|
|
5215
|
+
firstTokenAddress: destinationTokenAddress,
|
|
5216
|
+
secondTokenChainId: config.sourceChainId,
|
|
5217
|
+
secondTokenAddress: config.sourceTokenAddress
|
|
5218
|
+
});
|
|
5219
|
+
}
|
|
5195
5220
|
function isCustomWithdrawalConfig(config) {
|
|
5196
5221
|
return "withdrawCallback" in config;
|
|
5197
5222
|
}
|
|
@@ -6182,7 +6207,7 @@ var useFunkitPostCheckoutInternal = (checkoutId) => {
|
|
|
6182
6207
|
// src/providers/ModalContext.tsx
|
|
6183
6208
|
import React299, {
|
|
6184
6209
|
createContext as createContext20,
|
|
6185
|
-
useCallback as
|
|
6210
|
+
useCallback as useCallback58,
|
|
6186
6211
|
useContext as useContext20,
|
|
6187
6212
|
useEffect as useEffect82,
|
|
6188
6213
|
useMemo as useMemo66,
|
|
@@ -10640,7 +10665,9 @@ var en_default = {
|
|
|
10640
10665
|
groupPopularTokens: "Popular",
|
|
10641
10666
|
groupStablecoins: "Stablecoins",
|
|
10642
10667
|
groupOtherChains: "All",
|
|
10643
|
-
groupOtherTokens: "All supported tokens"
|
|
10668
|
+
groupOtherTokens: "All supported tokens",
|
|
10669
|
+
depositBitcoinLightning: "Deposit Bitcoin instantly with Lightning.",
|
|
10670
|
+
lightningTryItNow: "Try it now"
|
|
10644
10671
|
},
|
|
10645
10672
|
lightningInvoice: {
|
|
10646
10673
|
yourLightningInvoice: "Lightning Invoice"
|
|
@@ -10664,7 +10691,6 @@ var en_default = {
|
|
|
10664
10691
|
depositProcessing: "Deposit processing",
|
|
10665
10692
|
depositWillBeCompletedSoon: "Your deposit will be completed soon.",
|
|
10666
10693
|
depositWillBeCredited: "Your deposit will be credited to your account shortly.",
|
|
10667
|
-
depositWillBeCreditedLighterNative: "Your deposit will be credited to your account in approximately two minutes.",
|
|
10668
10694
|
depositHasBeenCredited: "Your deposit has been credited to your account.",
|
|
10669
10695
|
depositRefundedOrReprocessed: "Your deposit has been refunded or reprocessed. Feel free to <ContactSupportLink>reach out</ContactSupportLink> for an update.",
|
|
10670
10696
|
issueOccurredWithDeposit: "An issue occurred processing your deposit. Please try again.",
|
|
@@ -10763,6 +10789,7 @@ var en_default = {
|
|
|
10763
10789
|
unsupportedExecutionType: "Transaction type not supported. Try different method.",
|
|
10764
10790
|
unsupportedRoute: "Token pair unavailable. Try different tokens.",
|
|
10765
10791
|
userRecipientMismatch: "Sender and recipient must match. Check addresses.",
|
|
10792
|
+
recipientSameAsSource: "Recipient can't be the same as the source address.",
|
|
10766
10793
|
destinationTxFailed: "Transaction failed. Please try again or <ContactSupportLink>contact us</ContactSupportLink>.",
|
|
10767
10794
|
erc20RouterAddressNotFound: "Something went wrong. Please try a different token or <ContactSupportLink>contact us</ContactSupportLink>.",
|
|
10768
10795
|
unknownError: "Something went wrong. Please try again or <ContactSupportLink>contact us</ContactSupportLink>.",
|
|
@@ -10997,7 +11024,7 @@ var en_default = {
|
|
|
10997
11024
|
sourceMethodTitle: "Your source",
|
|
10998
11025
|
tokensListTitle: "Your tokens",
|
|
10999
11026
|
transferTokens: "Transfer Crypto",
|
|
11000
|
-
bitcoinLightning: "Bitcoin
|
|
11027
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
11001
11028
|
receiveDropdownTitle: "",
|
|
11002
11029
|
receiveDropdownLabel: "Asset to Receive",
|
|
11003
11030
|
payAmountLabel: "You send",
|
|
@@ -11242,7 +11269,9 @@ var es_default = {
|
|
|
11242
11269
|
groupPopularTokens: "Populares",
|
|
11243
11270
|
groupStablecoins: "Stablecoins",
|
|
11244
11271
|
groupOtherChains: "Todas",
|
|
11245
|
-
groupOtherTokens: "Todos los tokens compatibles"
|
|
11272
|
+
groupOtherTokens: "Todos los tokens compatibles",
|
|
11273
|
+
depositBitcoinLightning: "Deposita Bitcoin al instante con Lightning.",
|
|
11274
|
+
lightningTryItNow: "Pru\xE9balo ahora"
|
|
11246
11275
|
},
|
|
11247
11276
|
lightningInvoice: {
|
|
11248
11277
|
yourLightningInvoice: "Factura Lightning"
|
|
@@ -11266,7 +11295,6 @@ var es_default = {
|
|
|
11266
11295
|
depositProcessing: "Dep\xF3sito en proceso",
|
|
11267
11296
|
depositWillBeCompletedSoon: "Tu dep\xF3sito se completar\xE1 pronto.",
|
|
11268
11297
|
depositWillBeCredited: "Tu dep\xF3sito ser\xE1 acreditado a tu cuenta pronto.",
|
|
11269
|
-
depositWillBeCreditedLighterNative: "Tu dep\xF3sito ser\xE1 acreditado a tu cuenta en aproximadamente dos minutos.",
|
|
11270
11298
|
depositHasBeenCredited: "Tu dep\xF3sito ha sido acreditado a tu cuenta.",
|
|
11271
11299
|
depositRefundedOrReprocessed: "Tu dep\xF3sito ha sido reembolsado o reprocesado. No dudes en <ContactSupportLink>contactarnos</ContactSupportLink> para una actualizaci\xF3n.",
|
|
11272
11300
|
issueOccurredWithDeposit: "Ocurri\xF3 un problema al procesar tu dep\xF3sito. Por favor intenta nuevamente.",
|
|
@@ -11365,6 +11393,7 @@ var es_default = {
|
|
|
11365
11393
|
unsupportedExecutionType: "Tipo de transacci\xF3n no soportado. Prueba un m\xE9todo diferente.",
|
|
11366
11394
|
unsupportedRoute: "Par de tokens no disponible. Prueba tokens diferentes.",
|
|
11367
11395
|
userRecipientMismatch: "El remitente y el destinatario deben coincidir. Verifica las direcciones.",
|
|
11396
|
+
recipientSameAsSource: "La direcci\xF3n del destinatario no puede ser la misma que la de origen.",
|
|
11368
11397
|
destinationTxFailed: "Transacci\xF3n fallida. Por favor, intenta nuevamente o <ContactSupportLink>cont\xE1ctanos</ContactSupportLink>.",
|
|
11369
11398
|
erc20RouterAddressNotFound: "Algo sali\xF3 mal. Por favor, prueba un token diferente o <ContactSupportLink>cont\xE1ctanos</ContactSupportLink>.",
|
|
11370
11399
|
unknownError: "Algo sali\xF3 mal. Por favor, intenta nuevamente o <ContactSupportLink>cont\xE1ctanos</ContactSupportLink>.",
|
|
@@ -11596,7 +11625,7 @@ var es_default = {
|
|
|
11596
11625
|
sourceMethodTitle: "Tu origen",
|
|
11597
11626
|
tokensListTitle: "Tus tokens",
|
|
11598
11627
|
transferTokens: "Transferir Cripto",
|
|
11599
|
-
bitcoinLightning: "Bitcoin
|
|
11628
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
11600
11629
|
receiveDropdownTitle: "",
|
|
11601
11630
|
receiveDropdownLabel: "Activo a Recibir",
|
|
11602
11631
|
payAmountLabel: "Env\xEDas",
|
|
@@ -11841,7 +11870,9 @@ var fr_default = {
|
|
|
11841
11870
|
groupPopularTokens: "Populaires",
|
|
11842
11871
|
groupStablecoins: "Stablecoins",
|
|
11843
11872
|
groupOtherChains: "Toutes",
|
|
11844
|
-
groupOtherTokens: "Tous les jetons pris en charge"
|
|
11873
|
+
groupOtherTokens: "Tous les jetons pris en charge",
|
|
11874
|
+
depositBitcoinLightning: "D\xE9posez des Bitcoin instantan\xE9ment avec Lightning.",
|
|
11875
|
+
lightningTryItNow: "Essayer maintenant"
|
|
11845
11876
|
},
|
|
11846
11877
|
lightningInvoice: {
|
|
11847
11878
|
yourLightningInvoice: "Facture Lightning"
|
|
@@ -11865,7 +11896,6 @@ var fr_default = {
|
|
|
11865
11896
|
depositProcessing: "D\xE9p\xF4t en cours de traitement",
|
|
11866
11897
|
depositWillBeCompletedSoon: "Votre d\xE9p\xF4t sera bient\xF4t termin\xE9.",
|
|
11867
11898
|
depositWillBeCredited: "Votre d\xE9p\xF4t sera cr\xE9dit\xE9 sur votre compte sous peu.",
|
|
11868
|
-
depositWillBeCreditedLighterNative: "Votre d\xE9p\xF4t sera cr\xE9dit\xE9 sur votre compte dans environ deux minutes.",
|
|
11869
11899
|
depositHasBeenCredited: "Votre d\xE9p\xF4t a \xE9t\xE9 cr\xE9dit\xE9 sur votre compte.",
|
|
11870
11900
|
depositRefundedOrReprocessed: "Votre d\xE9p\xF4t a \xE9t\xE9 rembours\xE9 ou trait\xE9 \xE0 nouveau. N'h\xE9sitez pas \xE0 <ContactSupportLink>nous contacter</ContactSupportLink> pour une mise \xE0 jour.",
|
|
11871
11901
|
issueOccurredWithDeposit: "Un probl\xE8me est survenu lors du traitement de votre d\xE9p\xF4t. Veuillez r\xE9essayer.",
|
|
@@ -11964,6 +11994,7 @@ var fr_default = {
|
|
|
11964
11994
|
unsupportedExecutionType: "M\xE9thode de transaction non prise en charge. S\xE9lectionnez une autre m\xE9thode.",
|
|
11965
11995
|
unsupportedRoute: "Paire d'actifs non prises en charge. Essayez des actifs diff\xE9rents.",
|
|
11966
11996
|
userRecipientMismatch: "L'exp\xE9diteur et le destinataire doivent correspondre. V\xE9rifiez les adresses.",
|
|
11997
|
+
recipientSameAsSource: "L'adresse du destinataire ne peut pas \xEAtre identique \xE0 celle de la source.",
|
|
11967
11998
|
destinationTxFailed: "Transaction \xE9chou\xE9e. Veuillez r\xE9essayer ou <ContactSupportLink>contactez-nous</ContactSupportLink>.",
|
|
11968
11999
|
erc20RouterAddressNotFound: "Une erreur s'est produite. Veuillez essayer une devise diff\xE9rente ou <ContactSupportLink>contactez-nous</ContactSupportLink>.",
|
|
11969
12000
|
unknownError: "Une erreur s'est produite. Veuillez r\xE9essayer ou <ContactSupportLink>contactez-nous</ContactSupportLink>.",
|
|
@@ -12195,7 +12226,7 @@ var fr_default = {
|
|
|
12195
12226
|
sourceMethodTitle: "Votre source",
|
|
12196
12227
|
tokensListTitle: "Vos actifs",
|
|
12197
12228
|
transferTokens: "Transf\xE9rer des cryptos",
|
|
12198
|
-
bitcoinLightning: "Bitcoin
|
|
12229
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
12199
12230
|
receiveDropdownTitle: "",
|
|
12200
12231
|
receiveDropdownLabel: "Actif \xE0 recevoir",
|
|
12201
12232
|
payAmountLabel: "Vous envoyez",
|
|
@@ -12440,7 +12471,9 @@ var ja_default = {
|
|
|
12440
12471
|
groupPopularTokens: "\u4EBA\u6C17",
|
|
12441
12472
|
groupStablecoins: "\u30B9\u30C6\u30FC\u30D6\u30EB\u30B3\u30A4\u30F3",
|
|
12442
12473
|
groupOtherChains: "\u3059\u3079\u3066",
|
|
12443
|
-
groupOtherTokens: "\u3059\u3079\u3066\u306E\u5BFE\u5FDC\u30C8\u30FC\u30AF\u30F3"
|
|
12474
|
+
groupOtherTokens: "\u3059\u3079\u3066\u306E\u5BFE\u5FDC\u30C8\u30FC\u30AF\u30F3",
|
|
12475
|
+
depositBitcoinLightning: "Lightning\u3067\u30D3\u30C3\u30C8\u30B3\u30A4\u30F3\u3092\u5373\u6642\u5165\u91D1\u3002",
|
|
12476
|
+
lightningTryItNow: "\u4ECA\u3059\u3050\u8A66\u3059"
|
|
12444
12477
|
},
|
|
12445
12478
|
lightningInvoice: {
|
|
12446
12479
|
yourLightningInvoice: "\u30E9\u30A4\u30C8\u30CB\u30F3\u30B0\u8ACB\u6C42\u66F8"
|
|
@@ -12464,7 +12497,6 @@ var ja_default = {
|
|
|
12464
12497
|
depositProcessing: "\u5165\u91D1\u51E6\u7406\u4E2D",
|
|
12465
12498
|
depositWillBeCompletedSoon: "\u5165\u91D1\u306F\u307E\u3082\u306A\u304F\u5B8C\u4E86\u3057\u307E\u3059\u3002",
|
|
12466
12499
|
depositWillBeCredited: "\u307E\u3082\u306A\u304F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5165\u91D1\u3055\u308C\u307E\u3059\u3002",
|
|
12467
|
-
depositWillBeCreditedLighterNative: "\u304A\u5BA2\u69D8\u306E\u5165\u91D1\u306F\u7D042\u5206\u3067\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5165\u91D1\u3055\u308C\u307E\u3059\u3002",
|
|
12468
12500
|
depositHasBeenCredited: "\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5165\u91D1\u3055\u308C\u307E\u3057\u305F\u3002",
|
|
12469
12501
|
depositRefundedOrReprocessed: "\u5165\u91D1\u306F\u8FD4\u91D1\u307E\u305F\u306F\u518D\u51E6\u7406\u3055\u308C\u307E\u3057\u305F\u3002\u6700\u65B0\u60C5\u5831\u306B\u3064\u3044\u3066\u306F<ContactSupportLink>\u304A\u554F\u3044\u5408\u308F\u305B</ContactSupportLink>\u304F\u3060\u3055\u3044\u3002",
|
|
12470
12502
|
issueOccurredWithDeposit: "\u5165\u91D1\u306E\u51E6\u7406\u4E2D\u306B\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
@@ -12563,6 +12595,7 @@ var ja_default = {
|
|
|
12563
12595
|
unsupportedExecutionType: "\u53D6\u5F15\u30BF\u30A4\u30D7\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002\u5225\u306E\u65B9\u6CD5\u3092\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
12564
12596
|
unsupportedRoute: "\u30C8\u30FC\u30AF\u30F3\u30DA\u30A2\u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002\u5225\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u304A\u8A66\u3057\u304F\u3060\u3055\u3044\u3002",
|
|
12565
12597
|
userRecipientMismatch: "\u9001\u4FE1\u8005\u3068\u53D7\u4FE1\u8005\u304C\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\u30A2\u30C9\u30EC\u30B9\u3092\u78BA\u8A8D\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
|
|
12598
|
+
recipientSameAsSource: "\u53D7\u4FE1\u30A2\u30C9\u30EC\u30B9\u306F\u9001\u91D1\u5143\u30A2\u30C9\u30EC\u30B9\u3068\u540C\u3058\u306B\u3067\u304D\u307E\u305B\u3093\u3002",
|
|
12566
12599
|
destinationTxFailed: "\u53D6\u5F15\u304C\u5931\u6557\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u3044\u305F\u3060\u304F\u304B\u3001<ContactSupportLink>\u304A\u554F\u3044\u5408\u308F\u305B</ContactSupportLink>\u304F\u3060\u3055\u3044\u3002",
|
|
12567
12600
|
erc20RouterAddressNotFound: "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u5225\u306E\u30C8\u30FC\u30AF\u30F3\u3092\u304A\u8A66\u3057\u3044\u305F\u3060\u304F\u304B\u3001<ContactSupportLink>\u304A\u554F\u3044\u5408\u308F\u305B</ContactSupportLink>\u304F\u3060\u3055\u3044\u3002",
|
|
12568
12601
|
unknownError: "\u554F\u984C\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\u3082\u3046\u4E00\u5EA6\u304A\u8A66\u3057\u3044\u305F\u3060\u304F\u304B\u3001<ContactSupportLink>\u304A\u554F\u3044\u5408\u308F\u305B</ContactSupportLink>\u304F\u3060\u3055\u3044\u3002",
|
|
@@ -12794,7 +12827,7 @@ var ja_default = {
|
|
|
12794
12827
|
sourceMethodTitle: "\u9001\u4FE1\u5143",
|
|
12795
12828
|
tokensListTitle: "\u3042\u306A\u305F\u306E\u30C8\u30FC\u30AF\u30F3",
|
|
12796
12829
|
transferTokens: "\u6697\u53F7\u8CC7\u7523\u3092\u9001\u91D1",
|
|
12797
|
-
bitcoinLightning: "
|
|
12830
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
12798
12831
|
receiveDropdownTitle: "",
|
|
12799
12832
|
receiveDropdownLabel: "\u53D7\u53D6\u8CC7\u7523",
|
|
12800
12833
|
payAmountLabel: "\u9001\u4FE1\u91D1\u984D",
|
|
@@ -13039,7 +13072,9 @@ var ko_default = {
|
|
|
13039
13072
|
groupPopularTokens: "\uC778\uAE30",
|
|
13040
13073
|
groupStablecoins: "\uC2A4\uD14C\uC774\uBE14\uCF54\uC778",
|
|
13041
13074
|
groupOtherChains: "\uC804\uCCB4",
|
|
13042
|
-
groupOtherTokens: "\uC9C0\uC6D0\uB418\uB294 \uBAA8\uB4E0 \uD1A0\uD070"
|
|
13075
|
+
groupOtherTokens: "\uC9C0\uC6D0\uB418\uB294 \uBAA8\uB4E0 \uD1A0\uD070",
|
|
13076
|
+
depositBitcoinLightning: "Lightning\uC73C\uB85C \uBE44\uD2B8\uCF54\uC778 \uC989\uC2DC \uC785\uAE08.",
|
|
13077
|
+
lightningTryItNow: "\uC9C0\uAE08 \uC0AC\uC6A9\uD574 \uBCF4\uAE30"
|
|
13043
13078
|
},
|
|
13044
13079
|
lightningInvoice: {
|
|
13045
13080
|
yourLightningInvoice: "\uB77C\uC774\uD2B8\uB2DD \uC778\uBCF4\uC774\uC2A4"
|
|
@@ -13063,7 +13098,6 @@ var ko_default = {
|
|
|
13063
13098
|
depositProcessing: "\uC785\uAE08 \uCC98\uB9AC \uC911",
|
|
13064
13099
|
depositWillBeCompletedSoon: "\uC785\uAE08\uC774 \uACE7 \uC644\uB8CC\uB429\uB2C8\uB2E4.",
|
|
13065
13100
|
depositWillBeCredited: "\uC785\uAE08\uC774 \uACE7 \uACC4\uC815\uC5D0 \uC785\uAE08\uB429\uB2C8\uB2E4.",
|
|
13066
|
-
depositWillBeCreditedLighterNative: "\uC785\uAE08\uC774 \uC57D 2\uBD84 \uB0B4\uC5D0 \uACC4\uC815\uC5D0 \uC785\uAE08\uB429\uB2C8\uB2E4.",
|
|
13067
13101
|
depositHasBeenCredited: "\uC785\uAE08\uC774 \uACC4\uC815\uC5D0 \uC785\uAE08\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
13068
13102
|
depositRefundedOrReprocessed: "\uC785\uAE08\uC774 \uD658\uBD88\uB418\uC5C8\uAC70\uB098 \uC7AC\uCC98\uB9AC\uB418\uC5C8\uC2B5\uB2C8\uB2E4. \uAD81\uAE08\uD55C \uC810\uC774 \uC788\uC73C\uBA74 <ContactSupportLink>\uBB38\uC758\uD574 \uC8FC\uC138\uC694</ContactSupportLink>.",
|
|
13069
13103
|
issueOccurredWithDeposit: "\uC785\uAE08 \uCC98\uB9AC \uC911 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",
|
|
@@ -13162,6 +13196,7 @@ var ko_default = {
|
|
|
13162
13196
|
unsupportedExecutionType: "\uAC70\uB798 \uC720\uD615\uC774 \uC9C0\uC6D0\uB418\uC9C0 \uC54A\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uBC29\uBC95\uC744 \uC2DC\uB3C4\uD558\uC138\uC694.",
|
|
13163
13197
|
unsupportedRoute: "\uD1A0\uD070 \uC30D\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uD1A0\uD070\uC744 \uC2DC\uB3C4\uD558\uC138\uC694.",
|
|
13164
13198
|
userRecipientMismatch: "\uBC1C\uC2E0\uC790\uC640 \uC218\uC2E0\uC790\uAC00 \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4. \uC8FC\uC18C\uB97C \uD655\uC778\uD558\uC138\uC694.",
|
|
13199
|
+
recipientSameAsSource: "\uC218\uC2E0 \uC8FC\uC18C\uB294 \uCD9C\uAE08 \uC8FC\uC18C\uC640 \uAC19\uC744 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4.",
|
|
13165
13200
|
destinationTxFailed: "\uAC70\uB798\uAC00 \uC2E4\uD328\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC2DC\uAC70\uB098 <ContactSupportLink>\uBB38\uC758\uD574 \uC8FC\uC138\uC694</ContactSupportLink>.",
|
|
13166
13201
|
erc20RouterAddressNotFound: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uD1A0\uD070\uC744 \uC2DC\uB3C4\uD574 \uC8FC\uC2DC\uAC70\uB098 <ContactSupportLink>\uBB38\uC758\uD574 \uC8FC\uC138\uC694</ContactSupportLink>.",
|
|
13167
13202
|
unknownError: "\uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC2DC\uAC70\uB098 <ContactSupportLink>\uBB38\uC758\uD574 \uC8FC\uC138\uC694</ContactSupportLink>.",
|
|
@@ -13393,7 +13428,7 @@ var ko_default = {
|
|
|
13393
13428
|
sourceMethodTitle: "\uC18C\uC2A4",
|
|
13394
13429
|
tokensListTitle: "\uB0B4 \uD1A0\uD070",
|
|
13395
13430
|
transferTokens: "\uC554\uD638\uD654\uD3D0 \uC804\uC1A1",
|
|
13396
|
-
bitcoinLightning: "
|
|
13431
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
13397
13432
|
receiveDropdownTitle: "",
|
|
13398
13433
|
receiveDropdownLabel: "\uBC1B\uC744 \uC790\uC0B0",
|
|
13399
13434
|
payAmountLabel: "\uBCF4\uB0BC \uAE08\uC561",
|
|
@@ -13638,7 +13673,9 @@ var ru_default = {
|
|
|
13638
13673
|
groupPopularTokens: "\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
|
|
13639
13674
|
groupStablecoins: "\u0421\u0442\u0435\u0439\u0431\u043B\u043A\u043E\u0438\u043D\u044B",
|
|
13640
13675
|
groupOtherChains: "\u0412\u0441\u0435",
|
|
13641
|
-
groupOtherTokens: "\u0412\u0441\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u0442\u043E\u043A\u0435\u043D\u044B"
|
|
13676
|
+
groupOtherTokens: "\u0412\u0441\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043C\u044B\u0435 \u0442\u043E\u043A\u0435\u043D\u044B",
|
|
13677
|
+
depositBitcoinLightning: "\u041C\u0433\u043D\u043E\u0432\u0435\u043D\u043D\u043E \u0432\u043D\u043E\u0441\u0438\u0442\u0435 Bitcoin \u0447\u0435\u0440\u0435\u0437 Lightning.",
|
|
13678
|
+
lightningTryItNow: "\u041F\u043E\u043F\u0440\u043E\u0431\u043E\u0432\u0430\u0442\u044C"
|
|
13642
13679
|
},
|
|
13643
13680
|
lightningInvoice: {
|
|
13644
13681
|
yourLightningInvoice: "\u0421\u0447\u0451\u0442 Lightning"
|
|
@@ -13662,7 +13699,6 @@ var ru_default = {
|
|
|
13662
13699
|
depositProcessing: "\u0414\u0435\u043F\u043E\u0437\u0438\u0442 \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0435\u0442\u0441\u044F",
|
|
13663
13700
|
depositWillBeCompletedSoon: "\u0412\u0430\u0448 \u0434\u0435\u043F\u043E\u0437\u0438\u0442 \u0441\u043A\u043E\u0440\u043E \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0435\u0440\u0448\u0451\u043D.",
|
|
13664
13701
|
depositWillBeCredited: "\u0412\u0430\u0448 \u0434\u0435\u043F\u043E\u0437\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0447\u0438\u0441\u043B\u0435\u043D \u043D\u0430 \u0432\u0430\u0448 \u0441\u0447\u0451\u0442 \u0432 \u0431\u043B\u0438\u0436\u0430\u0439\u0448\u0435\u0435 \u0432\u0440\u0435\u043C\u044F.",
|
|
13665
|
-
depositWillBeCreditedLighterNative: "\u0412\u0430\u0448 \u0434\u0435\u043F\u043E\u0437\u0438\u0442 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0447\u0438\u0441\u043B\u0435\u043D \u043D\u0430 \u0432\u0430\u0448 \u0441\u0447\u0451\u0442 \u043F\u0440\u0438\u043C\u0435\u0440\u043D\u043E \u0447\u0435\u0440\u0435\u0437 \u0434\u0432\u0435 \u043C\u0438\u043D\u0443\u0442\u044B.",
|
|
13666
13702
|
depositHasBeenCredited: "\u0412\u0430\u0448 \u0434\u0435\u043F\u043E\u0437\u0438\u0442 \u0437\u0430\u0447\u0438\u0441\u043B\u0435\u043D \u043D\u0430 \u0432\u0430\u0448 \u0441\u0447\u0451\u0442.",
|
|
13667
13703
|
depositRefundedOrReprocessed: "\u0412\u0430\u0448 \u0434\u0435\u043F\u043E\u0437\u0438\u0442 \u0431\u044B\u043B \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0451\u043D \u0438\u043B\u0438 \u043F\u0435\u0440\u0435\u043E\u0431\u0440\u0430\u0431\u043E\u0442\u0430\u043D. \u041D\u0435 \u0441\u0442\u0435\u0441\u043D\u044F\u0439\u0442\u0435\u0441\u044C <ContactSupportLink>\u043E\u0431\u0440\u0430\u0449\u0430\u0442\u044C\u0441\u044F</ContactSupportLink> \u0437\u0430 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435\u043C.",
|
|
13668
13704
|
issueOccurredWithDeposit: "\u041F\u0440\u043E\u0438\u0437\u043E\u0448\u043B\u0430 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430 \u043F\u0440\u0438 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0435 \u0432\u0430\u0448\u0435\u0433\u043E \u0434\u0435\u043F\u043E\u0437\u0438\u0442\u0430. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430.",
|
|
@@ -13761,6 +13797,7 @@ var ru_default = {
|
|
|
13761
13797
|
unsupportedExecutionType: "\u0422\u0438\u043F \u0442\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u0438 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u043C\u0435\u0442\u043E\u0434.",
|
|
13762
13798
|
unsupportedRoute: "\u041F\u0430\u0440\u0430 \u0442\u043E\u043A\u0435\u043D\u043E\u0432 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u043D\u0430. \u041F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u043E\u043A\u0435\u043D\u044B.",
|
|
13763
13799
|
userRecipientMismatch: "\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C \u0438 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044C \u0434\u043E\u043B\u0436\u043D\u044B \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0442\u044C. \u041F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0430\u0434\u0440\u0435\u0441\u0430.",
|
|
13800
|
+
recipientSameAsSource: "\u0410\u0434\u0440\u0435\u0441 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F \u043D\u0435 \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0432\u043F\u0430\u0434\u0430\u0442\u044C \u0441 \u0430\u0434\u0440\u0435\u0441\u043E\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430.",
|
|
13764
13801
|
destinationTxFailed: "\u0422\u0440\u0430\u043D\u0437\u0430\u043A\u0446\u0438\u044F \u043D\u0435 \u0443\u0434\u0430\u043B\u0430\u0441\u044C. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 <ContactSupportLink>\u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438</ContactSupportLink>.",
|
|
13765
13802
|
erc20RouterAddressNotFound: "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0434\u0440\u0443\u0433\u043E\u0439 \u0442\u043E\u043A\u0435\u043D \u0438\u043B\u0438 <ContactSupportLink>\u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438</ContactSupportLink>.",
|
|
13766
13803
|
unknownError: "\u0427\u0442\u043E-\u0442\u043E \u043F\u043E\u0448\u043B\u043E \u043D\u0435 \u0442\u0430\u043A. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043F\u043E\u043F\u0440\u043E\u0431\u0443\u0439\u0442\u0435 \u0441\u043D\u043E\u0432\u0430 \u0438\u043B\u0438 <ContactSupportLink>\u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438</ContactSupportLink>.",
|
|
@@ -13992,7 +14029,7 @@ var ru_default = {
|
|
|
13992
14029
|
sourceMethodTitle: "\u0412\u0430\u0448 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A",
|
|
13993
14030
|
tokensListTitle: "\u0412\u0430\u0448\u0438 \u0442\u043E\u043A\u0435\u043D\u044B",
|
|
13994
14031
|
transferTokens: "\u041F\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0443",
|
|
13995
|
-
bitcoinLightning: "
|
|
14032
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
13996
14033
|
receiveDropdownTitle: "",
|
|
13997
14034
|
receiveDropdownLabel: "\u0410\u043A\u0442\u0438\u0432 \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F",
|
|
13998
14035
|
payAmountLabel: "\u0412\u044B \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442\u0435",
|
|
@@ -14237,7 +14274,9 @@ var tr_default = {
|
|
|
14237
14274
|
groupPopularTokens: "Pop\xFCler",
|
|
14238
14275
|
groupStablecoins: "Stablecoinler",
|
|
14239
14276
|
groupOtherChains: "T\xFCm\xFC",
|
|
14240
|
-
groupOtherTokens: "Desteklenen t\xFCm tokenlar"
|
|
14277
|
+
groupOtherTokens: "Desteklenen t\xFCm tokenlar",
|
|
14278
|
+
depositBitcoinLightning: "Lightning ile an\u0131nda Bitcoin yat\u0131r\u0131n.",
|
|
14279
|
+
lightningTryItNow: "Hemen deneyin"
|
|
14241
14280
|
},
|
|
14242
14281
|
lightningInvoice: {
|
|
14243
14282
|
yourLightningInvoice: "Lightning Faturas\u0131"
|
|
@@ -14261,7 +14300,6 @@ var tr_default = {
|
|
|
14261
14300
|
depositProcessing: "Yat\u0131r\u0131m i\u015Fleniyor",
|
|
14262
14301
|
depositWillBeCompletedSoon: "Yat\u0131r\u0131m\u0131n\u0131z yak\u0131nda tamamlanacak.",
|
|
14263
14302
|
depositWillBeCredited: "Yat\u0131r\u0131m\u0131n\u0131z k\u0131sa s\xFCre i\xE7inde hesab\u0131n\u0131za aktar\u0131lacak.",
|
|
14264
|
-
depositWillBeCreditedLighterNative: "Yat\u0131r\u0131m\u0131n\u0131z yakla\u015F\u0131k iki dakika i\xE7inde hesab\u0131n\u0131za aktar\u0131lacak.",
|
|
14265
14303
|
depositHasBeenCredited: "Yat\u0131r\u0131m\u0131n\u0131z hesab\u0131n\u0131za aktar\u0131ld\u0131.",
|
|
14266
14304
|
depositRefundedOrReprocessed: "Yat\u0131r\u0131m\u0131n\u0131z iade edildi veya yeniden i\u015Flendi. Bilgi almak i\xE7in <ContactSupportLink>bizimle ileti\u015Fime ge\xE7ebilirsiniz</ContactSupportLink>.",
|
|
14267
14305
|
issueOccurredWithDeposit: "Yat\u0131r\u0131m\u0131n\u0131zda bir sorun olu\u015Ftu. L\xFCtfen tekrar deneyin.",
|
|
@@ -14360,6 +14398,7 @@ var tr_default = {
|
|
|
14360
14398
|
unsupportedExecutionType: "\u0130\u015Flem t\xFCr\xFC desteklenmiyor. Farkl\u0131 y\xF6ntem deneyin.",
|
|
14361
14399
|
unsupportedRoute: "Token \xE7ifti kullan\u0131lam\u0131yor. Farkl\u0131 token'lar deneyin.",
|
|
14362
14400
|
userRecipientMismatch: "G\xF6nderen ve al\u0131c\u0131 e\u015Fle\u015Fmelidir. Adresleri kontrol edin.",
|
|
14401
|
+
recipientSameAsSource: "Al\u0131c\u0131 adresi, kaynak adresle ayn\u0131 olamaz.",
|
|
14363
14402
|
destinationTxFailed: "\u0130\u015Flem ba\u015Far\u0131s\u0131z. L\xFCtfen tekrar deneyin veya <ContactSupportLink>bizimle ileti\u015Fime ge\xE7in</ContactSupportLink>.",
|
|
14364
14403
|
erc20RouterAddressNotFound: "Bir \u015Feyler yanl\u0131\u015F gitti. L\xFCtfen farkl\u0131 bir token deneyin veya <ContactSupportLink>bizimle ileti\u015Fime ge\xE7in</ContactSupportLink>.",
|
|
14365
14404
|
unknownError: "Bir \u015Feyler yanl\u0131\u015F gitti. L\xFCtfen tekrar deneyin veya <ContactSupportLink>bizimle ileti\u015Fime ge\xE7in</ContactSupportLink>.",
|
|
@@ -14591,7 +14630,7 @@ var tr_default = {
|
|
|
14591
14630
|
sourceMethodTitle: "Kayna\u011F\u0131n\u0131z",
|
|
14592
14631
|
tokensListTitle: "Token'lar\u0131n\u0131z",
|
|
14593
14632
|
transferTokens: "Kripto Transfer Et",
|
|
14594
|
-
bitcoinLightning: "
|
|
14633
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
14595
14634
|
receiveDropdownTitle: "",
|
|
14596
14635
|
receiveDropdownLabel: "Al\u0131nacak Varl\u0131k",
|
|
14597
14636
|
payAmountLabel: "G\xF6nderdi\u011Finiz",
|
|
@@ -14836,7 +14875,9 @@ var zh_default = {
|
|
|
14836
14875
|
groupPopularTokens: "\u70ED\u95E8",
|
|
14837
14876
|
groupStablecoins: "\u7A33\u5B9A\u5E01",
|
|
14838
14877
|
groupOtherChains: "\u5168\u90E8",
|
|
14839
|
-
groupOtherTokens: "\u6240\u6709\u652F\u6301\u7684\u4EE3\u5E01"
|
|
14878
|
+
groupOtherTokens: "\u6240\u6709\u652F\u6301\u7684\u4EE3\u5E01",
|
|
14879
|
+
depositBitcoinLightning: "\u901A\u8FC7\u95EA\u7535\u7F51\u7EDC\u5373\u65F6\u5B58\u5165\u6BD4\u7279\u5E01\u3002",
|
|
14880
|
+
lightningTryItNow: "\u7ACB\u5373\u5C1D\u8BD5"
|
|
14840
14881
|
},
|
|
14841
14882
|
lightningInvoice: {
|
|
14842
14883
|
yourLightningInvoice: "\u95EA\u7535\u7F51\u7EDC\u53D1\u7968"
|
|
@@ -14860,7 +14901,6 @@ var zh_default = {
|
|
|
14860
14901
|
depositProcessing: "\u5B58\u6B3E\u5904\u7406\u4E2D",
|
|
14861
14902
|
depositWillBeCompletedSoon: "\u60A8\u7684\u5B58\u6B3E\u5C06\u5F88\u5FEB\u5B8C\u6210\u3002",
|
|
14862
14903
|
depositWillBeCredited: "\u60A8\u7684\u5B58\u6B3E\u5C06\u5F88\u5FEB\u8BB0\u5165\u60A8\u7684\u8D26\u6237\u3002",
|
|
14863
|
-
depositWillBeCreditedLighterNative: "\u60A8\u7684\u5B58\u6B3E\u5C06\u5728\u5927\u7EA6\u4E24\u5206\u949F\u5185\u8BB0\u5165\u60A8\u7684\u8D26\u6237\u3002",
|
|
14864
14904
|
depositHasBeenCredited: "\u60A8\u7684\u5B58\u6B3E\u5DF2\u8BB0\u5165\u60A8\u7684\u8D26\u6237\u3002",
|
|
14865
14905
|
depositRefundedOrReprocessed: "\u60A8\u7684\u5B58\u6B3E\u5DF2\u9000\u6B3E\u6216\u91CD\u65B0\u5904\u7406\u3002\u5982\u6709\u7591\u95EE\uFF0C\u8BF7\u968F\u65F6<ContactSupportLink>\u8054\u7CFB\u6211\u4EEC</ContactSupportLink>\u3002",
|
|
14866
14906
|
issueOccurredWithDeposit: "\u60A8\u7684\u5B58\u6B3E\u51FA\u73B0\u95EE\u9898\u3002\u8BF7\u91CD\u8BD5\u3002",
|
|
@@ -14959,6 +14999,7 @@ var zh_default = {
|
|
|
14959
14999
|
unsupportedExecutionType: "\u4E0D\u652F\u6301\u7684\u4EA4\u6613\u7C7B\u578B\u3002\u5C1D\u8BD5\u4E0D\u540C\u7684\u65B9\u6CD5\u3002",
|
|
14960
15000
|
unsupportedRoute: "\u4EE3\u5E01\u5BF9\u4E0D\u53EF\u7528\u3002\u5C1D\u8BD5\u4E0D\u540C\u7684\u4EE3\u5E01\u3002",
|
|
14961
15001
|
userRecipientMismatch: "\u53D1\u9001\u8005\u548C\u63A5\u6536\u8005\u5FC5\u987B\u5339\u914D\u3002\u68C0\u67E5\u5730\u5740\u3002",
|
|
15002
|
+
recipientSameAsSource: "\u63A5\u6536\u5730\u5740\u4E0D\u80FD\u4E0E\u6765\u6E90\u5730\u5740\u76F8\u540C\u3002",
|
|
14962
15003
|
destinationTxFailed: "\u4EA4\u6613\u5931\u8D25\u3002\u8BF7\u91CD\u8BD5\u6216<ContactSupportLink>\u8054\u7CFB\u6211\u4EEC</ContactSupportLink>\u3002",
|
|
14963
15004
|
erc20RouterAddressNotFound: "\u51FA\u73B0\u95EE\u9898\u3002\u8BF7\u5C1D\u8BD5\u4E0D\u540C\u7684\u4EE3\u5E01\u6216<ContactSupportLink>\u8054\u7CFB\u6211\u4EEC</ContactSupportLink>\u3002",
|
|
14964
15005
|
unknownError: "\u51FA\u73B0\u95EE\u9898\u3002\u8BF7\u91CD\u8BD5\u6216<ContactSupportLink>\u8054\u7CFB\u6211\u4EEC</ContactSupportLink>\u3002",
|
|
@@ -15190,7 +15231,7 @@ var zh_default = {
|
|
|
15190
15231
|
sourceMethodTitle: "\u60A8\u7684\u6765\u6E90",
|
|
15191
15232
|
tokensListTitle: "\u60A8\u7684\u4EE3\u5E01",
|
|
15192
15233
|
transferTokens: "\u8F6C\u8D26\u52A0\u5BC6\u8D27\u5E01",
|
|
15193
|
-
bitcoinLightning: "
|
|
15234
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
15194
15235
|
receiveDropdownTitle: "",
|
|
15195
15236
|
receiveDropdownLabel: "\u63A5\u6536\u8D44\u4EA7",
|
|
15196
15237
|
payAmountLabel: "\u60A8\u53D1\u9001",
|
|
@@ -15621,7 +15662,7 @@ function generateQuoteApiErrorForDisplay(err, t) {
|
|
|
15621
15662
|
|
|
15622
15663
|
// src/domains/aave.ts
|
|
15623
15664
|
import { AaveV3Ethereum } from "@aave-dao/aave-address-book";
|
|
15624
|
-
import { isTokenEquivalent as
|
|
15665
|
+
import { isTokenEquivalent as isTokenEquivalent4 } from "@funkit/utils";
|
|
15625
15666
|
var AAVE_MARKET_ADDRESS_BY_CHAIN = {
|
|
15626
15667
|
"1": AaveV3Ethereum.POOL
|
|
15627
15668
|
};
|
|
@@ -15639,7 +15680,7 @@ function isAaveNativeSupplyContext({
|
|
|
15639
15680
|
if (!AAVE_MARKET_ADDRESS_BY_CHAIN[String(checkoutConfig.targetChain)]) {
|
|
15640
15681
|
return false;
|
|
15641
15682
|
}
|
|
15642
|
-
return
|
|
15683
|
+
return isTokenEquivalent4({
|
|
15643
15684
|
firstTokenChainId: String(sourceAsset.chainId),
|
|
15644
15685
|
firstTokenAddress: sourceAsset.address,
|
|
15645
15686
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -16245,7 +16286,7 @@ function createExactOutBuilder(isStablecoin) {
|
|
|
16245
16286
|
};
|
|
16246
16287
|
},
|
|
16247
16288
|
hasKnownAmountBeforeQuote(config) {
|
|
16248
|
-
return !!config.targetAssetAmount &&
|
|
16289
|
+
return !!config.targetAssetAmount && isStablecoin(config.targetAssetTicker);
|
|
16249
16290
|
},
|
|
16250
16291
|
computeQuickOptionAmount({ percentage, usdAvailableAmount }) {
|
|
16251
16292
|
const fiatAmount = usdAvailableAmount != null ? usdAvailableAmount * (percentage / 100) : percentage;
|
|
@@ -18589,7 +18630,7 @@ Dialog.BottomBar = FunBottomBar;
|
|
|
18589
18630
|
|
|
18590
18631
|
// src/modals/WithdrawalModal/LighterWithdrawal.tsx
|
|
18591
18632
|
import { RELAY_LIGHTER_CHAIN_ID as RELAY_LIGHTER_CHAIN_ID2 } from "@funkit/fun-relay";
|
|
18592
|
-
import { formatAddress as formatAddress3, formatCryptoAndStringify
|
|
18633
|
+
import { formatAddress as formatAddress3, formatCryptoAndStringify } from "@funkit/utils";
|
|
18593
18634
|
import * as dnum6 from "dnum";
|
|
18594
18635
|
import React83, { useEffect as useEffect33, useMemo as useMemo26 } from "react";
|
|
18595
18636
|
import { createPortal as createPortal2 } from "react-dom";
|
|
@@ -19111,7 +19152,6 @@ var DecimalSpan = ({
|
|
|
19111
19152
|
|
|
19112
19153
|
// src/components/FunTransactionSummary/PaymentFeesSummary.tsx
|
|
19113
19154
|
import {
|
|
19114
|
-
formatCryptoAndStringify,
|
|
19115
19155
|
formatCurrencyAndStringify as formatCurrencyAndStringify2,
|
|
19116
19156
|
formatDynamicFeeUsd,
|
|
19117
19157
|
formatPercent,
|
|
@@ -19379,17 +19419,9 @@ function translateAppFeeLabel(appFeeLabel, t) {
|
|
|
19379
19419
|
};
|
|
19380
19420
|
return feeLabelMap[appFeeLabel] ?? t("fees.funxyzFee");
|
|
19381
19421
|
}
|
|
19382
|
-
function computeDigest(relayQuoteMetadata, uiCustomizations, totalPriceImpactPercent, gasUsd
|
|
19422
|
+
function computeDigest(relayQuoteMetadata, uiCustomizations, totalPriceImpactPercent, gasUsd) {
|
|
19383
19423
|
const showTransactionDigest = uiCustomizations.confirmationScreen.showTransactionDigest;
|
|
19384
19424
|
const details = relayQuoteMetadata.relayQuote.details;
|
|
19385
|
-
if (checkoutConfig && hasFinalizedToken) {
|
|
19386
|
-
const { finalizedTokenAmount, finalizedTokenSymbol } = computeDisplayDestinationToken(checkoutConfig, 1);
|
|
19387
|
-
const amount = formatCryptoAndStringify(finalizedTokenAmount);
|
|
19388
|
-
return {
|
|
19389
|
-
isMainnet: false,
|
|
19390
|
-
value: `1 ${checkoutConfig.targetAssetTicker} = ${amount} ${finalizedTokenSymbol}`
|
|
19391
|
-
};
|
|
19392
|
-
}
|
|
19393
19425
|
if (showTransactionDigest === "none") {
|
|
19394
19426
|
return {
|
|
19395
19427
|
isMainnet: false,
|
|
@@ -19427,11 +19459,6 @@ function renderRelayFee({
|
|
|
19427
19459
|
const totalPriceImpact = swapImpactUsd + appFeeUsd;
|
|
19428
19460
|
const totalPriceImpactPercent = swapImpact + appFeePercent;
|
|
19429
19461
|
const details = relayQuoteMetadata.relayQuote.details;
|
|
19430
|
-
const hasFinalizedToken = Boolean(checkoutConfig?.finalizedToken);
|
|
19431
|
-
const isVaultDeposit = checkoutConfig && isVaultDepositCheckout(checkoutConfig, {
|
|
19432
|
-
tokenAddress: details?.currencyIn?.currency?.address || "0x",
|
|
19433
|
-
chainId: String(details?.currencyIn?.currency?.chainId || "")
|
|
19434
|
-
});
|
|
19435
19462
|
const selectedRouteConfig = uiCustomizations.confirmationScreen.selectedRouteConfig;
|
|
19436
19463
|
const passthroughLabel = selectedRouteConfig?.passthroughLabel ?? t("fees.selectedRouteNativeBridge");
|
|
19437
19464
|
const passthroughIcon = selectedRouteConfig ? /* @__PURE__ */ React81.createElement(
|
|
@@ -19470,13 +19497,7 @@ function renderRelayFee({
|
|
|
19470
19497
|
relayQuoteMetadata,
|
|
19471
19498
|
uiCustomizations,
|
|
19472
19499
|
totalPriceImpactPercent,
|
|
19473
|
-
totalNetworkCostUsd
|
|
19474
|
-
checkoutConfig,
|
|
19475
|
-
hasFinalizedToken
|
|
19476
|
-
);
|
|
19477
|
-
const { finalizedTokenAmount } = computeDisplayDestinationToken(
|
|
19478
|
-
checkoutConfig,
|
|
19479
|
-
checkoutConfig?.targetAssetAmount || 0
|
|
19500
|
+
totalNetworkCostUsd
|
|
19480
19501
|
);
|
|
19481
19502
|
const showSelectedRoute = uiCustomizations.confirmationScreen.showSelectedRoute || !!selectedRouteConfig;
|
|
19482
19503
|
return {
|
|
@@ -19494,20 +19515,6 @@ function renderRelayFee({
|
|
|
19494
19515
|
value: selectedRoute.label
|
|
19495
19516
|
}
|
|
19496
19517
|
] : [],
|
|
19497
|
-
...checkoutConfig?.finalizedToken && !isVaultDeposit ? [
|
|
19498
|
-
{
|
|
19499
|
-
label: t("fees.receiveAtLeast"),
|
|
19500
|
-
testId: "receive-at-least",
|
|
19501
|
-
value: `${formatCryptoAndStringify(finalizedTokenAmount)} ${checkoutConfig.finalizedToken.tokenSymbol}`
|
|
19502
|
-
}
|
|
19503
|
-
] : [],
|
|
19504
|
-
...hasFinalizedToken ? [
|
|
19505
|
-
{
|
|
19506
|
-
label: t("fees.exchangeRate"),
|
|
19507
|
-
testId: "exchange-rate",
|
|
19508
|
-
value: collapsedValue ?? ""
|
|
19509
|
-
}
|
|
19510
|
-
] : [],
|
|
19511
19518
|
{
|
|
19512
19519
|
label: t("fees.networkCost"),
|
|
19513
19520
|
testId: "network-cost",
|
|
@@ -19604,7 +19611,7 @@ function renderRelayFee({
|
|
|
19604
19611
|
value: t("fees.autoSlippageValue", {
|
|
19605
19612
|
value: formatPercent(maxSlippage)
|
|
19606
19613
|
}),
|
|
19607
|
-
tooltipText:
|
|
19614
|
+
tooltipText: t("fees.slippageTooltipWithMin", {
|
|
19608
19615
|
minReceived: formatCurrencyAndStringify2(minReceived)
|
|
19609
19616
|
})
|
|
19610
19617
|
},
|
|
@@ -19938,6 +19945,20 @@ var getTokenIconUrl = (symbol, tokens) => {
|
|
|
19938
19945
|
|
|
19939
19946
|
// src/modals/WithdrawalModal/LighterWithdrawal.tsx
|
|
19940
19947
|
var LIGHTER_SECURE_METHOD_ID = "lighter-secure";
|
|
19948
|
+
var LIGHTER_SECURE_MAINNET_ADDRESS = {
|
|
19949
|
+
ETH: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
|
19950
|
+
LIT: "0x232CE3bd40fCd6f80f3d55A522d03f25Df784Ee2",
|
|
19951
|
+
USDC: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
|
19952
|
+
LINK: "0x514910771AF9Ca656af840dff83E8264EcF986CA",
|
|
19953
|
+
UNI: "0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984",
|
|
19954
|
+
AAVE: "0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9",
|
|
19955
|
+
SKY: "0x56072C95FAA701256059aa122697B133aDEd9279",
|
|
19956
|
+
LDO: "0x5A98FcBEA516Cf06857215779Fd812CA3beF1B32",
|
|
19957
|
+
AZTEC: "0xA27EC0006e59f245217Ff08CD52A7E8b169E62D2"
|
|
19958
|
+
};
|
|
19959
|
+
function getLighterSecureMainnetAddress(symbol) {
|
|
19960
|
+
return LIGHTER_SECURE_MAINNET_ADDRESS[symbol.toUpperCase()];
|
|
19961
|
+
}
|
|
19941
19962
|
var LIGHTER_FAST_MAX_WITHDRAWAL_LABEL = "$3M";
|
|
19942
19963
|
function LighterFastMaxExceededMessage({
|
|
19943
19964
|
onSwitchToSecure
|
|
@@ -20232,7 +20253,7 @@ function LighterSecureReceiveAmountValue({
|
|
|
20232
20253
|
size: "withdrawalYouWillReceive",
|
|
20233
20254
|
weight: "withdrawalYouWillReceiveValueCrypto"
|
|
20234
20255
|
},
|
|
20235
|
-
amount ?
|
|
20256
|
+
amount ? formatCryptoAndStringify(Number(amount), tokenSymbol, true, {
|
|
20236
20257
|
minBeforeUseScientific: 0,
|
|
20237
20258
|
numberFormatOptions: { maximumFractionDigits: 8 }
|
|
20238
20259
|
}) : NO_DATA_VALUE
|
|
@@ -20260,7 +20281,7 @@ function LighterSecureWithdrawalSuccess({
|
|
|
20260
20281
|
height: 15,
|
|
20261
20282
|
borderRadius: "full"
|
|
20262
20283
|
}
|
|
20263
|
-
), /* @__PURE__ */ React83.createElement(Text, { size: "txSummaryValue", weight: "txSummaryValue" },
|
|
20284
|
+
), /* @__PURE__ */ React83.createElement(Text, { size: "txSummaryValue", weight: "txSummaryValue" }, formatCryptoAndStringify(Number(amount), tokenSymbol))));
|
|
20264
20285
|
const transactionItem = hasRealTxHash ? /* @__PURE__ */ React83.createElement(FunTxSummaryLineItem, null, /* @__PURE__ */ React83.createElement(FunTxSummaryLineItemKeyText, { text: t("directExecution.withdrawalTx") }), /* @__PURE__ */ React83.createElement(Box, { display: "flex", alignItems: "center", gap: "4" }, /* @__PURE__ */ React83.createElement(Text, { size: "txSummaryValue", weight: "txSummaryValue" }, formatAddress3(txHash)), /* @__PURE__ */ React83.createElement(
|
|
20265
20286
|
FunRedirectButton,
|
|
20266
20287
|
{
|
|
@@ -20354,10 +20375,8 @@ import {
|
|
|
20354
20375
|
} from "@funkit/connect-core";
|
|
20355
20376
|
import { useMemo as useMemo27 } from "react";
|
|
20356
20377
|
function useRecentDepositsApi(params) {
|
|
20357
|
-
const isFasterNotificationsEnabled = useFeatureGate("faster-notifications");
|
|
20358
20378
|
return useRecentDepositsApiQuery({
|
|
20359
20379
|
...params,
|
|
20360
|
-
isFasterNotificationsEnabled,
|
|
20361
20380
|
logger
|
|
20362
20381
|
});
|
|
20363
20382
|
}
|
|
@@ -20413,7 +20432,7 @@ function useFunkitRecentDepositsImpl(query) {
|
|
|
20413
20432
|
import {
|
|
20414
20433
|
formatAddress as formatAddress6,
|
|
20415
20434
|
formatTimestamp as formatTimestamp2,
|
|
20416
|
-
isTokenEquivalent as
|
|
20435
|
+
isTokenEquivalent as isTokenEquivalent5
|
|
20417
20436
|
} from "@funkit/utils";
|
|
20418
20437
|
import React112, { useCallback as useCallback23, useMemo as useMemo33, useRef as useRef14, useState as useState31 } from "react";
|
|
20419
20438
|
import { createPortal as createPortal3 } from "react-dom";
|
|
@@ -20430,13 +20449,14 @@ import React106 from "react";
|
|
|
20430
20449
|
|
|
20431
20450
|
// src/hooks/usePaymentMethodIcon.tsx
|
|
20432
20451
|
import React105 from "react";
|
|
20452
|
+
import { bitcoinChain as bitcoinChain4 } from "@funkit/chains";
|
|
20433
20453
|
|
|
20434
20454
|
// src/components/FunPayments/FunPaymentMethods.tsx
|
|
20435
20455
|
import {
|
|
20436
20456
|
BridgeCustomerStatus as BridgeCustomerStatus3,
|
|
20437
20457
|
FormOfPaymentType as FormOfPaymentType3
|
|
20438
20458
|
} from "@funkit/api-base";
|
|
20439
|
-
import {
|
|
20459
|
+
import { lightningChain } from "@funkit/chains";
|
|
20440
20460
|
import {
|
|
20441
20461
|
formatCurrencyAndStringify as formatCurrencyAndStringify4
|
|
20442
20462
|
} from "@funkit/utils";
|
|
@@ -20720,7 +20740,8 @@ var EMPTY_RESULT = {
|
|
|
20720
20740
|
chainIdSortOrder: [],
|
|
20721
20741
|
defaultChainId: void 0,
|
|
20722
20742
|
priorityTokenSymbols: [],
|
|
20723
|
-
newBadgeSymbols: /* @__PURE__ */ new Set()
|
|
20743
|
+
newBadgeSymbols: /* @__PURE__ */ new Set(),
|
|
20744
|
+
addressBySymbolByChainId: {}
|
|
20724
20745
|
};
|
|
20725
20746
|
function useTokenTransferConfig(isWithdrawal = false) {
|
|
20726
20747
|
const tokenTransferConfig = useDynamicConfig("tokentransferconfig");
|
|
@@ -21839,12 +21860,7 @@ var BitcoinLightningPaymentMethodItem = ({
|
|
|
21839
21860
|
const { isUserGeoblocked } = useFunkitUserIp();
|
|
21840
21861
|
const { t } = useFunkitTranslation();
|
|
21841
21862
|
const { textCustomizations } = useFunkitConfig();
|
|
21842
|
-
const valueIcon = customValueIcon ?? /* @__PURE__ */ React92.createElement(
|
|
21843
|
-
SupportedChainList,
|
|
21844
|
-
{
|
|
21845
|
-
chainIdList: [bitcoinChain4.id, lightningChain.id].map(String)
|
|
21846
|
-
}
|
|
21847
|
-
);
|
|
21863
|
+
const valueIcon = customValueIcon ?? /* @__PURE__ */ React92.createElement(SupportedChainList, { chainIdList: [lightningChain.id].map(String) });
|
|
21848
21864
|
const limit = formatCurrencyAndStringify4(MAX_BTC_LIGHTNING_AMOUNT_USD, {
|
|
21849
21865
|
maxBeforeUseSuffix: 1e3
|
|
21850
21866
|
});
|
|
@@ -22195,32 +22211,9 @@ var ApplePayIcon = ({ size = 20 }) => /* @__PURE__ */ React93.createElement(
|
|
|
22195
22211
|
)
|
|
22196
22212
|
);
|
|
22197
22213
|
|
|
22198
|
-
// src/components/Icons/CashAppIcon.tsx
|
|
22199
|
-
import React94 from "react";
|
|
22200
|
-
var CashAppIcon = ({ size = 20 }) => /* @__PURE__ */ React94.createElement(
|
|
22201
|
-
"svg",
|
|
22202
|
-
{
|
|
22203
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22204
|
-
width: size,
|
|
22205
|
-
height: size,
|
|
22206
|
-
viewBox: "0 0 210 210",
|
|
22207
|
-
fill: "none"
|
|
22208
|
-
},
|
|
22209
|
-
/* @__PURE__ */ React94.createElement("rect", { width: "150", height: "150", x: "25", y: "25", rx: "7.81424", fill: "#ffffff" }),
|
|
22210
|
-
/* @__PURE__ */ React94.createElement(
|
|
22211
|
-
"path",
|
|
22212
|
-
{
|
|
22213
|
-
fill: "#00e013",
|
|
22214
|
-
fillRule: "evenodd",
|
|
22215
|
-
clipRule: "evenodd",
|
|
22216
|
-
d: "M206.398,30.286c-4.502-12.394-14.307-22.189-26.713-26.687C168.48,0,158.075,0,136.865,0h-63.63 c-21.11,0-31.615,0-42.92,3.498C17.909,7.996,8.104,17.792,3.602,30.186C0,41.58,0,52.075,0,73.165v63.57 c0,21.19,0,31.585,3.502,42.98c4.502,12.394,14.307,22.189,26.713,26.687C41.62,210,52.125,210,73.135,210h63.63 c21.11,0,31.615,0,42.92-3.598c12.406-4.498,22.211-14.293,26.713-26.687C210,168.32,210,157.825,210,136.735v-63.47 C210,52.175,210,41.68,206.398,30.286z M151.472,71.866l-12.106,9.895c-1.101,0.9-2.601,0.7-3.402-0.4 c-6.203-7.596-15.807-11.894-26.312-11.894c-11.706,0-19.009,5.098-19.009,12.294c-0.2,6.097,5.503,9.196,23.011,12.994 c22.111,4.698,32.215,13.893,32.215,29.386c0,19.391-15.808,33.684-40.519,35.283l-2.401,11.495 c-0.2,1.099-1.201,1.899-2.401,1.899H81.539c-1.601,0-2.701-1.499-2.401-2.999l3.001-12.794 c-12.206-3.498-22.111-10.295-27.813-18.591c-0.7-1.099-0.5-2.499,0.5-3.298l13.206-10.395c1.101-0.9,2.701-0.6,3.502,0.5 c7.003,9.795,17.808,15.593,30.815,15.593c11.706,0,20.51-5.697,20.51-13.893c0-6.297-4.402-9.196-19.309-12.294 c-25.412-5.497-35.517-14.793-35.517-30.286c0-17.991,15.107-31.485,37.918-33.284l2.501-11.894c0.2-1.099,1.201-1.899,2.401-1.899 h18.709c1.501,0,2.701,1.399,2.401,2.899l-2.901,13.294c9.805,2.999,17.808,8.396,22.811,15.093 C152.673,69.567,152.473,71.066,151.472,71.866z"
|
|
22217
|
-
}
|
|
22218
|
-
)
|
|
22219
|
-
);
|
|
22220
|
-
|
|
22221
22214
|
// src/components/Icons/CryptoTransferQRIcon.tsx
|
|
22222
|
-
import
|
|
22223
|
-
var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22215
|
+
import React94 from "react";
|
|
22216
|
+
var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */ React94.createElement(
|
|
22224
22217
|
"svg",
|
|
22225
22218
|
{
|
|
22226
22219
|
width: size,
|
|
@@ -22229,7 +22222,7 @@ var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */ React95.createElem
|
|
|
22229
22222
|
fill: "none",
|
|
22230
22223
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22231
22224
|
},
|
|
22232
|
-
/* @__PURE__ */
|
|
22225
|
+
/* @__PURE__ */ React94.createElement(
|
|
22233
22226
|
"path",
|
|
22234
22227
|
{
|
|
22235
22228
|
d: "M6.18056 9.99924H10V13.8187M3.13264 9.99924H3.125M6.95208 13.8187H6.94444M10.0076 16.8742H10M16.8826 9.99924H16.875M3.125 13.8187H4.27083M12.6736 9.99924H14.2014M3.125 16.8742H6.94444M10 2.36035V6.94369M14.2778 16.8742H15.6528C16.0806 16.8742 16.2945 16.8742 16.4579 16.791C16.6016 16.7177 16.7185 16.6009 16.7917 16.4572C16.875 16.2937 16.875 16.0798 16.875 15.652V14.277C16.875 13.8492 16.875 13.6353 16.7917 13.4719C16.7185 13.3282 16.6016 13.2113 16.4579 13.1381C16.2945 13.0548 16.0806 13.0548 15.6528 13.0548H14.2778C13.85 13.0548 13.6361 13.0548 13.4726 13.1381C13.3289 13.2113 13.2121 13.3282 13.1388 13.4719C13.0556 13.6353 13.0556 13.8492 13.0556 14.277V15.652C13.0556 16.0798 13.0556 16.2937 13.1388 16.4572C13.2121 16.6009 13.3289 16.7177 13.4726 16.791C13.6361 16.8742 13.85 16.8742 14.2778 16.8742ZM14.2778 6.94369H15.6528C16.0806 6.94369 16.2945 6.94369 16.4579 6.86043C16.6016 6.78719 16.7185 6.67033 16.7917 6.52659C16.875 6.36319 16.875 6.14928 16.875 5.72146V4.34646C16.875 3.91864 16.875 3.70474 16.7917 3.54133C16.7185 3.3976 16.6016 3.28074 16.4579 3.2075C16.2945 3.12424 16.0806 3.12424 15.6528 3.12424H14.2778C13.85 3.12424 13.6361 3.12424 13.4726 3.2075C13.3289 3.28074 13.2121 3.3976 13.1388 3.54133C13.0556 3.70474 13.0556 3.91864 13.0556 4.34646V5.72146C13.0556 6.14928 13.0556 6.36319 13.1388 6.52659C13.2121 6.67033 13.3289 6.78719 13.4726 6.86043C13.6361 6.94369 13.85 6.94369 14.2778 6.94369ZM4.34722 6.94369H5.72222C6.15004 6.94369 6.36395 6.94369 6.52735 6.86043C6.67109 6.78719 6.78795 6.67033 6.86119 6.52659C6.94444 6.36319 6.94444 6.14928 6.94444 5.72146V4.34646C6.94444 3.91864 6.94444 3.70474 6.86119 3.54133C6.78795 3.3976 6.67109 3.28074 6.52735 3.2075C6.36395 3.12424 6.15004 3.12424 5.72222 3.12424H4.34722C3.9194 3.12424 3.7055 3.12424 3.54209 3.2075C3.39836 3.28074 3.2815 3.3976 3.20826 3.54133C3.125 3.70474 3.125 3.91864 3.125 4.34646V5.72146C3.125 6.14928 3.125 6.36319 3.20826 6.52659C3.2815 6.67033 3.39836 6.78719 3.54209 6.86043C3.7055 6.94369 3.9194 6.94369 4.34722 6.94369Z",
|
|
@@ -22242,8 +22235,8 @@ var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */ React95.createElem
|
|
|
22242
22235
|
);
|
|
22243
22236
|
|
|
22244
22237
|
// src/components/Icons/ExchangeIcon.tsx
|
|
22245
|
-
import
|
|
22246
|
-
var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22238
|
+
import React95 from "react";
|
|
22239
|
+
var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */ React95.createElement(
|
|
22247
22240
|
"svg",
|
|
22248
22241
|
{
|
|
22249
22242
|
width: size,
|
|
@@ -22252,7 +22245,7 @@ var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */ React96.createElement(
|
|
|
22252
22245
|
fill: "none",
|
|
22253
22246
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22254
22247
|
},
|
|
22255
|
-
/* @__PURE__ */
|
|
22248
|
+
/* @__PURE__ */ React95.createElement(
|
|
22256
22249
|
"path",
|
|
22257
22250
|
{
|
|
22258
22251
|
d: "M12.5 17.5V13C12.5 12.5333 12.5 12.2999 12.4092 12.1217C12.3293 11.9649 12.2018 11.8374 12.045 11.7575C11.8667 11.6667 11.6334 11.6667 11.1667 11.6667H8.83333C8.36662 11.6667 8.13327 11.6667 7.95501 11.7575C7.79821 11.8374 7.67072 11.9649 7.59083 12.1217C7.5 12.2999 7.5 12.5333 7.5 13V17.5M2.5 5.83333C2.5 7.21405 3.61929 8.33333 5 8.33333C6.38071 8.33333 7.5 7.21405 7.5 5.83333C7.5 7.21405 8.61929 8.33333 10 8.33333C11.3807 8.33333 12.5 7.21405 12.5 5.83333C12.5 7.21405 13.6193 8.33333 15 8.33333C16.3807 8.33333 17.5 7.21405 17.5 5.83333M5.16667 17.5H14.8333C15.7668 17.5 16.2335 17.5 16.59 17.3183C16.9036 17.1586 17.1586 16.9036 17.3183 16.59C17.5 16.2335 17.5 15.7668 17.5 14.8333V5.16667C17.5 4.23325 17.5 3.76654 17.3183 3.41002C17.1586 3.09641 16.9036 2.84144 16.59 2.68166C16.2335 2.5 15.7668 2.5 14.8333 2.5H5.16667C4.23325 2.5 3.76654 2.5 3.41002 2.68166C3.09641 2.84144 2.84144 3.09641 2.68166 3.41002C2.5 3.76654 2.5 4.23325 2.5 5.16667V14.8333C2.5 15.7668 2.5 16.2335 2.68166 16.59C2.84144 16.9036 3.09641 17.1586 3.41002 17.3183C3.76654 17.5 4.23325 17.5 5.16667 17.5Z",
|
|
@@ -22265,8 +22258,8 @@ var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */ React96.createElement(
|
|
|
22265
22258
|
);
|
|
22266
22259
|
|
|
22267
22260
|
// src/components/Icons/FanaticsCreditCardIcon.tsx
|
|
22268
|
-
import
|
|
22269
|
-
var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22261
|
+
import React96 from "react";
|
|
22262
|
+
var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */ React96.createElement(
|
|
22270
22263
|
"svg",
|
|
22271
22264
|
{
|
|
22272
22265
|
width: size,
|
|
@@ -22275,7 +22268,7 @@ var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */ React97.createEl
|
|
|
22275
22268
|
fill: "none",
|
|
22276
22269
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22277
22270
|
},
|
|
22278
|
-
/* @__PURE__ */
|
|
22271
|
+
/* @__PURE__ */ React96.createElement(
|
|
22279
22272
|
"path",
|
|
22280
22273
|
{
|
|
22281
22274
|
d: "M17.6667 5.16667H1M8.5 8.5H4.33333M1 3.66667L1 10C1 10.9334 1 11.4001 1.18166 11.7566C1.34144 12.0703 1.59641 12.3252 1.91002 12.485C2.26654 12.6667 2.73325 12.6667 3.66667 12.6667L15 12.6667C15.9334 12.6667 16.4001 12.6667 16.7567 12.485C17.0703 12.3252 17.3252 12.0703 17.485 11.7567C17.6667 11.4001 17.6667 10.9334 17.6667 10V3.66667C17.6667 2.73325 17.6667 2.26654 17.485 1.91002C17.3252 1.59641 17.0703 1.34145 16.7567 1.18166C16.4001 1 15.9334 1 15 1L3.66667 1C2.73325 1 2.26654 1 1.91002 1.18166C1.59641 1.34144 1.34145 1.59641 1.18166 1.91002C1 2.26654 1 2.73325 1 3.66667Z",
|
|
@@ -22288,8 +22281,8 @@ var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */ React97.createEl
|
|
|
22288
22281
|
);
|
|
22289
22282
|
|
|
22290
22283
|
// src/components/Icons/GooglePayIcon.tsx
|
|
22291
|
-
import
|
|
22292
|
-
var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22284
|
+
import React97 from "react";
|
|
22285
|
+
var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */ React97.createElement(
|
|
22293
22286
|
"svg",
|
|
22294
22287
|
{
|
|
22295
22288
|
width: size,
|
|
@@ -22298,28 +22291,28 @@ var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */ React98.createElement(
|
|
|
22298
22291
|
fill: "none",
|
|
22299
22292
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22300
22293
|
},
|
|
22301
|
-
/* @__PURE__ */
|
|
22294
|
+
/* @__PURE__ */ React97.createElement(
|
|
22302
22295
|
"path",
|
|
22303
22296
|
{
|
|
22304
22297
|
d: "M17.2498 10.1839C17.2498 9.63852 17.1906 9.09319 17.1315 8.54785H9.73828V11.6381H13.9376C13.7602 12.6076 13.2279 13.5165 12.3998 14.0618V16.0614H14.9431C16.4217 14.6677 17.2498 12.6076 17.2498 10.1839Z",
|
|
22305
22298
|
fill: "currentColor"
|
|
22306
22299
|
}
|
|
22307
22300
|
),
|
|
22308
|
-
/* @__PURE__ */
|
|
22301
|
+
/* @__PURE__ */ React97.createElement(
|
|
22309
22302
|
"path",
|
|
22310
22303
|
{
|
|
22311
22304
|
d: "M9.73845 18C11.8677 18 13.6421 17.2729 14.9433 16.0611L12.4 14.0615C11.6902 14.5462 10.8031 14.8492 9.73845 14.8492C7.7275 14.8492 5.95313 13.4556 5.36168 11.5166H2.75928V13.5768C4.11962 16.3034 6.78117 18 9.73845 18Z",
|
|
22312
22305
|
fill: "currentColor"
|
|
22313
22306
|
}
|
|
22314
22307
|
),
|
|
22315
|
-
/* @__PURE__ */
|
|
22308
|
+
/* @__PURE__ */ React97.createElement(
|
|
22316
22309
|
"path",
|
|
22317
22310
|
{
|
|
22318
22311
|
d: "M5.36173 11.5156C5.00686 10.5461 5.00686 9.45547 5.36173 8.42539V6.36523H2.75933C1.63556 8.60717 1.63556 11.2733 2.75933 13.5758L5.36173 11.5156Z",
|
|
22319
22312
|
fill: "currentColor"
|
|
22320
22313
|
}
|
|
22321
22314
|
),
|
|
22322
|
-
/* @__PURE__ */
|
|
22315
|
+
/* @__PURE__ */ React97.createElement(
|
|
22323
22316
|
"path",
|
|
22324
22317
|
{
|
|
22325
22318
|
d: "M9.73838 5.15409C10.8621 5.15409 11.9268 5.57824 12.7548 6.36595L15.0023 4.06342C13.5828 2.73037 11.6902 1.94267 9.79753 2.00326C6.84025 2.00326 4.11956 3.69986 2.81836 6.42654L5.42076 8.4867C5.95307 6.54773 7.72744 5.15409 9.73838 5.15409Z",
|
|
@@ -22328,6 +22321,44 @@ var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */ React98.createElement(
|
|
|
22328
22321
|
)
|
|
22329
22322
|
);
|
|
22330
22323
|
|
|
22324
|
+
// src/components/Icons/New/CircleBitcoinIcon.tsx
|
|
22325
|
+
import React98 from "react";
|
|
22326
|
+
var CircleBitcoinIcon = ({ size = 12 }) => {
|
|
22327
|
+
return /* @__PURE__ */ React98.createElement(
|
|
22328
|
+
"svg",
|
|
22329
|
+
{
|
|
22330
|
+
width: size,
|
|
22331
|
+
height: size,
|
|
22332
|
+
viewBox: "0 0 20 20",
|
|
22333
|
+
fill: "none",
|
|
22334
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
22335
|
+
},
|
|
22336
|
+
/* @__PURE__ */ React98.createElement(
|
|
22337
|
+
"path",
|
|
22338
|
+
{
|
|
22339
|
+
d: "M12.9168 11.8737C12.9168 12.449 12.4505 12.9154 11.8752 12.9154H8.75016V10.832H11.8752C12.4505 10.832 12.9168 11.2984 12.9168 11.8737Z",
|
|
22340
|
+
fill: "currentColor"
|
|
22341
|
+
}
|
|
22342
|
+
),
|
|
22343
|
+
/* @__PURE__ */ React98.createElement(
|
|
22344
|
+
"path",
|
|
22345
|
+
{
|
|
22346
|
+
d: "M11.4585 7.08203H8.75016V9.16536H11.4585C12.0338 9.16536 12.5002 8.69899 12.5002 8.1237C12.5002 7.5484 12.0338 7.08203 11.4585 7.08203Z",
|
|
22347
|
+
fill: "currentColor"
|
|
22348
|
+
}
|
|
22349
|
+
),
|
|
22350
|
+
/* @__PURE__ */ React98.createElement(
|
|
22351
|
+
"path",
|
|
22352
|
+
{
|
|
22353
|
+
fillRule: "evenodd",
|
|
22354
|
+
clipRule: "evenodd",
|
|
22355
|
+
d: "M10.0002 0.832031C4.93755 0.832031 0.833496 4.93609 0.833496 9.9987C0.833496 15.0613 4.93755 19.1654 10.0002 19.1654C15.0628 19.1654 19.1668 15.0613 19.1668 9.9987C19.1668 4.93609 15.0628 0.832031 10.0002 0.832031ZM8.3335 4.16536C8.79373 4.16536 9.16683 4.53846 9.16683 4.9987V5.41536H10.0002V4.9987C10.0002 4.53846 10.3733 4.16536 10.8335 4.16536C11.2937 4.16536 11.6668 4.53846 11.6668 4.9987V5.42326C13.0653 5.52964 14.1668 6.69803 14.1668 8.1237C14.1668 8.74941 13.9546 9.32557 13.5983 9.78413C14.2 10.2809 14.5835 11.0325 14.5835 11.8737C14.5835 13.3695 13.3709 14.582 11.8752 14.582H11.6668V14.9987C11.6668 15.4589 11.2937 15.832 10.8335 15.832C10.3733 15.832 10.0002 15.4589 10.0002 14.9987V14.582H9.16683V14.9987C9.16683 15.4589 8.79373 15.832 8.3335 15.832C7.87326 15.832 7.50016 15.4589 7.50016 14.9987V14.582H6.66683C6.20659 14.582 5.8335 14.2089 5.8335 13.7487C5.8335 13.2885 6.20659 12.9154 6.66683 12.9154H7.0835V7.08203H6.66683C6.20659 7.08203 5.8335 6.70894 5.8335 6.2487C5.8335 5.78846 6.20659 5.41536 6.66683 5.41536H7.50016V4.9987C7.50016 4.53846 7.87326 4.16536 8.3335 4.16536Z",
|
|
22356
|
+
fill: "currentColor"
|
|
22357
|
+
}
|
|
22358
|
+
)
|
|
22359
|
+
);
|
|
22360
|
+
};
|
|
22361
|
+
|
|
22331
22362
|
// src/components/Icons/New/BankIcon.tsx
|
|
22332
22363
|
import React99 from "react";
|
|
22333
22364
|
var BankIcon = ({ size = 20 }) => {
|
|
@@ -22535,7 +22566,20 @@ var PAYMENT_METHOD_ICONS = {
|
|
|
22535
22566
|
[PaymentMethod.GOOGLE_PAY]: (size) => /* @__PURE__ */ React105.createElement(GooglePayIcon, { size }),
|
|
22536
22567
|
[PaymentMethod.REVOLUT_PAY]: (size) => /* @__PURE__ */ React105.createElement(RevolutPayIcon, { size }),
|
|
22537
22568
|
[PaymentMethod.TOKEN_TRANSFER]: (size) => /* @__PURE__ */ React105.createElement(CryptoTransferQRIcon, { size }),
|
|
22538
|
-
[PaymentMethod.BITCOIN_LIGHTNING]: (size) =>
|
|
22569
|
+
[PaymentMethod.BITCOIN_LIGHTNING]: (size) => {
|
|
22570
|
+
const bitcoinIconUrl = chainMetadataById[bitcoinChain4.id]?.iconUrl ?? "";
|
|
22571
|
+
return /* @__PURE__ */ React105.createElement(
|
|
22572
|
+
AsyncImage,
|
|
22573
|
+
{
|
|
22574
|
+
alt: "Bitcoin",
|
|
22575
|
+
borderRadius: "full",
|
|
22576
|
+
fallbackElement: /* @__PURE__ */ React105.createElement(CircleBitcoinIcon, { size }),
|
|
22577
|
+
height: size,
|
|
22578
|
+
width: size,
|
|
22579
|
+
src: bitcoinIconUrl
|
|
22580
|
+
}
|
|
22581
|
+
);
|
|
22582
|
+
},
|
|
22539
22583
|
[PaymentMethod.VIRTUAL_BANK]: (size) => /* @__PURE__ */ React105.createElement(BankIcon, { size })
|
|
22540
22584
|
};
|
|
22541
22585
|
var DEFAULT_PAYMENT_METHOD_ICON_SIZE = 20;
|
|
@@ -22905,7 +22949,7 @@ function getCheckoutCompletionTime(checkout) {
|
|
|
22905
22949
|
// src/components/ReceiveAmount/ReceiveAmount.tsx
|
|
22906
22950
|
import React108 from "react";
|
|
22907
22951
|
var ReceiveAmount = ({ config, icon, quote }) => {
|
|
22908
|
-
const iconSrc = config.
|
|
22952
|
+
const iconSrc = config.iconSrc ?? FALLBACK_ASSET;
|
|
22909
22953
|
return /* @__PURE__ */ React108.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, icon ?? /* @__PURE__ */ React108.createElement(
|
|
22910
22954
|
AsyncImage,
|
|
22911
22955
|
{
|
|
@@ -23299,7 +23343,7 @@ function DirectExecutionSummaryHistory({
|
|
|
23299
23343
|
});
|
|
23300
23344
|
const receiveAmountLabel = useReceiveAmountLabel({
|
|
23301
23345
|
directExecutionType: directExecution?.type,
|
|
23302
|
-
isSameToken: directExecution ?
|
|
23346
|
+
isSameToken: directExecution ? isTokenEquivalent5({
|
|
23303
23347
|
firstTokenAddress: directExecution.fromTokenAddress,
|
|
23304
23348
|
firstTokenChainId: directExecution.fromChainId,
|
|
23305
23349
|
secondTokenAddress: directExecution.toTokenAddress,
|
|
@@ -23730,7 +23774,7 @@ var WithdrawalCallbackSuccess = ({
|
|
|
23730
23774
|
|
|
23731
23775
|
// src/modals/WithdrawalModal/WithdrawalContent.tsx
|
|
23732
23776
|
import {
|
|
23733
|
-
formatCryptoAndStringify as
|
|
23777
|
+
formatCryptoAndStringify as formatCryptoAndStringify3,
|
|
23734
23778
|
formatCurrencyAndStringify as formatCurrencyAndStringify6
|
|
23735
23779
|
} from "@funkit/utils";
|
|
23736
23780
|
import React133, { useCallback as useCallback27, useEffect as useEffect43, useMemo as useMemo40, useRef as useRef19, useState as useState41 } from "react";
|
|
@@ -25207,11 +25251,11 @@ function FunNotification({
|
|
|
25207
25251
|
}
|
|
25208
25252
|
|
|
25209
25253
|
// src/hooks/queries/useWithdrawalQuote.ts
|
|
25210
|
-
import { isTokenEquivalent as
|
|
25254
|
+
import { isTokenEquivalent as isTokenEquivalent6 } from "@funkit/utils";
|
|
25211
25255
|
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
25212
25256
|
|
|
25213
25257
|
// src/hooks/useIsBlacklistedWithdrawalAddress.ts
|
|
25214
|
-
import {
|
|
25258
|
+
import { isEVMAddressEquivalent as isEVMAddressEquivalent2 } from "@funkit/utils";
|
|
25215
25259
|
import { useMemo as useMemo39 } from "react";
|
|
25216
25260
|
function useIsBlacklistedWithdrawalAddress(address) {
|
|
25217
25261
|
const addressBlacklist = useDynamicConfig("blacklistedwithdrawaladdress");
|
|
@@ -25228,9 +25272,9 @@ function useIsBlacklistedWithdrawalAddress(address) {
|
|
|
25228
25272
|
return addresses;
|
|
25229
25273
|
}, [withdrawalConfig.chains]);
|
|
25230
25274
|
return Object.keys(addressBlacklist).concat(withdrawalTokenAddresses).some(
|
|
25231
|
-
(blockedAddress) =>
|
|
25232
|
-
|
|
25233
|
-
|
|
25275
|
+
(blockedAddress) => isEVMAddressEquivalent2({
|
|
25276
|
+
firstAddress: blockedAddress,
|
|
25277
|
+
secondAddress: address
|
|
25234
25278
|
})
|
|
25235
25279
|
);
|
|
25236
25280
|
}
|
|
@@ -25264,7 +25308,7 @@ function useWithdrawalQuote({
|
|
|
25264
25308
|
const enabled = isEnabled && !!apiKey && !!targetAsset && !!targetChain && !!selectedChainId && !!sourceAmountUSD && !!recipientAddress && !!selectedTokenAddress && !!isValidAddress && !!checkoutItem && !isRecipientBlacklisted && // Note: Because we update the checkoutItem with React effects, the checkout item
|
|
25265
25309
|
// may not be matching the props in intermediate renders. This ensures we don't
|
|
25266
25310
|
// fire quotes in such states.
|
|
25267
|
-
|
|
25311
|
+
isTokenEquivalent6({
|
|
25268
25312
|
firstTokenChainId: targetChain,
|
|
25269
25313
|
firstTokenAddress: targetAsset,
|
|
25270
25314
|
secondTokenChainId: selectedChainId,
|
|
@@ -25386,40 +25430,7 @@ import {
|
|
|
25386
25430
|
convertFunToRelayTokenAddress,
|
|
25387
25431
|
getRelayAssetPriceInfo
|
|
25388
25432
|
} from "@funkit/fun-relay";
|
|
25389
|
-
import { skipToken, useQuery as
|
|
25390
|
-
|
|
25391
|
-
// src/hooks/queries/useErc20Asset.ts
|
|
25392
|
-
import { getAssetErc20ByChainAndSymbol } from "@funkit/api-base";
|
|
25393
|
-
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
25394
|
-
var useErc20Asset = ({
|
|
25395
|
-
chainId: chainId2,
|
|
25396
|
-
symbol,
|
|
25397
|
-
enabled = true
|
|
25398
|
-
}) => {
|
|
25399
|
-
const { apiKey } = useFunkitConfig();
|
|
25400
|
-
const query = useQuery19({
|
|
25401
|
-
queryKey: ["erc20Asset", chainId2, symbol],
|
|
25402
|
-
queryFn: async () => {
|
|
25403
|
-
if (!apiKey || !chainId2 || !symbol) {
|
|
25404
|
-
return null;
|
|
25405
|
-
}
|
|
25406
|
-
const response = await getAssetErc20ByChainAndSymbol({
|
|
25407
|
-
chainId: chainId2,
|
|
25408
|
-
symbol,
|
|
25409
|
-
apiKey,
|
|
25410
|
-
logger
|
|
25411
|
-
});
|
|
25412
|
-
return response;
|
|
25413
|
-
},
|
|
25414
|
-
enabled: enabled && !!apiKey && !!chainId2 && !!symbol,
|
|
25415
|
-
refetchOnMount: false,
|
|
25416
|
-
refetchOnReconnect: false,
|
|
25417
|
-
refetchOnWindowFocus: false
|
|
25418
|
-
});
|
|
25419
|
-
return query;
|
|
25420
|
-
};
|
|
25421
|
-
|
|
25422
|
-
// src/hooks/useAssetPrice.ts
|
|
25433
|
+
import { skipToken, useQuery as useQuery19 } from "@tanstack/react-query";
|
|
25423
25434
|
async function getFormattedRelayAssetPriceInfo({
|
|
25424
25435
|
chainId: chainId2,
|
|
25425
25436
|
assetTokenAddress
|
|
@@ -25472,7 +25483,7 @@ function useAssetAddressPrice({
|
|
|
25472
25483
|
}) {
|
|
25473
25484
|
const { apiKey } = useFunkitConfig();
|
|
25474
25485
|
const isStablecoin = useIsStablecoin();
|
|
25475
|
-
const { data, error, isLoading } =
|
|
25486
|
+
const { data, error, isLoading } = useQuery19({
|
|
25476
25487
|
queryKey: ["getAssetPriceInfo", chainId2, assetTokenAddress],
|
|
25477
25488
|
queryFn: enabled && chainId2 && assetTokenAddress ? () => getAssetPriceInfoWithFallback({
|
|
25478
25489
|
apiKey,
|
|
@@ -25488,27 +25499,6 @@ function useAssetAddressPrice({
|
|
|
25488
25499
|
price: unitPrice !== void 0 ? unitPrice * amount : void 0
|
|
25489
25500
|
};
|
|
25490
25501
|
}
|
|
25491
|
-
var useAssetSymbolPrice = ({
|
|
25492
|
-
chainId: chainId2,
|
|
25493
|
-
symbol,
|
|
25494
|
-
refetchInterval,
|
|
25495
|
-
enabled = true
|
|
25496
|
-
}) => {
|
|
25497
|
-
const assetQuery = useErc20Asset({ chainId: chainId2, symbol, enabled });
|
|
25498
|
-
const priceQuery = useAssetAddressPrice({
|
|
25499
|
-
chainId: chainId2,
|
|
25500
|
-
assetTokenAddress: assetQuery.data?.address,
|
|
25501
|
-
symbol,
|
|
25502
|
-
refetchInterval,
|
|
25503
|
-
enabled
|
|
25504
|
-
});
|
|
25505
|
-
return {
|
|
25506
|
-
asset: assetQuery.data,
|
|
25507
|
-
error: assetQuery.error || priceQuery.error,
|
|
25508
|
-
isLoading: priceQuery.isLoading || assetQuery.isLoading,
|
|
25509
|
-
price: priceQuery.price
|
|
25510
|
-
};
|
|
25511
|
-
};
|
|
25512
25502
|
|
|
25513
25503
|
// src/hooks/useTokenAndChainDropdown.ts
|
|
25514
25504
|
import { useEffect as useEffect40, useState as useState36 } from "react";
|
|
@@ -25572,7 +25562,7 @@ var useTokenAndChainDropdown = ({
|
|
|
25572
25562
|
const tokenTransferConfig = useTokenTransferConfig(isWithdrawal);
|
|
25573
25563
|
const isLoadingAssets = tokenTransferConfig.isLoading || Object.keys(tokenTransferConfig.symbolsByChainId).length === 0;
|
|
25574
25564
|
const popularTokenSymbols = tokenTransferConfig.popularTokenSymbols ?? [];
|
|
25575
|
-
const preferredChainId = defaultValues?.chainId ?? tokenTransferConfig.defaultChainId;
|
|
25565
|
+
const preferredChainId = isWithdrawal ? tokenTransferConfig.defaultChainId ?? defaultValues?.chainId : defaultValues?.chainId ?? tokenTransferConfig.defaultChainId;
|
|
25576
25566
|
const validDefaultChainId = resolveDefaultChainId(
|
|
25577
25567
|
enabledChainSymbols,
|
|
25578
25568
|
preferredChainId
|
|
@@ -25974,7 +25964,7 @@ function WithdrawRecipientAddress({
|
|
|
25974
25964
|
// src/modals/WithdrawalModal/WithdrawAmountInput.tsx
|
|
25975
25965
|
import { RELAY_LIGHTER_CHAIN_ID as RELAY_LIGHTER_CHAIN_ID3 } from "@funkit/fun-relay";
|
|
25976
25966
|
import {
|
|
25977
|
-
formatCryptoAndStringify as
|
|
25967
|
+
formatCryptoAndStringify as formatCryptoAndStringify2,
|
|
25978
25968
|
formatCurrencyAndStringify as formatCurrencyAndStringify5
|
|
25979
25969
|
} from "@funkit/utils";
|
|
25980
25970
|
import * as DropdownMenu3 from "@radix-ui/react-dropdown-menu";
|
|
@@ -26058,7 +26048,7 @@ function WithdrawAmountInput({
|
|
|
26058
26048
|
Number(withdrawalInputAmount) * sourceTokenUsdPrice,
|
|
26059
26049
|
{ minBeforeUseScientific: 0 }
|
|
26060
26050
|
)), Number(sourceTokenBalance) > 0 && /* @__PURE__ */ React131.createElement(Text, { size: "12", color: "secondaryText" }, t("withdrawal.balance", {
|
|
26061
|
-
amount:
|
|
26051
|
+
amount: formatCryptoAndStringify2(Number(sourceTokenBalance)),
|
|
26062
26052
|
symbol: activeSymbol
|
|
26063
26053
|
})))));
|
|
26064
26054
|
}
|
|
@@ -26713,6 +26703,7 @@ function useWithdrawalAssets(config) {
|
|
|
26713
26703
|
isWithdrawal: true,
|
|
26714
26704
|
noDefaultSelection: enableEmptyWithdrawalSelection
|
|
26715
26705
|
});
|
|
26706
|
+
const { addressBySymbolByChainId } = useTokenTransferConfig(true);
|
|
26716
26707
|
return {
|
|
26717
26708
|
assets,
|
|
26718
26709
|
selectedChainId,
|
|
@@ -26723,7 +26714,8 @@ function useWithdrawalAssets(config) {
|
|
|
26723
26714
|
chainIdSortOrder,
|
|
26724
26715
|
popularTokenSymbols,
|
|
26725
26716
|
priorityTokenSymbols,
|
|
26726
|
-
isLoadingAssets
|
|
26717
|
+
isLoadingAssets,
|
|
26718
|
+
addressBySymbolByChainId
|
|
26727
26719
|
};
|
|
26728
26720
|
}
|
|
26729
26721
|
function toUsdValue(sourceAmount, sourceTokenUsdPrice) {
|
|
@@ -26747,6 +26739,7 @@ function getWithdrawButtonText({
|
|
|
26747
26739
|
isWithdrawing,
|
|
26748
26740
|
isValidAddress,
|
|
26749
26741
|
isRecipientBlacklisted,
|
|
26742
|
+
isRecipientSameAsSource,
|
|
26750
26743
|
withdrawalInputAmount,
|
|
26751
26744
|
isWithdrawAmountValid,
|
|
26752
26745
|
isWithdrawAmountTooHigh,
|
|
@@ -26765,6 +26758,9 @@ function getWithdrawButtonText({
|
|
|
26765
26758
|
if (isRecipientBlacklisted) {
|
|
26766
26759
|
return t("withdrawal.unsupportedRecipientAddress");
|
|
26767
26760
|
}
|
|
26761
|
+
if (isRecipientSameAsSource) {
|
|
26762
|
+
return t("withdrawal.recipientSameAsSource");
|
|
26763
|
+
}
|
|
26768
26764
|
if (isWithdrawAmountTooHigh) {
|
|
26769
26765
|
return t("withdrawal.maxAmountExceeded");
|
|
26770
26766
|
}
|
|
@@ -26865,16 +26861,6 @@ var WithdrawContent = ({
|
|
|
26865
26861
|
} = useLighterWithdrawal(config, setRecipientAddress);
|
|
26866
26862
|
const { address: connectedWalletAddress } = useAccount();
|
|
26867
26863
|
const sourceTokenBalance = lighterBalances[selectedSourceToken.toUpperCase()] ?? fallbackBalance;
|
|
26868
|
-
const {
|
|
26869
|
-
asset: lighterSecureMainnetAsset,
|
|
26870
|
-
price: lighterSecureSourceTokenUsdPrice
|
|
26871
|
-
} = useAssetSymbolPrice({
|
|
26872
|
-
chainId: config.sourceChainId,
|
|
26873
|
-
symbol: selectedSourceToken,
|
|
26874
|
-
refetchInterval: PRICE_REFRESH_INTERVAL,
|
|
26875
|
-
enabled: isLighterSecure
|
|
26876
|
-
});
|
|
26877
|
-
const sourceTokenUsdPrice = isLighterSecure ? lighterSecureSourceTokenUsdPrice : 1;
|
|
26878
26864
|
const [debouncedInputAmount] = useDebounce(withdrawalInputAmount, 300);
|
|
26879
26865
|
const isAmountSettled = withdrawalInputAmount === debouncedInputAmount;
|
|
26880
26866
|
const quoteInputAmount = deductLighterUnstakedFee(
|
|
@@ -26897,14 +26883,22 @@ var WithdrawContent = ({
|
|
|
26897
26883
|
chainIdSortOrder,
|
|
26898
26884
|
popularTokenSymbols,
|
|
26899
26885
|
priorityTokenSymbols,
|
|
26900
|
-
isLoadingAssets
|
|
26886
|
+
isLoadingAssets,
|
|
26887
|
+
addressBySymbolByChainId
|
|
26901
26888
|
} = useWithdrawalAssets(config);
|
|
26902
|
-
const
|
|
26903
|
-
|
|
26904
|
-
|
|
26905
|
-
|
|
26906
|
-
|
|
26889
|
+
const lighterSecureMainnetAddress = isLighterSecure ? getLighterSecureMainnetAddress(selectedSourceToken) : void 0;
|
|
26890
|
+
const { price: lighterSecureSourceTokenUsdPrice } = useAssetAddressPrice({
|
|
26891
|
+
chainId: config.sourceChainId,
|
|
26892
|
+
assetTokenAddress: lighterSecureMainnetAddress,
|
|
26893
|
+
symbol: selectedSourceToken,
|
|
26894
|
+
refetchInterval: PRICE_REFRESH_INTERVAL,
|
|
26895
|
+
enabled: isLighterSecure
|
|
26896
|
+
});
|
|
26897
|
+
const sourceTokenUsdPrice = isLighterSecure ? lighterSecureSourceTokenUsdPrice : 1;
|
|
26898
|
+
const targetAssetAddress = selectedChainId !== void 0 && selectedToken ? addressBySymbolByChainId[selectedChainId]?.[selectedToken] : void 0;
|
|
26899
|
+
const { error: targetAssetFetchError, price: targetUnitPrice } = useAssetAddressPrice({
|
|
26907
26900
|
chainId: selectedChainId?.toString(),
|
|
26901
|
+
assetTokenAddress: targetAssetAddress,
|
|
26908
26902
|
symbol: selectedToken,
|
|
26909
26903
|
refetchInterval: PRICE_REFRESH_INTERVAL
|
|
26910
26904
|
});
|
|
@@ -26922,17 +26916,17 @@ var WithdrawContent = ({
|
|
|
26922
26916
|
}, 0);
|
|
26923
26917
|
}, [targetAssetAmount, updateTargetAssetAmount]);
|
|
26924
26918
|
useEffect43(() => {
|
|
26925
|
-
if (!
|
|
26919
|
+
if (!targetAssetAddress || !selectedChainId || !selectedToken) {
|
|
26926
26920
|
return;
|
|
26927
26921
|
}
|
|
26928
26922
|
updateTargetAsset({
|
|
26929
|
-
targetAsset:
|
|
26923
|
+
targetAsset: targetAssetAddress,
|
|
26930
26924
|
targetChain: selectedChainId.toString(),
|
|
26931
|
-
targetAssetTicker:
|
|
26925
|
+
targetAssetTicker: selectedToken,
|
|
26932
26926
|
targetAssetMinAmount: 0,
|
|
26933
26927
|
iconSrc: getTokenIconUrl(selectedToken)
|
|
26934
26928
|
});
|
|
26935
|
-
}, [
|
|
26929
|
+
}, [targetAssetAddress, updateTargetAsset, selectedChainId, selectedToken]);
|
|
26936
26930
|
const { apiKey } = useFunkitConfig();
|
|
26937
26931
|
const {
|
|
26938
26932
|
data: isRisky,
|
|
@@ -26980,6 +26974,12 @@ var WithdrawContent = ({
|
|
|
26980
26974
|
selectedSourceToken,
|
|
26981
26975
|
selectedChainId
|
|
26982
26976
|
});
|
|
26977
|
+
const isRelaySelfTransfer = isNoOpSelfWithdrawal({
|
|
26978
|
+
config,
|
|
26979
|
+
recipientAddress,
|
|
26980
|
+
selectedChainId,
|
|
26981
|
+
destinationTokenAddress: targetAssetAddress
|
|
26982
|
+
});
|
|
26983
26983
|
const {
|
|
26984
26984
|
isLoading: isQuoteLoading,
|
|
26985
26985
|
data: quote,
|
|
@@ -26989,11 +26989,11 @@ var WithdrawContent = ({
|
|
|
26989
26989
|
config,
|
|
26990
26990
|
recipientAddress: isLighterSecure ? "" : recipientAddress,
|
|
26991
26991
|
selectedChainId: selectedChainId?.toString(),
|
|
26992
|
-
selectedTokenAddress: isLighterSecure ? void 0 :
|
|
26992
|
+
selectedTokenAddress: isLighterSecure ? void 0 : targetAssetAddress,
|
|
26993
26993
|
selectedTokenSymbol: isLighterSecure ? void 0 : selectedToken,
|
|
26994
|
-
// Quote only when risk is clear (fail-closed)
|
|
26995
|
-
// settled
|
|
26996
|
-
isEnabled: isRisky === false && isWithdrawAmountValid && isAmountSettled
|
|
26994
|
+
// Quote only when risk is clear (fail-closed), the amount is valid and
|
|
26995
|
+
// settled, and it isn't a no-op self-transfer Relay would reject.
|
|
26996
|
+
isEnabled: isRisky === false && isWithdrawAmountValid && isAmountSettled && !isRelaySelfTransfer
|
|
26997
26997
|
});
|
|
26998
26998
|
const lighterAssetIndex = isLighterSecure ? resolveLighterAssetIndex(lighterAssets, selectedSourceToken) : void 0;
|
|
26999
26999
|
const submitLighterSecureWithdrawal = () => {
|
|
@@ -27010,7 +27010,7 @@ var WithdrawContent = ({
|
|
|
27010
27010
|
// L1 destination matches the user's L2 source-token selection. Falls
|
|
27011
27011
|
// back to '0x' only if the price/asset hook hasn't resolved — the
|
|
27012
27012
|
// submit button is gated on `lighterAssetIndex` but not on this asset.
|
|
27013
|
-
tokenAddress:
|
|
27013
|
+
tokenAddress: lighterSecureMainnetAddress ?? "0x",
|
|
27014
27014
|
chainId: mainnet8.id,
|
|
27015
27015
|
lighterAssetIndex,
|
|
27016
27016
|
userInputAmount: withdrawalInputAmount
|
|
@@ -27038,7 +27038,7 @@ var WithdrawContent = ({
|
|
|
27038
27038
|
});
|
|
27039
27039
|
throw missingQuoteError;
|
|
27040
27040
|
}
|
|
27041
|
-
if (!
|
|
27041
|
+
if (!targetAssetAddress || !selectedChainId) {
|
|
27042
27042
|
const missingTargetAssetError = new Error(
|
|
27043
27043
|
"Target asset info is not available"
|
|
27044
27044
|
);
|
|
@@ -27065,7 +27065,7 @@ var WithdrawContent = ({
|
|
|
27065
27065
|
destinationAddress: recipientAddress,
|
|
27066
27066
|
withdrawalUSD: usdValue.toString(),
|
|
27067
27067
|
tokenSymbol: token,
|
|
27068
|
-
tokenAddress:
|
|
27068
|
+
tokenAddress: targetAssetAddress,
|
|
27069
27069
|
chainId: selectedChainId,
|
|
27070
27070
|
userInputAmount: withdrawalInputAmount,
|
|
27071
27071
|
quote: quote.finalEstimation
|
|
@@ -27159,7 +27159,7 @@ var WithdrawContent = ({
|
|
|
27159
27159
|
const baseChecks = !!recipientAddress && !!withdrawalInputAmount && !hasAmountError && !hasAddressError && // Fail closed: require a definitive "not risky" result. `undefined`
|
|
27160
27160
|
// (check in flight, query disabled, or API error) must block — a
|
|
27161
27161
|
// Chainalysis outage or a non-screenable address is not a green light.
|
|
27162
|
-
isRisky === false && !isRecipientBlacklisted;
|
|
27162
|
+
isRisky === false && !isRecipientBlacklisted && !isRelaySelfTransfer;
|
|
27163
27163
|
if (!baseChecks) {
|
|
27164
27164
|
return false;
|
|
27165
27165
|
}
|
|
@@ -27253,7 +27253,7 @@ var WithdrawContent = ({
|
|
|
27253
27253
|
size: "withdrawalYouWillReceive",
|
|
27254
27254
|
weight: "withdrawalYouWillReceiveValueCrypto"
|
|
27255
27255
|
},
|
|
27256
|
-
|
|
27256
|
+
formatCryptoAndStringify3(receiveAmountCrypto, selectedToken)
|
|
27257
27257
|
), /* @__PURE__ */ React133.createElement(
|
|
27258
27258
|
Text,
|
|
27259
27259
|
{
|
|
@@ -27275,6 +27275,7 @@ var WithdrawContent = ({
|
|
|
27275
27275
|
isWithdrawing,
|
|
27276
27276
|
isValidAddress,
|
|
27277
27277
|
isRecipientBlacklisted,
|
|
27278
|
+
isRecipientSameAsSource: isRelaySelfTransfer,
|
|
27278
27279
|
withdrawalInputAmount,
|
|
27279
27280
|
isWithdrawAmountValid,
|
|
27280
27281
|
isWithdrawAmountTooHigh,
|
|
@@ -27394,12 +27395,12 @@ import React139 from "react";
|
|
|
27394
27395
|
|
|
27395
27396
|
// src/hooks/queries/useWithdrawFops.ts
|
|
27396
27397
|
import { RailConfigType as RailConfigType2, getFops as getFops3 } from "@funkit/api-base";
|
|
27397
|
-
import { useQuery as
|
|
27398
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
27398
27399
|
import { useMemo as useMemo41 } from "react";
|
|
27399
27400
|
|
|
27400
27401
|
// src/utils/swappedRouteOverride.ts
|
|
27401
27402
|
import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9 } from "@funkit/chains";
|
|
27402
|
-
import { isTokenEquivalent as
|
|
27403
|
+
import { isTokenEquivalent as isTokenEquivalent7 } from "@funkit/utils";
|
|
27403
27404
|
var isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
27404
27405
|
var isSupportedChainId = (value) => typeof value === "string" && /^\d+$/.test(value) && Boolean(FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9[Number(value)]);
|
|
27405
27406
|
var isEvmAddress = (value) => typeof value === "string" && /^0x[a-fA-F0-9]{40}$/.test(value);
|
|
@@ -27408,7 +27409,7 @@ function isWellFormedOverride(override) {
|
|
|
27408
27409
|
}
|
|
27409
27410
|
function findSwappedSourceOverride(overrides, source) {
|
|
27410
27411
|
return overrides?.find(
|
|
27411
|
-
(override) => isWellFormedOverride(override) &&
|
|
27412
|
+
(override) => isWellFormedOverride(override) && isTokenEquivalent7({
|
|
27412
27413
|
firstTokenChainId: override.when.chainId,
|
|
27413
27414
|
firstTokenAddress: override.when.tokenAddress,
|
|
27414
27415
|
secondTokenChainId: source.chainId,
|
|
@@ -27449,7 +27450,7 @@ var useWithdrawFops = (params) => {
|
|
|
27449
27450
|
const userId = userInfo.id;
|
|
27450
27451
|
const countryCode = userIpInfo?.alpha2;
|
|
27451
27452
|
const isEnabled = (params.enabled ?? true) && !!apiKey && !!userId && !!userInfo.address && !!countryCode && !!params.sourceChainId && !!params.sourceTokenAddress && !isSwappedCurrencyCodeLoading;
|
|
27452
|
-
const query =
|
|
27453
|
+
const query = useQuery20({
|
|
27453
27454
|
// `prefillFiatEmail` is intentionally NOT in the queryKey: it's read inside
|
|
27454
27455
|
// `queryFn` and captured at fetch time, so post-mount changes don't trigger a refetch
|
|
27455
27456
|
queryKey: [
|
|
@@ -29119,14 +29120,14 @@ var useActivityTraversal = () => {
|
|
|
29119
29120
|
};
|
|
29120
29121
|
|
|
29121
29122
|
// src/modals/ProfileDetails/ProfileDetails.tsx
|
|
29122
|
-
import React277, { useCallback as
|
|
29123
|
+
import React277, { useCallback as useCallback54, useState as useState80 } from "react";
|
|
29123
29124
|
|
|
29124
29125
|
// src/components/ModalHeightAnimationLayer/FunCheckoutModalHeightAnimationWrapper.tsx
|
|
29125
29126
|
import React264 from "react";
|
|
29126
29127
|
|
|
29127
29128
|
// src/modals/CheckoutModal/stepTransition.ts
|
|
29128
29129
|
import {
|
|
29129
|
-
useCallback as
|
|
29130
|
+
useCallback as useCallback52,
|
|
29130
29131
|
useEffect as useEffect71,
|
|
29131
29132
|
useRef as useRef36,
|
|
29132
29133
|
useState as useState77
|
|
@@ -30590,10 +30591,10 @@ import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
|
30590
30591
|
import React176, { useEffect as useEffect51, useRef as useRef24, useState as useState49 } from "react";
|
|
30591
30592
|
import { createPortal as createPortal9 } from "react-dom";
|
|
30592
30593
|
|
|
30593
|
-
// src/
|
|
30594
|
+
// src/hooks/usePolymarketAccountBalances.ts
|
|
30594
30595
|
import {
|
|
30595
30596
|
skipToken as skipToken2,
|
|
30596
|
-
useQuery as
|
|
30597
|
+
useQuery as useQuery21,
|
|
30597
30598
|
useQueryClient as useQueryClient5
|
|
30598
30599
|
} from "@tanstack/react-query";
|
|
30599
30600
|
import * as dnum7 from "dnum";
|
|
@@ -30653,7 +30654,7 @@ function useAccountBalance(account, refetchIntervalMs) {
|
|
|
30653
30654
|
const queryClient = useQueryClient5();
|
|
30654
30655
|
const getBalanceUsd = account?.getBalanceUsd;
|
|
30655
30656
|
const address = account?.address;
|
|
30656
|
-
const query =
|
|
30657
|
+
const query = useQuery21({
|
|
30657
30658
|
queryKey: polymarketAccountBalanceQueryKey(address),
|
|
30658
30659
|
// `skipToken` disables the query when the account isn't configured (the
|
|
30659
30660
|
// perps-transfer config is optional). It is *not* a fallback for a missing
|
|
@@ -31520,6 +31521,7 @@ var FunTwoFaInput = ({
|
|
|
31520
31521
|
wrap: "nowrap",
|
|
31521
31522
|
justifyContent: "center",
|
|
31522
31523
|
padding: "12",
|
|
31524
|
+
fontFamily: "body",
|
|
31523
31525
|
fontWeight: "medium",
|
|
31524
31526
|
borderStyle: "solid",
|
|
31525
31527
|
borderWidth: "1",
|
|
@@ -32560,8 +32562,8 @@ var ChainInfoBanners = ({ chainId: chainId2 }) => {
|
|
|
32560
32562
|
// src/components/FunTransactionSummary/PaymentAmountSummary.tsx
|
|
32561
32563
|
import {
|
|
32562
32564
|
formatCurrencyAndStringify as formatCurrencyAndStringify7,
|
|
32563
|
-
|
|
32564
|
-
isTokenEquivalent as
|
|
32565
|
+
isEVMAddressEquivalent as isEVMAddressEquivalent3,
|
|
32566
|
+
isTokenEquivalent as isTokenEquivalent8
|
|
32565
32567
|
} from "@funkit/utils";
|
|
32566
32568
|
import NumberFlow from "@number-flow/react";
|
|
32567
32569
|
import { motion as motion11 } from "motion/react";
|
|
@@ -32602,7 +32604,7 @@ function PaymentAmountSummary({
|
|
|
32602
32604
|
const isBrokeragePayment = paymentMethod === PaymentMethod.BROKERAGE;
|
|
32603
32605
|
const receiveAmountLabel = useReceiveAmountLabel({
|
|
32604
32606
|
directExecutionType,
|
|
32605
|
-
isSameToken:
|
|
32607
|
+
isSameToken: isTokenEquivalent8({
|
|
32606
32608
|
firstTokenAddress: sourceTokenAddress,
|
|
32607
32609
|
firstTokenChainId: sourceTokenChainId,
|
|
32608
32610
|
secondTokenAddress: targetTokenAddress,
|
|
@@ -32612,21 +32614,17 @@ function PaymentAmountSummary({
|
|
|
32612
32614
|
const sourceTokenAmount = displayAmounts ? floorToDecimals(Number.parseFloat(displayAmounts.sendAmount), 6) : quote?.finalPaymentTokenAmount ? floorToDecimals(Number.parseFloat(quote.finalPaymentTokenAmount), 6) : void 0;
|
|
32613
32615
|
const paymentTokenUsdAmount = quote ? formatCurrencyAndStringify7(quote.baseQuote.estTotalUsd) : void 0;
|
|
32614
32616
|
const targetTokenAmount = displayAmounts?.receiveAmount != null ? floorToDecimals(Number.parseFloat(displayAmounts.receiveAmount), 6) : checkoutConfig?.targetAssetAmount ?? 0;
|
|
32615
|
-
const { finalizedTokenAmount, finalizedTokenSymbol, finalizedTokenIcon } = computeDisplayDestinationToken(checkoutConfig, targetTokenAmount);
|
|
32616
32617
|
const targetItemName = checkoutConfig?.targetAssetTicker || checkoutConfig?.checkoutItemTitle;
|
|
32617
32618
|
const sourceChainId = sourceAssetInfo?.chainId;
|
|
32618
32619
|
const areSameChains = sourceChainId === targetChainId;
|
|
32619
32620
|
const sourceIcon = sourceAssetInfo?.iconSrc ?? void 0;
|
|
32620
|
-
const isSameTokenAddress =
|
|
32621
|
-
|
|
32622
|
-
|
|
32621
|
+
const isSameTokenAddress = isEVMAddressEquivalent3({
|
|
32622
|
+
firstAddress: sourceTokenAddress,
|
|
32623
|
+
secondAddress: targetTokenAddress
|
|
32623
32624
|
});
|
|
32624
32625
|
const isExactSameToken = areSameChains && isSameTokenAddress;
|
|
32625
|
-
const hasFinalizedToken = Boolean(
|
|
32626
|
-
checkoutItem?.initSettings.config.finalizedToken
|
|
32627
|
-
);
|
|
32628
32626
|
const collapsesToReceive = isExactSameToken || isDirectTransfer;
|
|
32629
|
-
const showYouWillPaySummary = !collapsesToReceive && !isCardPayment
|
|
32627
|
+
const showYouWillPaySummary = !collapsesToReceive && !isCardPayment;
|
|
32630
32628
|
const swapImpactPct = (() => {
|
|
32631
32629
|
if (isAcrossRoute(quote?.baseQuote.metadata)) {
|
|
32632
32630
|
return 0;
|
|
@@ -32664,7 +32662,7 @@ function PaymentAmountSummary({
|
|
|
32664
32662
|
isLoading,
|
|
32665
32663
|
testId: "payment-you-send"
|
|
32666
32664
|
}
|
|
32667
|
-
), /* @__PURE__ */ React190.createElement(FunTxSummaryDivider, null)),
|
|
32665
|
+
), /* @__PURE__ */ React190.createElement(FunTxSummaryDivider, null)), /* @__PURE__ */ React190.createElement(
|
|
32668
32666
|
PaymentAmountSummaryItem,
|
|
32669
32667
|
{
|
|
32670
32668
|
labelIcon: uiCustomizations.customIcons.youReceive,
|
|
@@ -32691,27 +32689,6 @@ function PaymentAmountSummary({
|
|
|
32691
32689
|
isLoading,
|
|
32692
32690
|
testId: "payment-you-receive"
|
|
32693
32691
|
}
|
|
32694
|
-
), hasFinalizedToken && /* @__PURE__ */ React190.createElement(
|
|
32695
|
-
PaymentAmountSummaryItem,
|
|
32696
|
-
{
|
|
32697
|
-
label: receiveAmountLabel,
|
|
32698
|
-
paymentTokenAmount: finalizedTokenAmount * (1 + swapImpactPct / 100),
|
|
32699
|
-
valueSymbol: finalizedTokenSymbol ?? "",
|
|
32700
|
-
icon: /* @__PURE__ */ React190.createElement(
|
|
32701
|
-
FunAssetAvatar,
|
|
32702
|
-
{
|
|
32703
|
-
largeChainIcon: true,
|
|
32704
|
-
assetIconSize: "16",
|
|
32705
|
-
assetSrc: finalizedTokenIcon ?? void 0,
|
|
32706
|
-
chainId: areSameChains ? void 0 : targetChainId,
|
|
32707
|
-
prioritizeDefaults: false,
|
|
32708
|
-
assetName: "checkout-asset"
|
|
32709
|
-
}
|
|
32710
|
-
),
|
|
32711
|
-
paymentUsdAmount: uiCustomizations.confirmationScreen.showReceiveAmountUsd && receiveTokenUsdAmount ? receiveTokenUsdAmount : void 0,
|
|
32712
|
-
isLoading,
|
|
32713
|
-
testId: "payment-you-receive"
|
|
32714
|
-
}
|
|
32715
32692
|
));
|
|
32716
32693
|
}
|
|
32717
32694
|
function PaymentAmountSummaryItem({
|
|
@@ -32992,17 +32969,17 @@ import {
|
|
|
32992
32969
|
import { permitTypedData, reserve, supply } from "@aave/client/actions";
|
|
32993
32970
|
import { sendWith, signERC20PermitWith } from "@aave/client/viem";
|
|
32994
32971
|
import { DirectExecutionType as DirectExecutionType4, createDirectExecution } from "@funkit/api-base";
|
|
32995
|
-
import { useQuery as
|
|
32972
|
+
import { useQuery as useQuery22 } from "@tanstack/react-query";
|
|
32996
32973
|
import * as dnum8 from "dnum";
|
|
32997
32974
|
import { useCallback as useCallback36, useState as useState54 } from "react";
|
|
32998
32975
|
import { erc20Abi as erc20Abi6 } from "viem";
|
|
32999
32976
|
|
|
33000
32977
|
// src/utils/isMainnetUsdt.ts
|
|
33001
|
-
import { isTokenEquivalent as
|
|
32978
|
+
import { isTokenEquivalent as isTokenEquivalent9 } from "@funkit/utils";
|
|
33002
32979
|
import { mainnet as mainnet10 } from "viem/chains";
|
|
33003
32980
|
var USDT_MAINNET_ADDRESS = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
|
|
33004
32981
|
function isMainnetUsdt(chainId2, address) {
|
|
33005
|
-
return
|
|
32982
|
+
return isTokenEquivalent9({
|
|
33006
32983
|
firstTokenAddress: address,
|
|
33007
32984
|
firstTokenChainId: chainId2.toString(),
|
|
33008
32985
|
secondTokenAddress: USDT_MAINNET_ADDRESS,
|
|
@@ -33231,7 +33208,7 @@ function useAaveTargetPoolAllowance(checkoutItem, owner) {
|
|
|
33231
33208
|
const targetAsset = config?.targetAsset;
|
|
33232
33209
|
const market = targetChainStr ? AAVE_MARKET_ADDRESS_BY_CHAIN[targetChainStr] : void 0;
|
|
33233
33210
|
const wagmiConfig = useConfig();
|
|
33234
|
-
const { data } =
|
|
33211
|
+
const { data } = useQuery22({
|
|
33235
33212
|
queryKey: [
|
|
33236
33213
|
"aaveTargetPoolAllowance",
|
|
33237
33214
|
targetChainStr,
|
|
@@ -33263,7 +33240,7 @@ function useAaveTargetReservePermit(checkoutItem) {
|
|
|
33263
33240
|
const targetChainStr = config?.targetChain;
|
|
33264
33241
|
const targetAsset = config?.targetAsset;
|
|
33265
33242
|
const market = targetChainStr ? AAVE_MARKET_ADDRESS_BY_CHAIN[targetChainStr] : void 0;
|
|
33266
|
-
const { data } =
|
|
33243
|
+
const { data } = useQuery22({
|
|
33267
33244
|
queryKey: [
|
|
33268
33245
|
"aaveReservePermitSupported",
|
|
33269
33246
|
targetChainStr,
|
|
@@ -33452,7 +33429,7 @@ function useAaveNativeSupply() {
|
|
|
33452
33429
|
// src/modals/CheckoutModal/InputAmount/useNadoDirectTransfer.ts
|
|
33453
33430
|
import { DirectExecutionType as DirectExecutionType5, createDirectExecution as createDirectExecution2 } from "@funkit/api-base";
|
|
33454
33431
|
import {
|
|
33455
|
-
isTokenEquivalent as
|
|
33432
|
+
isTokenEquivalent as isTokenEquivalent10
|
|
33456
33433
|
} from "@funkit/utils";
|
|
33457
33434
|
import { useCallback as useCallback37, useRef as useRef26, useState as useState55 } from "react";
|
|
33458
33435
|
import { erc20Abi as erc20Abi7 } from "viem";
|
|
@@ -33546,7 +33523,7 @@ function isNadoDirectTransferContext({
|
|
|
33546
33523
|
if (!isNadoCustomer(apiKey) || !checkoutConfig.customRecipient || !isXstockTarget) {
|
|
33547
33524
|
return false;
|
|
33548
33525
|
}
|
|
33549
|
-
const matchesTarget =
|
|
33526
|
+
const matchesTarget = isTokenEquivalent10({
|
|
33550
33527
|
firstTokenChainId: String(sourceAsset.chainId),
|
|
33551
33528
|
firstTokenAddress: sourceAsset.address,
|
|
33552
33529
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -33558,7 +33535,7 @@ function isNadoDirectTransferContext({
|
|
|
33558
33535
|
if (!wrappedTokenAddress) {
|
|
33559
33536
|
return false;
|
|
33560
33537
|
}
|
|
33561
|
-
return
|
|
33538
|
+
return isTokenEquivalent10({
|
|
33562
33539
|
firstTokenChainId: String(sourceAsset.chainId),
|
|
33563
33540
|
firstTokenAddress: sourceAsset.address,
|
|
33564
33541
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -33770,9 +33747,6 @@ var AnimatedDollarValue = forwardRef5((props, ref) => {
|
|
|
33770
33747
|
return /* @__PURE__ */ React195.createElement(NumberFlow2, { ...restProps, ref, value, format: formatOptions });
|
|
33771
33748
|
});
|
|
33772
33749
|
|
|
33773
|
-
// src/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.tsx
|
|
33774
|
-
import { formatCryptoAndStringify as formatCryptoAndStringify5 } from "@funkit/utils";
|
|
33775
|
-
|
|
33776
33750
|
// src/modals/CheckoutModal/ConfirmationStep/ConfirmationStepLoading.tsx
|
|
33777
33751
|
import React196 from "react";
|
|
33778
33752
|
import { createPortal as createPortal13 } from "react-dom";
|
|
@@ -33865,10 +33839,6 @@ function CheckoutPrimaryInfo({
|
|
|
33865
33839
|
const isStablecoin = useIsStablecoin();
|
|
33866
33840
|
const checkoutValueRaw = inputFiatAmount != null ? inputFiatAmount : displayAmounts?.confirmationScreenDisplayAmount ? Number.parseFloat(displayAmounts.confirmationScreenDisplayAmount) : isStablecoin(config.targetAssetTicker) ? config.targetAssetAmount : usdAmount;
|
|
33867
33841
|
const checkoutValue = checkoutValueRaw != null ? floorToDecimals(checkoutValueRaw, 2) : void 0;
|
|
33868
|
-
const { finalizedTokenAmount } = computeDisplayDestinationToken(
|
|
33869
|
-
config,
|
|
33870
|
-
config.targetAssetAmount || 0
|
|
33871
|
-
);
|
|
33872
33842
|
const doShowTokenAmount = showTokenAmount && !config.generateActionsParams;
|
|
33873
33843
|
return /* @__PURE__ */ React197.createElement(
|
|
33874
33844
|
Box,
|
|
@@ -33878,19 +33848,7 @@ function CheckoutPrimaryInfo({
|
|
|
33878
33848
|
alignItems: showLeftAlignedDollarValueWithLabel ? "flex-start" : "center",
|
|
33879
33849
|
justifyContent: "center"
|
|
33880
33850
|
},
|
|
33881
|
-
isLoading ? /* @__PURE__ */ React197.createElement(DollarValueSkeleton, null) :
|
|
33882
|
-
Text,
|
|
33883
|
-
{
|
|
33884
|
-
font: "inputAmount",
|
|
33885
|
-
size: "dollarValue",
|
|
33886
|
-
weight: "inputAmount",
|
|
33887
|
-
textAlign: showLeftAlignedDollarValueWithLabel ? "left" : "center"
|
|
33888
|
-
},
|
|
33889
|
-
showLeftAlignedDollarValueWithLabel && /* @__PURE__ */ React197.createElement("span", { style: { textTransform: "uppercase", whiteSpace: "pre" } }, t("common.deposit"), " "),
|
|
33890
|
-
formatCryptoAndStringify5(config.targetAssetAmount || 0),
|
|
33891
|
-
" ",
|
|
33892
|
-
config.targetAssetTicker
|
|
33893
|
-
) : checkoutValue ? /* @__PURE__ */ React197.createElement(
|
|
33851
|
+
isLoading ? /* @__PURE__ */ React197.createElement(DollarValueSkeleton, null) : checkoutValue ? /* @__PURE__ */ React197.createElement(
|
|
33894
33852
|
Box,
|
|
33895
33853
|
{
|
|
33896
33854
|
fontFamily: "inputAmount",
|
|
@@ -33921,10 +33879,7 @@ function CheckoutPrimaryInfo({
|
|
|
33921
33879
|
largeChainIcon: true,
|
|
33922
33880
|
prioritizeDefaults: false
|
|
33923
33881
|
}
|
|
33924
|
-
) : null, /* @__PURE__ */ React197.createElement(Text, { color: "tertiaryText", size: "14", weight: "medium" }, getCheckoutItemDisplay({
|
|
33925
|
-
checkoutConfig: config,
|
|
33926
|
-
overrideAmount: finalizedTokenAmount
|
|
33927
|
-
})))
|
|
33882
|
+
) : null, /* @__PURE__ */ React197.createElement(Text, { color: "tertiaryText", size: "14", weight: "medium" }, getCheckoutItemDisplay({ checkoutConfig: config })))
|
|
33928
33883
|
);
|
|
33929
33884
|
}
|
|
33930
33885
|
|
|
@@ -35048,12 +35003,6 @@ function ConfirmationStep({
|
|
|
35048
35003
|
const isQuoteLoading = isInitialQuoting || isQuoting;
|
|
35049
35004
|
const isStepLoading = isInitialQuoting || isContinuing || isRefreshing || aaveSupply.isPending || nadoDirectTransfer.isPending;
|
|
35050
35005
|
const customRecipient = checkoutItem?.initSettings.config.customRecipient;
|
|
35051
|
-
const hasFinalizedToken = Boolean(checkoutConfig?.finalizedToken);
|
|
35052
|
-
const isVaultDeposit = checkoutConfig && isVaultDepositCheckout(checkoutConfig, {
|
|
35053
|
-
chainId: checkoutItem.selectedSourceAssetInfo.chainId,
|
|
35054
|
-
tokenAddress: checkoutItem.selectedSourceAssetInfo.address || "0x"
|
|
35055
|
-
});
|
|
35056
|
-
const hidePrimaryInfo = hasFinalizedToken && !isVaultDeposit;
|
|
35057
35006
|
const displayAmounts = useMemo50(() => {
|
|
35058
35007
|
if (!latestQuote || !checkoutConfig?.targetAssetAmount) {
|
|
35059
35008
|
return null;
|
|
@@ -35081,7 +35030,7 @@ function ConfirmationStep({
|
|
|
35081
35030
|
isLoading: !resolvedHealthFactor && isQuoteLoading
|
|
35082
35031
|
} : void 0;
|
|
35083
35032
|
const isExactIn = quoteBuilder.isExactIn();
|
|
35084
|
-
const hasStaticPrimaryInfoValue = isExactIn && checkoutItem?.inputFiatAmount != null || !isExactIn && !!checkoutConfig?.targetAssetAmount &&
|
|
35033
|
+
const hasStaticPrimaryInfoValue = isExactIn && checkoutItem?.inputFiatAmount != null || !isExactIn && !!checkoutConfig?.targetAssetAmount && isStablecoin(checkoutConfig.targetAssetTicker);
|
|
35085
35034
|
const checkoutId = checkoutItem?.id;
|
|
35086
35035
|
const isReady = !!checkoutItem?.finalDollarValue && !isQuoteLoading;
|
|
35087
35036
|
useEffect57(() => {
|
|
@@ -35138,7 +35087,7 @@ function ConfirmationStep({
|
|
|
35138
35087
|
gap: "confirmationStepVerticalGap",
|
|
35139
35088
|
paddingTop: "confirmationStepMarginTop"
|
|
35140
35089
|
},
|
|
35141
|
-
checkoutItem &&
|
|
35090
|
+
checkoutItem && /* @__PURE__ */ React202.createElement(
|
|
35142
35091
|
CheckoutPrimaryInfo,
|
|
35143
35092
|
{
|
|
35144
35093
|
showLeftAlignedDollarValueWithLabel,
|
|
@@ -35221,7 +35170,7 @@ import React217, { useEffect as useEffect60 } from "react";
|
|
|
35221
35170
|
|
|
35222
35171
|
// src/hooks/queries/useMeldCurrencies.ts
|
|
35223
35172
|
import { getMeldSupportedFiat } from "@funkit/api-base";
|
|
35224
|
-
import { useQuery as
|
|
35173
|
+
import { useQuery as useQuery23 } from "@tanstack/react-query";
|
|
35225
35174
|
var getPriority = (currencyCode) => {
|
|
35226
35175
|
if (currencyCode === "USD") {
|
|
35227
35176
|
return 0;
|
|
@@ -35233,7 +35182,7 @@ var getPriority = (currencyCode) => {
|
|
|
35233
35182
|
};
|
|
35234
35183
|
var useMeldCurrencies = (isEnabled = true) => {
|
|
35235
35184
|
const { apiKey } = useFunkitConfig();
|
|
35236
|
-
const query =
|
|
35185
|
+
const query = useQuery23({
|
|
35237
35186
|
queryKey: ["meld", "currencies"],
|
|
35238
35187
|
queryFn: async () => {
|
|
35239
35188
|
if (!apiKey) {
|
|
@@ -35259,12 +35208,12 @@ var useMeldCurrencies = (isEnabled = true) => {
|
|
|
35259
35208
|
|
|
35260
35209
|
// src/hooks/queries/useMeldDefaultCurrency.ts
|
|
35261
35210
|
import { getMeldDefaultFiat } from "@funkit/api-base";
|
|
35262
|
-
import { useQuery as
|
|
35211
|
+
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
35263
35212
|
var useMeldDefaultCurrency = (paymentMethod) => {
|
|
35264
35213
|
const { apiKey } = useFunkitConfig();
|
|
35265
35214
|
const { userIpInfo } = useFunkitUserIp();
|
|
35266
35215
|
const enableMeld = useIsMeldEnabled();
|
|
35267
|
-
const query =
|
|
35216
|
+
const query = useQuery24({
|
|
35268
35217
|
queryKey: ["meld", "defaultCurrency", paymentMethod],
|
|
35269
35218
|
queryFn: async () => {
|
|
35270
35219
|
if (!apiKey) {
|
|
@@ -35290,7 +35239,7 @@ var useMeldDefaultCurrency = (paymentMethod) => {
|
|
|
35290
35239
|
// src/hooks/queries/useMeldLimits.ts
|
|
35291
35240
|
import { getMeldFiatLimits } from "@funkit/api-base";
|
|
35292
35241
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify8 } from "@funkit/utils";
|
|
35293
|
-
import { useQuery as
|
|
35242
|
+
import { useQuery as useQuery25 } from "@tanstack/react-query";
|
|
35294
35243
|
|
|
35295
35244
|
// src/consts/meld.ts
|
|
35296
35245
|
var MELD_MIN_LIMIT_BUFFER = 5;
|
|
@@ -35340,7 +35289,7 @@ var useMeldLimits = (isEnabled = true) => {
|
|
|
35340
35289
|
const { userIpInfo } = useFunkitUserIp();
|
|
35341
35290
|
const cryptoCurrency = useMeldCryptoCurrencyCode();
|
|
35342
35291
|
const countryCode = userIpInfo?.alpha2;
|
|
35343
|
-
const query =
|
|
35292
|
+
const query = useQuery25({
|
|
35344
35293
|
queryKey: ["meld", "limits", countryCode, cryptoCurrency],
|
|
35345
35294
|
queryFn: async () => {
|
|
35346
35295
|
if (!apiKey || !countryCode) {
|
|
@@ -35428,8 +35377,8 @@ var useMeldLimitError = (amount, fiatCurrency) => {
|
|
|
35428
35377
|
// src/modals/CheckoutModal/InputAmount/InputAmountLoaded.tsx
|
|
35429
35378
|
import { defaultDynamicConfigs as fallbackDynamicConfigs } from "@funkit/connect-core";
|
|
35430
35379
|
import {
|
|
35431
|
-
formatCryptoAndStringify as
|
|
35432
|
-
isTokenEquivalent as
|
|
35380
|
+
formatCryptoAndStringify as formatCryptoAndStringify5,
|
|
35381
|
+
isTokenEquivalent as isTokenEquivalent12,
|
|
35433
35382
|
round as round2
|
|
35434
35383
|
} from "@funkit/utils";
|
|
35435
35384
|
import * as dnum11 from "dnum";
|
|
@@ -36781,11 +36730,7 @@ function useTextMeasurer(inputRef) {
|
|
|
36781
36730
|
}
|
|
36782
36731
|
|
|
36783
36732
|
// src/modals/CheckoutModal/InputAmount/state.ts
|
|
36784
|
-
import {
|
|
36785
|
-
isTokenAddressEquivalent as isTokenAddressEquivalent3,
|
|
36786
|
-
isTokenEquivalent as isTokenEquivalent10,
|
|
36787
|
-
round
|
|
36788
|
-
} from "@funkit/utils";
|
|
36733
|
+
import { isEVMAddressEquivalent as isEVMAddressEquivalent4, isTokenEquivalent as isTokenEquivalent11, round } from "@funkit/utils";
|
|
36789
36734
|
import * as dnum10 from "dnum";
|
|
36790
36735
|
import { mainnet as mainnet11 } from "viem/chains";
|
|
36791
36736
|
function resolveUnitPrice(isExactIn, sourceHolding, targetUnitPrice) {
|
|
@@ -36958,7 +36903,7 @@ function isEffectivelySameAsset(checkoutConfig, sourceToken, apiKey) {
|
|
|
36958
36903
|
if (!sourceToken) {
|
|
36959
36904
|
return false;
|
|
36960
36905
|
}
|
|
36961
|
-
if (
|
|
36906
|
+
if (isTokenEquivalent11({
|
|
36962
36907
|
firstTokenChainId: sourceToken.chainId,
|
|
36963
36908
|
firstTokenAddress: sourceToken.address,
|
|
36964
36909
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -36967,9 +36912,9 @@ function isEffectivelySameAsset(checkoutConfig, sourceToken, apiKey) {
|
|
|
36967
36912
|
return true;
|
|
36968
36913
|
}
|
|
36969
36914
|
const mainnetChainId = mainnet11.id.toString();
|
|
36970
|
-
return isLighterxyzCustomer(apiKey) && sourceToken.chainId === mainnetChainId && isNativeTokenAddress(sourceToken.address) && checkoutConfig.targetChain === mainnetChainId &&
|
|
36971
|
-
|
|
36972
|
-
|
|
36915
|
+
return isLighterxyzCustomer(apiKey) && sourceToken.chainId === mainnetChainId && isNativeTokenAddress(sourceToken.address) && checkoutConfig.targetChain === mainnetChainId && isEVMAddressEquivalent4({
|
|
36916
|
+
firstAddress: checkoutConfig.targetAsset,
|
|
36917
|
+
secondAddress: WETH_MAINNET_ADDRESS
|
|
36973
36918
|
});
|
|
36974
36919
|
}
|
|
36975
36920
|
function resolveDefaultIsInputInFiat({
|
|
@@ -36984,7 +36929,7 @@ function resolveDefaultIsInputInFiat({
|
|
|
36984
36929
|
if (isLighterSpot(apiKey, checkoutConfig) && isEffectivelySameAsset(checkoutConfig, sourceToken, apiKey)) {
|
|
36985
36930
|
return false;
|
|
36986
36931
|
}
|
|
36987
|
-
return
|
|
36932
|
+
return true;
|
|
36988
36933
|
}
|
|
36989
36934
|
function initializeState({
|
|
36990
36935
|
checkoutConfig,
|
|
@@ -37008,7 +36953,6 @@ function initializeState({
|
|
|
37008
36953
|
}) {
|
|
37009
36954
|
const isExactIn = quoteBuilder.isExactIn();
|
|
37010
36955
|
const { targetAssetAmount, targetChain } = checkoutConfig;
|
|
37011
|
-
const hasFinalizedToken = !!checkoutConfig.finalizedToken;
|
|
37012
36956
|
const isInputInFiat = defaultIsInputInFiat ?? resolveDefaultIsInputInFiat({
|
|
37013
36957
|
checkoutConfig,
|
|
37014
36958
|
paymentMethodInfo,
|
|
@@ -37021,7 +36965,6 @@ function initializeState({
|
|
|
37021
36965
|
logger.info("initializeState:isInputInFiat", {
|
|
37022
36966
|
input: {
|
|
37023
36967
|
dynamicRoutingId: checkoutConfig.dynamicRoutingId,
|
|
37024
|
-
hasFinalizedToken,
|
|
37025
36968
|
hasPreservedValue: defaultIsInputInFiat !== void 0,
|
|
37026
36969
|
paymentMethod: paymentMethodInfo.paymentMethod
|
|
37027
36970
|
},
|
|
@@ -37151,8 +37094,7 @@ function initializeState({
|
|
|
37151
37094
|
usdAvailableAmount,
|
|
37152
37095
|
usdMaxAmount,
|
|
37153
37096
|
usdMinAmount,
|
|
37154
|
-
meldEnabled
|
|
37155
|
-
isVaultDeposit: !!hasFinalizedToken
|
|
37097
|
+
meldEnabled
|
|
37156
37098
|
};
|
|
37157
37099
|
logger.info("initializeState:result", { output: initialState2 });
|
|
37158
37100
|
return initialState2;
|
|
@@ -37322,13 +37264,11 @@ function getAmountInputError(state) {
|
|
|
37322
37264
|
};
|
|
37323
37265
|
}
|
|
37324
37266
|
}
|
|
37325
|
-
function getDerivedState(state,
|
|
37267
|
+
function getDerivedState(state, _targetAssetTicker) {
|
|
37326
37268
|
const { fiatCurrency, isInputInFiat, locale } = state;
|
|
37327
37269
|
const inputError = getAmountInputError(state);
|
|
37328
37270
|
const { decimalSeparator } = getNumberSeparators(locale);
|
|
37329
|
-
const currencyOptions = isInputInFiat ? getCurrencyFormattingOptions(fiatCurrency, locale) : {
|
|
37330
|
-
currencySymbolWithSpacing: state.isVaultDeposit ? ` ${targetAssetTicker}` : ""
|
|
37331
|
-
};
|
|
37271
|
+
const currencyOptions = isInputInFiat ? getCurrencyFormattingOptions(fiatCurrency, locale) : { currencySymbolWithSpacing: "" };
|
|
37332
37272
|
return {
|
|
37333
37273
|
...state,
|
|
37334
37274
|
// Latest request is to NOT limit the input to the currency's decimals - rather we reuse the maximum from assets
|
|
@@ -37337,8 +37277,8 @@ function getDerivedState(state, targetAssetTicker) {
|
|
|
37337
37277
|
inputError: inputError ?? null,
|
|
37338
37278
|
inputAffix: {
|
|
37339
37279
|
content: currencyOptions.currencySymbolWithSpacing,
|
|
37340
|
-
//
|
|
37341
|
-
type:
|
|
37280
|
+
// Fiat mode renders the currency symbol as a prefix.
|
|
37281
|
+
type: "prefix"
|
|
37342
37282
|
},
|
|
37343
37283
|
isValid: !inputError,
|
|
37344
37284
|
placeholder: "0",
|
|
@@ -37697,7 +37637,7 @@ import React214, { useCallback as useCallback45 } from "react";
|
|
|
37697
37637
|
import React213 from "react";
|
|
37698
37638
|
|
|
37699
37639
|
// src/components/MeldQuoteItem/MeldQuoteItem.tsx
|
|
37700
|
-
import { formatCryptoAndStringify as
|
|
37640
|
+
import { formatCryptoAndStringify as formatCryptoAndStringify4 } from "@funkit/utils";
|
|
37701
37641
|
import React212 from "react";
|
|
37702
37642
|
var providerLabelMap = {
|
|
37703
37643
|
COINBASEPAY: "Coinbase Pay",
|
|
@@ -37749,7 +37689,7 @@ var MeldQuoteItem = ({
|
|
|
37749
37689
|
}
|
|
37750
37690
|
const destinationCurrencyCode = quote.destinationCurrencyCode.split("_")[0] ?? quote.destinationCurrencyCode;
|
|
37751
37691
|
const cryptoDecimals = isStablecoin(destinationCurrencyCode) ? 2 : 5;
|
|
37752
|
-
const cryptoAmount =
|
|
37692
|
+
const cryptoAmount = formatCryptoAndStringify4(
|
|
37753
37693
|
quote.destinationAmount,
|
|
37754
37694
|
destinationCurrencyCode,
|
|
37755
37695
|
true,
|
|
@@ -37947,7 +37887,7 @@ var useMeldLink = (sourceAmount, sourceCurrencyCode = "USD") => {
|
|
|
37947
37887
|
|
|
37948
37888
|
// src/modals/CheckoutModal/MeldQuotes/useMeldQuotes.tsx
|
|
37949
37889
|
import { getMeldQuotes } from "@funkit/api-base";
|
|
37950
|
-
import { useQuery as
|
|
37890
|
+
import { useQuery as useQuery26 } from "@tanstack/react-query";
|
|
37951
37891
|
import { useDebounce as useDebounce2 } from "use-debounce";
|
|
37952
37892
|
var DEBOUNCE_DELAY = 500;
|
|
37953
37893
|
var COUNTDOWN_INTERVAL_SEC = 60;
|
|
@@ -37959,7 +37899,7 @@ var useMeldQuotes = (sourceAmount, fiatCurrency, meldEnabled = true) => {
|
|
|
37959
37899
|
const { isAway } = useUserPresence();
|
|
37960
37900
|
const destinationCurrencyCode = useMeldCryptoCurrencyCode();
|
|
37961
37901
|
const sourceCurrencyCode = fiatCurrency || "USD";
|
|
37962
|
-
const query =
|
|
37902
|
+
const query = useQuery26({
|
|
37963
37903
|
queryKey: [
|
|
37964
37904
|
"meld",
|
|
37965
37905
|
"quotes",
|
|
@@ -38416,8 +38356,7 @@ function useAmountInputUI({
|
|
|
38416
38356
|
onChange,
|
|
38417
38357
|
placeholder,
|
|
38418
38358
|
ref,
|
|
38419
|
-
toggleInputInFiat
|
|
38420
|
-
isVaultDeposit
|
|
38359
|
+
toggleInputInFiat
|
|
38421
38360
|
}, {
|
|
38422
38361
|
checkoutConfig,
|
|
38423
38362
|
meldEnabled,
|
|
@@ -38439,15 +38378,13 @@ function useAmountInputUI({
|
|
|
38439
38378
|
});
|
|
38440
38379
|
return () => cancelAnimationFrame(id);
|
|
38441
38380
|
}, []);
|
|
38442
|
-
const { targetAssetTicker
|
|
38381
|
+
const { targetAssetTicker } = checkoutConfig;
|
|
38443
38382
|
const handleIsAmountInAbsoluteToggle = () => {
|
|
38444
38383
|
if (isInputDisabled) {
|
|
38445
38384
|
return;
|
|
38446
38385
|
}
|
|
38447
38386
|
setIsLayoutAnimating(true);
|
|
38448
|
-
|
|
38449
|
-
toggleInputInFiat();
|
|
38450
|
-
}
|
|
38387
|
+
toggleInputInFiat();
|
|
38451
38388
|
};
|
|
38452
38389
|
const handleKeyDown = (event) => {
|
|
38453
38390
|
if (isInputDisabled) {
|
|
@@ -38624,18 +38561,7 @@ function useAmountInputUI({
|
|
|
38624
38561
|
fiatCurrency: fiatCurrency ?? "USD",
|
|
38625
38562
|
locale
|
|
38626
38563
|
});
|
|
38627
|
-
const
|
|
38628
|
-
let innerText = "";
|
|
38629
|
-
if (finalizedToken) {
|
|
38630
|
-
innerText = `${formatCryptoAndStringify7(switchAmount, switchSymbol)} \u2022 ${fiatDisplay}`;
|
|
38631
|
-
} else if (isInputInFiat) {
|
|
38632
|
-
innerText = formatCryptoAndStringify7(switchAmount, switchSymbol);
|
|
38633
|
-
} else {
|
|
38634
|
-
innerText = fiatDisplay;
|
|
38635
|
-
}
|
|
38636
|
-
return /* @__PURE__ */ React215.createElement(Text, { color: "secondaryText", size: "14" }, innerText);
|
|
38637
|
-
})();
|
|
38638
|
-
const amountInputSwitch = (isVaultDeposit || isConvertedAmountShown) && /* @__PURE__ */ React215.createElement(
|
|
38564
|
+
const amountInputSwitch = isConvertedAmountShown && /* @__PURE__ */ React215.createElement(
|
|
38639
38565
|
Box,
|
|
38640
38566
|
{
|
|
38641
38567
|
display: "flex",
|
|
@@ -38643,7 +38569,7 @@ function useAmountInputUI({
|
|
|
38643
38569
|
alignItems: "center",
|
|
38644
38570
|
paddingX: "8"
|
|
38645
38571
|
},
|
|
38646
|
-
|
|
38572
|
+
/* @__PURE__ */ React215.createElement(
|
|
38647
38573
|
FunIconButton,
|
|
38648
38574
|
{
|
|
38649
38575
|
icon: !meldEnabled && /* @__PURE__ */ React215.createElement(
|
|
@@ -38666,16 +38592,7 @@ function useAmountInputUI({
|
|
|
38666
38592
|
borderRadius: "inputAmountSwitcher",
|
|
38667
38593
|
isDisabled: meldEnabled || isInputDisabled
|
|
38668
38594
|
},
|
|
38669
|
-
/* @__PURE__ */ React215.createElement(AnimatedWidthWrapper, null, /* @__PURE__ */ React215.createElement(Box, { display: "flex", alignItems: "center", gap: "0" }, !isInputInFiat ? /* @__PURE__ */ React215.createElement(motion13.div, { key: "fiat", layoutId: "fiat", ...motionProps.switch }, fiatDisplay, /* @__PURE__ */ React215.createElement(Backdrop, null)) : /* @__PURE__ */ React215.createElement(
|
|
38670
|
-
motion13.div,
|
|
38671
|
-
{
|
|
38672
|
-
key: "asset",
|
|
38673
|
-
layoutId: "asset",
|
|
38674
|
-
...motionProps.switch
|
|
38675
|
-
},
|
|
38676
|
-
formatCryptoAndStringify7(switchAmount),
|
|
38677
|
-
/* @__PURE__ */ React215.createElement(Backdrop, null)
|
|
38678
|
-
), isInputInFiat && /* @__PURE__ */ React215.createElement(motion13.div, { key: "symbol", ...motionProps.symbol }, "\xA0", switchSymbol)))
|
|
38595
|
+
/* @__PURE__ */ React215.createElement(AnimatedWidthWrapper, null, /* @__PURE__ */ React215.createElement(Box, { display: "flex", alignItems: "center", gap: "0" }, !isInputInFiat ? /* @__PURE__ */ React215.createElement(motion13.div, { key: "fiat", layoutId: "fiat", ...motionProps.switch }, fiatDisplay, /* @__PURE__ */ React215.createElement(Backdrop, null)) : /* @__PURE__ */ React215.createElement(motion13.div, { key: "asset", layoutId: "asset", ...motionProps.switch }, formatCryptoAndStringify5(switchAmount), /* @__PURE__ */ React215.createElement(Backdrop, null)), isInputInFiat && /* @__PURE__ */ React215.createElement(motion13.div, { key: "symbol", ...motionProps.symbol }, "\xA0", switchSymbol)))
|
|
38679
38596
|
)
|
|
38680
38597
|
);
|
|
38681
38598
|
return {
|
|
@@ -38694,8 +38611,7 @@ function YouPayYouReceiveWrapper({
|
|
|
38694
38611
|
const {
|
|
38695
38612
|
targetAssetTicker,
|
|
38696
38613
|
targetAsset: targetAssetAddress,
|
|
38697
|
-
iconSrc: targetIconSrc
|
|
38698
|
-
finalizedToken
|
|
38614
|
+
iconSrc: targetIconSrc
|
|
38699
38615
|
} = checkoutConfig;
|
|
38700
38616
|
const { checkoutItem } = useCheckoutContext();
|
|
38701
38617
|
const sourceAssetInfo = checkoutItem?.selectedSourceAssetInfo;
|
|
@@ -38707,7 +38623,7 @@ function YouPayYouReceiveWrapper({
|
|
|
38707
38623
|
const showYouPayYouReceive = Boolean(
|
|
38708
38624
|
sourceAssetSymbol && sourceAssetIconSrc && targetAssetTicker && targetIconSrc
|
|
38709
38625
|
);
|
|
38710
|
-
const youPayYouReceiveShowYouPaySection = forceShowYouPaySection || !
|
|
38626
|
+
const youPayYouReceiveShowYouPaySection = forceShowYouPaySection || !isTokenEquivalent12({
|
|
38711
38627
|
firstTokenChainId: sourceAssetChainId?.toString() || "",
|
|
38712
38628
|
firstTokenAddress: sourceAssetAddress?.toString() || "",
|
|
38713
38629
|
secondTokenChainId: targetChainId,
|
|
@@ -38722,9 +38638,9 @@ function YouPayYouReceiveWrapper({
|
|
|
38722
38638
|
payTokenSymbol: sourceAssetSymbol ?? "",
|
|
38723
38639
|
payTokenIconSrc: sourceAssetIconSrc ?? "",
|
|
38724
38640
|
payTokenChainId: sourceAssetChainId,
|
|
38725
|
-
receiveTokenSymbol:
|
|
38726
|
-
receiveTokenIconSrc:
|
|
38727
|
-
receiveTokenChainId:
|
|
38641
|
+
receiveTokenSymbol: targetAssetTicker,
|
|
38642
|
+
receiveTokenIconSrc: targetIconSrc ?? "",
|
|
38643
|
+
receiveTokenChainId: targetChainId,
|
|
38728
38644
|
prioritizeDefaults: false,
|
|
38729
38645
|
isYouPayChainIconHidden: isChainIconHidden
|
|
38730
38646
|
}
|
|
@@ -38732,7 +38648,7 @@ function YouPayYouReceiveWrapper({
|
|
|
38732
38648
|
}
|
|
38733
38649
|
|
|
38734
38650
|
// src/modals/CheckoutModal/InputAmount/InputAmountLoading.tsx
|
|
38735
|
-
import { formatCryptoAndStringify as
|
|
38651
|
+
import { formatCryptoAndStringify as formatCryptoAndStringify6 } from "@funkit/utils";
|
|
38736
38652
|
import React216, { useMemo as useMemo54 } from "react";
|
|
38737
38653
|
function InputAmountLoading({
|
|
38738
38654
|
modalState,
|
|
@@ -38819,7 +38735,7 @@ function InputAmountLoading({
|
|
|
38819
38735
|
paddingX: "6",
|
|
38820
38736
|
color: { base: "secondaryText" }
|
|
38821
38737
|
},
|
|
38822
|
-
!isExactIn && targetAssetAmount !== void 0 ? /* @__PURE__ */ React216.createElement(Text, { color: "secondaryText", size: "14" },
|
|
38738
|
+
!isExactIn && targetAssetAmount !== void 0 ? /* @__PURE__ */ React216.createElement(Text, { color: "secondaryText", size: "14" }, formatCryptoAndStringify6(switchAmount, switchSymbol)) : /* @__PURE__ */ React216.createElement(Box, { alignItems: "center", display: "flex", gap: "8" }, /* @__PURE__ */ React216.createElement(FunSkeletonBlock, { height: "14", width: "60" }), /* @__PURE__ */ React216.createElement(Text, { color: "secondaryText", size: "14" }, switchSymbol))
|
|
38823
38739
|
)
|
|
38824
38740
|
)
|
|
38825
38741
|
),
|
|
@@ -39173,7 +39089,7 @@ import {
|
|
|
39173
39089
|
getLightningQuote
|
|
39174
39090
|
} from "@funkit/api-base";
|
|
39175
39091
|
import { LIGHTNING_MAINNET_CHAIN_ID, bitcoinChain as bitcoinChain5 } from "@funkit/chains";
|
|
39176
|
-
import { keepPreviousData as keepPreviousData3, useQuery as
|
|
39092
|
+
import { keepPreviousData as keepPreviousData3, useQuery as useQuery27 } from "@tanstack/react-query";
|
|
39177
39093
|
import { useEffect as useEffect62, useRef as useRef31, useState as useState69 } from "react";
|
|
39178
39094
|
import { parseUnits as parseUnits3 } from "viem";
|
|
39179
39095
|
var QUOTE_REFRESH_LEAD_MS = 3e3;
|
|
@@ -39217,7 +39133,7 @@ var useLightningQuote = ({
|
|
|
39217
39133
|
}) => {
|
|
39218
39134
|
const { apiKey } = useFunkitConfig();
|
|
39219
39135
|
const enabled = !!depositAddr && !!targetChain && !!targetAsset && !!walletAddress && !!fiatAmount;
|
|
39220
|
-
const query =
|
|
39136
|
+
const query = useQuery27({
|
|
39221
39137
|
queryKey: [
|
|
39222
39138
|
"lightning-quote",
|
|
39223
39139
|
depositAddr,
|
|
@@ -39627,14 +39543,14 @@ function LightningInvoice(_props) {
|
|
|
39627
39543
|
}
|
|
39628
39544
|
|
|
39629
39545
|
// src/modals/CheckoutModal/LoadingAccount.tsx
|
|
39630
|
-
import
|
|
39546
|
+
import React231, { useEffect as useEffect64 } from "react";
|
|
39631
39547
|
|
|
39632
39548
|
// src/components/FunAsset/FunAssetLoading.tsx
|
|
39633
39549
|
import React224 from "react";
|
|
39634
39550
|
|
|
39635
39551
|
// src/components/FunAsset/FunAssetItem.tsx
|
|
39636
39552
|
import {
|
|
39637
|
-
formatCryptoAndStringify as
|
|
39553
|
+
formatCryptoAndStringify as formatCryptoAndStringify7,
|
|
39638
39554
|
formatCurrencyAndStringify as formatCurrencyAndStringify10,
|
|
39639
39555
|
isNotNullish as isNotNullish6
|
|
39640
39556
|
} from "@funkit/utils";
|
|
@@ -39731,7 +39647,7 @@ var FunAssetItem = ({
|
|
|
39731
39647
|
size: "selectAssetItemSubtitle",
|
|
39732
39648
|
weight: "selectAssetItemSubtitle"
|
|
39733
39649
|
},
|
|
39734
|
-
isNotNullish6(asset.amount) ? /* @__PURE__ */ React223.createElement("div", null,
|
|
39650
|
+
isNotNullish6(asset.amount) ? /* @__PURE__ */ React223.createElement("div", null, formatCryptoAndStringify7(asset.amount), isSecondaryTokenSymbolVisible && ` ${asset.symbol}`) : null
|
|
39735
39651
|
)
|
|
39736
39652
|
)
|
|
39737
39653
|
),
|
|
@@ -39817,7 +39733,7 @@ function FunAssetLoading({ count = 3 }) {
|
|
|
39817
39733
|
}
|
|
39818
39734
|
|
|
39819
39735
|
// src/modals/CheckoutModal/SourceChange/SourceChangeLoading.tsx
|
|
39820
|
-
import
|
|
39736
|
+
import React230 from "react";
|
|
39821
39737
|
import { createPortal as createPortal17 } from "react-dom";
|
|
39822
39738
|
|
|
39823
39739
|
// src/components/CheckoutTopAnnouncementBanner/CheckoutTopAnnouncementBanner.tsx
|
|
@@ -39891,7 +39807,7 @@ function usePaymentMethodTabs() {
|
|
|
39891
39807
|
}
|
|
39892
39808
|
|
|
39893
39809
|
// src/modals/CheckoutModal/SourceChange/CryptoCashToggle.tsx
|
|
39894
|
-
import
|
|
39810
|
+
import React229 from "react";
|
|
39895
39811
|
|
|
39896
39812
|
// src/components/Icons/New/ArrowCircleUpRightIcon.tsx
|
|
39897
39813
|
import React226 from "react";
|
|
@@ -39917,48 +39833,10 @@ var ArrowCircleUpRightIcon = ({ size = 16 }) => {
|
|
|
39917
39833
|
);
|
|
39918
39834
|
};
|
|
39919
39835
|
|
|
39920
|
-
// src/components/Icons/New/CircleBitcoinIcon.tsx
|
|
39921
|
-
import React227 from "react";
|
|
39922
|
-
var CircleBitcoinIcon = ({ size = 12 }) => {
|
|
39923
|
-
return /* @__PURE__ */ React227.createElement(
|
|
39924
|
-
"svg",
|
|
39925
|
-
{
|
|
39926
|
-
width: size,
|
|
39927
|
-
height: size,
|
|
39928
|
-
viewBox: "0 0 20 20",
|
|
39929
|
-
fill: "none",
|
|
39930
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
39931
|
-
},
|
|
39932
|
-
/* @__PURE__ */ React227.createElement(
|
|
39933
|
-
"path",
|
|
39934
|
-
{
|
|
39935
|
-
d: "M12.9168 11.8737C12.9168 12.449 12.4505 12.9154 11.8752 12.9154H8.75016V10.832H11.8752C12.4505 10.832 12.9168 11.2984 12.9168 11.8737Z",
|
|
39936
|
-
fill: "currentColor"
|
|
39937
|
-
}
|
|
39938
|
-
),
|
|
39939
|
-
/* @__PURE__ */ React227.createElement(
|
|
39940
|
-
"path",
|
|
39941
|
-
{
|
|
39942
|
-
d: "M11.4585 7.08203H8.75016V9.16536H11.4585C12.0338 9.16536 12.5002 8.69899 12.5002 8.1237C12.5002 7.5484 12.0338 7.08203 11.4585 7.08203Z",
|
|
39943
|
-
fill: "currentColor"
|
|
39944
|
-
}
|
|
39945
|
-
),
|
|
39946
|
-
/* @__PURE__ */ React227.createElement(
|
|
39947
|
-
"path",
|
|
39948
|
-
{
|
|
39949
|
-
fillRule: "evenodd",
|
|
39950
|
-
clipRule: "evenodd",
|
|
39951
|
-
d: "M10.0002 0.832031C4.93755 0.832031 0.833496 4.93609 0.833496 9.9987C0.833496 15.0613 4.93755 19.1654 10.0002 19.1654C15.0628 19.1654 19.1668 15.0613 19.1668 9.9987C19.1668 4.93609 15.0628 0.832031 10.0002 0.832031ZM8.3335 4.16536C8.79373 4.16536 9.16683 4.53846 9.16683 4.9987V5.41536H10.0002V4.9987C10.0002 4.53846 10.3733 4.16536 10.8335 4.16536C11.2937 4.16536 11.6668 4.53846 11.6668 4.9987V5.42326C13.0653 5.52964 14.1668 6.69803 14.1668 8.1237C14.1668 8.74941 13.9546 9.32557 13.5983 9.78413C14.2 10.2809 14.5835 11.0325 14.5835 11.8737C14.5835 13.3695 13.3709 14.582 11.8752 14.582H11.6668V14.9987C11.6668 15.4589 11.2937 15.832 10.8335 15.832C10.3733 15.832 10.0002 15.4589 10.0002 14.9987V14.582H9.16683V14.9987C9.16683 15.4589 8.79373 15.832 8.3335 15.832C7.87326 15.832 7.50016 15.4589 7.50016 14.9987V14.582H6.66683C6.20659 14.582 5.8335 14.2089 5.8335 13.7487C5.8335 13.2885 6.20659 12.9154 6.66683 12.9154H7.0835V7.08203H6.66683C6.20659 7.08203 5.8335 6.70894 5.8335 6.2487C5.8335 5.78846 6.20659 5.41536 6.66683 5.41536H7.50016V4.9987C7.50016 4.53846 7.87326 4.16536 8.3335 4.16536Z",
|
|
39952
|
-
fill: "currentColor"
|
|
39953
|
-
}
|
|
39954
|
-
)
|
|
39955
|
-
);
|
|
39956
|
-
};
|
|
39957
|
-
|
|
39958
39836
|
// src/components/Icons/New/DollarIcon.tsx
|
|
39959
|
-
import
|
|
39837
|
+
import React227 from "react";
|
|
39960
39838
|
var DollarIcon = ({ size = 12 }) => {
|
|
39961
|
-
return /* @__PURE__ */
|
|
39839
|
+
return /* @__PURE__ */ React227.createElement(
|
|
39962
39840
|
"svg",
|
|
39963
39841
|
{
|
|
39964
39842
|
width: size,
|
|
@@ -39967,7 +39845,7 @@ var DollarIcon = ({ size = 12 }) => {
|
|
|
39967
39845
|
fill: "none",
|
|
39968
39846
|
xmlns: "http://www.w3.org/2000/svg"
|
|
39969
39847
|
},
|
|
39970
|
-
/* @__PURE__ */
|
|
39848
|
+
/* @__PURE__ */ React227.createElement(
|
|
39971
39849
|
"path",
|
|
39972
39850
|
{
|
|
39973
39851
|
fillRule: "evenodd",
|
|
@@ -39981,7 +39859,7 @@ var DollarIcon = ({ size = 12 }) => {
|
|
|
39981
39859
|
|
|
39982
39860
|
// src/components/Tabs/Tabs.tsx
|
|
39983
39861
|
import { motion as motion15 } from "motion/react";
|
|
39984
|
-
import
|
|
39862
|
+
import React228 from "react";
|
|
39985
39863
|
|
|
39986
39864
|
// src/components/Tabs/tabs.css.ts
|
|
39987
39865
|
var baseTabStyle = "eghi2t9 _1rsrm2f11a _1rsrm2ft";
|
|
@@ -40004,7 +39882,7 @@ var Tabs = ({
|
|
|
40004
39882
|
inactiveTabProps,
|
|
40005
39883
|
containerStyles
|
|
40006
39884
|
}) => {
|
|
40007
|
-
return /* @__PURE__ */
|
|
39885
|
+
return /* @__PURE__ */ React228.createElement(
|
|
40008
39886
|
Box,
|
|
40009
39887
|
{
|
|
40010
39888
|
display: "flex",
|
|
@@ -40016,7 +39894,7 @@ var Tabs = ({
|
|
|
40016
39894
|
},
|
|
40017
39895
|
tabs2.map((tab, index) => {
|
|
40018
39896
|
const isSelected = index === activeTab;
|
|
40019
|
-
return /* @__PURE__ */
|
|
39897
|
+
return /* @__PURE__ */ React228.createElement(
|
|
40020
39898
|
Box,
|
|
40021
39899
|
{
|
|
40022
39900
|
key: tab.value,
|
|
@@ -40038,7 +39916,7 @@ var Tabs = ({
|
|
|
40038
39916
|
focusedVisible: "inactiveTabHover"
|
|
40039
39917
|
}
|
|
40040
39918
|
},
|
|
40041
|
-
isSelected ? /* @__PURE__ */
|
|
39919
|
+
isSelected ? /* @__PURE__ */ React228.createElement(
|
|
40042
39920
|
motion15.div,
|
|
40043
39921
|
{
|
|
40044
39922
|
layoutId: disabled ? void 0 : "highlight",
|
|
@@ -40046,7 +39924,7 @@ var Tabs = ({
|
|
|
40046
39924
|
style: { ...activeTabStyles, zIndex: 1 },
|
|
40047
39925
|
transition: { duration: 0.15, ease: [0.25, 0.1, 0.25, 1] }
|
|
40048
39926
|
}
|
|
40049
|
-
) : /* @__PURE__ */
|
|
39927
|
+
) : /* @__PURE__ */ React228.createElement(
|
|
40050
39928
|
Box,
|
|
40051
39929
|
{
|
|
40052
39930
|
className: baseTabStyle,
|
|
@@ -40057,7 +39935,7 @@ var Tabs = ({
|
|
|
40057
39935
|
...inactiveTabProps
|
|
40058
39936
|
}
|
|
40059
39937
|
),
|
|
40060
|
-
/* @__PURE__ */
|
|
39938
|
+
/* @__PURE__ */ React228.createElement(
|
|
40061
39939
|
Box,
|
|
40062
39940
|
{
|
|
40063
39941
|
display: "flex",
|
|
@@ -40068,7 +39946,7 @@ var Tabs = ({
|
|
|
40068
39946
|
style: { zIndex: 1, pointerEvents: "none" }
|
|
40069
39947
|
},
|
|
40070
39948
|
tab.icon,
|
|
40071
|
-
/* @__PURE__ */
|
|
39949
|
+
/* @__PURE__ */ React228.createElement(Text, { color: "inherit", weight: fontWeight, size: fontSize }, tab.label)
|
|
40072
39950
|
)
|
|
40073
39951
|
);
|
|
40074
39952
|
})
|
|
@@ -40095,17 +39973,17 @@ var CryptoCashToggle = ({
|
|
|
40095
39973
|
crypto: {
|
|
40096
39974
|
label: t("sourceChange.useCrypto"),
|
|
40097
39975
|
value: "crypto",
|
|
40098
|
-
icon: /* @__PURE__ */
|
|
39976
|
+
icon: /* @__PURE__ */ React229.createElement(CryptoTabIcon, { size: tabIconSize })
|
|
40099
39977
|
},
|
|
40100
39978
|
fiat: {
|
|
40101
39979
|
label: t("sourceChange.useCash"),
|
|
40102
39980
|
value: "fiat",
|
|
40103
|
-
icon: /* @__PURE__ */
|
|
39981
|
+
icon: /* @__PURE__ */ React229.createElement(FiatTabIcon, { size: tabIconSize })
|
|
40104
39982
|
},
|
|
40105
39983
|
withdraw: {
|
|
40106
39984
|
label: t("withdrawal.withdraw"),
|
|
40107
39985
|
value: "withdraw",
|
|
40108
|
-
icon: /* @__PURE__ */
|
|
39986
|
+
icon: /* @__PURE__ */ React229.createElement(ArrowCircleUpRightIcon, { size: tabIconSize })
|
|
40109
39987
|
}
|
|
40110
39988
|
};
|
|
40111
39989
|
const tabs2 = tabTypes?.map((type) => tabDefinitions[type]);
|
|
@@ -40116,7 +39994,7 @@ var CryptoCashToggle = ({
|
|
|
40116
39994
|
onTabChange(tab.value);
|
|
40117
39995
|
}
|
|
40118
39996
|
};
|
|
40119
|
-
return /* @__PURE__ */
|
|
39997
|
+
return /* @__PURE__ */ React229.createElement(Box, { marginTop, marginBottom, style }, /* @__PURE__ */ React229.createElement(
|
|
40120
39998
|
Tabs,
|
|
40121
39999
|
{
|
|
40122
40000
|
tabs: tabs2,
|
|
@@ -40196,16 +40074,16 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40196
40074
|
const bottomSectionRef = useBottomSectionRef();
|
|
40197
40075
|
const showTagline = useDynamicConfig("showpoweredtagline");
|
|
40198
40076
|
const hasBottomBar = bottomBarCloseButtonConfig.enabled || showTagline;
|
|
40199
|
-
return /* @__PURE__ */
|
|
40077
|
+
return /* @__PURE__ */ React230.createElement(Box, { id: "source-change-page" }, /* @__PURE__ */ React230.createElement(
|
|
40200
40078
|
Box,
|
|
40201
40079
|
{
|
|
40202
40080
|
className: paymentMethodStaticArea,
|
|
40203
40081
|
display: "flex",
|
|
40204
40082
|
flexDirection: "column"
|
|
40205
40083
|
},
|
|
40206
|
-
/* @__PURE__ */
|
|
40084
|
+
/* @__PURE__ */ React230.createElement(CheckoutTopAnnouncementBanner, null),
|
|
40207
40085
|
customTopComponent?.(),
|
|
40208
|
-
isTargetAssetSelectable && /* @__PURE__ */
|
|
40086
|
+
isTargetAssetSelectable && /* @__PURE__ */ React230.createElement(
|
|
40209
40087
|
Box,
|
|
40210
40088
|
{
|
|
40211
40089
|
paddingY: "dropdownActiveItemRegularSizePaddingY",
|
|
@@ -40218,10 +40096,10 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40218
40096
|
borderColor: "dropdownActiveItemBorderBase",
|
|
40219
40097
|
borderRadius: "dropdown"
|
|
40220
40098
|
},
|
|
40221
|
-
/* @__PURE__ */
|
|
40222
|
-
/* @__PURE__ */
|
|
40099
|
+
/* @__PURE__ */ React230.createElement(FunSkeletonBlock, { fontSize: "14", width: "96" }),
|
|
40100
|
+
/* @__PURE__ */ React230.createElement(FunSkeletonBlock, { fontSize: "14", width: "72" })
|
|
40223
40101
|
)
|
|
40224
|
-
), showContentDivider && /* @__PURE__ */
|
|
40102
|
+
), showContentDivider && /* @__PURE__ */ React230.createElement(
|
|
40225
40103
|
FunDivider,
|
|
40226
40104
|
{
|
|
40227
40105
|
marginTop: "16",
|
|
@@ -40229,7 +40107,7 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40229
40107
|
borderColor: "lightStroke",
|
|
40230
40108
|
className: fullWidthContentDivider
|
|
40231
40109
|
}
|
|
40232
|
-
), isSwappedEnabled ? /* @__PURE__ */
|
|
40110
|
+
), isSwappedEnabled ? /* @__PURE__ */ React230.createElement(
|
|
40233
40111
|
Box,
|
|
40234
40112
|
{
|
|
40235
40113
|
display: "flex",
|
|
@@ -40237,7 +40115,7 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40237
40115
|
className: paymentMethodStaticArea,
|
|
40238
40116
|
paddingBottom: hasBottomBar ? void 0 : "modalPaddingBottomLower"
|
|
40239
40117
|
},
|
|
40240
|
-
/* @__PURE__ */
|
|
40118
|
+
/* @__PURE__ */ React230.createElement(
|
|
40241
40119
|
CryptoCashToggle,
|
|
40242
40120
|
{
|
|
40243
40121
|
disabled: true,
|
|
@@ -40248,8 +40126,8 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40248
40126
|
tabs: tabOrder
|
|
40249
40127
|
}
|
|
40250
40128
|
),
|
|
40251
|
-
enableSourceGroupLabels ? /* @__PURE__ */
|
|
40252
|
-
) : /* @__PURE__ */
|
|
40129
|
+
enableSourceGroupLabels ? /* @__PURE__ */ React230.createElement(Box, { gap: "24", display: "flex", flexDirection: "column" }, /* @__PURE__ */ React230.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, /* @__PURE__ */ React230.createElement(FunSkeletonBlock, { fontSize: "14", width: "72" }), /* @__PURE__ */ React230.createElement(Box, { className: sourceListBoxClassName }, /* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItems, { count: 1 }))), /* @__PURE__ */ React230.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, /* @__PURE__ */ React230.createElement(FunSkeletonBlock, { fontSize: "14", width: "72" }), /* @__PURE__ */ React230.createElement(Box, { className: sourceListBoxClassName }, /* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItems, { count: numPaymentMethods - 1 })))) : /* @__PURE__ */ React230.createElement(Box, { className: sourceListBoxClassName }, /* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItems, { count: numPaymentMethods }))
|
|
40130
|
+
) : /* @__PURE__ */ React230.createElement(
|
|
40253
40131
|
Box,
|
|
40254
40132
|
{
|
|
40255
40133
|
display: "flex",
|
|
@@ -40258,8 +40136,8 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40258
40136
|
paddingBottom: hasBottomBar ? void 0 : "modalPaddingBottomLower",
|
|
40259
40137
|
gap: "4"
|
|
40260
40138
|
},
|
|
40261
|
-
/* @__PURE__ */
|
|
40262
|
-
/* @__PURE__ */
|
|
40139
|
+
/* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItems, { count: 1 }),
|
|
40140
|
+
/* @__PURE__ */ React230.createElement(
|
|
40263
40141
|
FunDivider,
|
|
40264
40142
|
{
|
|
40265
40143
|
marginTop: "8",
|
|
@@ -40267,9 +40145,9 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40267
40145
|
borderColor: "selectedOptionBorder"
|
|
40268
40146
|
}
|
|
40269
40147
|
),
|
|
40270
|
-
/* @__PURE__ */
|
|
40148
|
+
/* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItems, { count: numPaymentMethods - 1 })
|
|
40271
40149
|
), bottomSectionRef && createPortal17(
|
|
40272
|
-
/* @__PURE__ */
|
|
40150
|
+
/* @__PURE__ */ React230.createElement(
|
|
40273
40151
|
Dialog.BottomBar,
|
|
40274
40152
|
{
|
|
40275
40153
|
onCloseLabel: t(bottomBarCloseButtonConfig.labelKey),
|
|
@@ -40280,7 +40158,7 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40280
40158
|
));
|
|
40281
40159
|
}
|
|
40282
40160
|
function LoadingFunPaymentMethodItems({ count }) {
|
|
40283
|
-
return /* @__PURE__ */
|
|
40161
|
+
return /* @__PURE__ */ React230.createElement(React230.Fragment, null, Array.from({ length: count }).map((_, index) => /* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItem, { key: index })));
|
|
40284
40162
|
}
|
|
40285
40163
|
|
|
40286
40164
|
// src/modals/CheckoutModal/LoadingAccount.tsx
|
|
@@ -40461,12 +40339,12 @@ function LoadingAccount({
|
|
|
40461
40339
|
checkoutConfig,
|
|
40462
40340
|
userInfo.isConnected
|
|
40463
40341
|
]);
|
|
40464
|
-
return startsOnConfirmationStep ? /* @__PURE__ */
|
|
40342
|
+
return startsOnConfirmationStep ? /* @__PURE__ */ React231.createElement(ConfirmationStepLoading, null) : startsOnSelectAssetStep ? /* @__PURE__ */ React231.createElement(FunAssetLoading, { count: 5 }) : /* @__PURE__ */ React231.createElement(SourceChangeLoading, { onClose });
|
|
40465
40343
|
}
|
|
40466
40344
|
|
|
40467
40345
|
// src/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.tsx
|
|
40468
40346
|
import clsx21 from "clsx";
|
|
40469
|
-
import
|
|
40347
|
+
import React232, { useMemo as useMemo58, useState as useState70 } from "react";
|
|
40470
40348
|
|
|
40471
40349
|
// src/modals/CheckoutModal/MeldCurrencySelect/currenciesWithMultipleCountries.ts
|
|
40472
40350
|
var currenciesWithMultipleCountries = {
|
|
@@ -40546,7 +40424,7 @@ function MeldCurrencySelect({
|
|
|
40546
40424
|
navigateToHistoryStep: true
|
|
40547
40425
|
});
|
|
40548
40426
|
};
|
|
40549
|
-
return /* @__PURE__ */
|
|
40427
|
+
return /* @__PURE__ */ React232.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, /* @__PURE__ */ React232.createElement(
|
|
40550
40428
|
FunInput,
|
|
40551
40429
|
{
|
|
40552
40430
|
placeholder: t("meldCurrencySelect.searchCurrency"),
|
|
@@ -40554,7 +40432,7 @@ function MeldCurrencySelect({
|
|
|
40554
40432
|
onChange: handleSearch,
|
|
40555
40433
|
prefixIcon: "SearchIcon"
|
|
40556
40434
|
}
|
|
40557
|
-
), /* @__PURE__ */
|
|
40435
|
+
), /* @__PURE__ */ React232.createElement(Box, { display: "flex", flexDirection: "column", style: { minHeight: 360 } }, isPending ? Array.from({ length: 9 }).map((_, index) => /* @__PURE__ */ React232.createElement(Box, { key: index, padding: "12" }, /* @__PURE__ */ React232.createElement(FunSkeletonBlock, { height: "16", width: "full" }))) : filteredOptions.length === 0 ? /* @__PURE__ */ React232.createElement(FunNoResults, { text: t("meldCurrencySelect.noResultsFound") }) : /* @__PURE__ */ React232.createElement(
|
|
40558
40436
|
Box,
|
|
40559
40437
|
{
|
|
40560
40438
|
className: clsx21(hideScrollBar, selectWrapperStyle),
|
|
@@ -40566,7 +40444,7 @@ function MeldCurrencySelect({
|
|
|
40566
40444
|
},
|
|
40567
40445
|
filteredOptions.map((optionItem) => {
|
|
40568
40446
|
const isActive = selectedCurrency === optionItem.currencyCode;
|
|
40569
|
-
return /* @__PURE__ */
|
|
40447
|
+
return /* @__PURE__ */ React232.createElement(
|
|
40570
40448
|
FunOptionBox,
|
|
40571
40449
|
{
|
|
40572
40450
|
key: optionItem.currencyCode,
|
|
@@ -40575,15 +40453,15 @@ function MeldCurrencySelect({
|
|
|
40575
40453
|
paddingY: "10",
|
|
40576
40454
|
boxShadow: isActive ? "selectedDropdownItem" : void 0
|
|
40577
40455
|
},
|
|
40578
|
-
/* @__PURE__ */
|
|
40579
|
-
isActive && /* @__PURE__ */
|
|
40456
|
+
/* @__PURE__ */ React232.createElement(Box, { display: "flex", alignItems: "center", gap: "8" }, /* @__PURE__ */ React232.createElement(Text, null, getFlagEmoji(optionItem.currencyCode)), /* @__PURE__ */ React232.createElement(Text, null, `${optionItem.name} (${getCurrencySymbol(optionItem.currencyCode)})`)),
|
|
40457
|
+
isActive && /* @__PURE__ */ React232.createElement(CheckIcon, null)
|
|
40580
40458
|
);
|
|
40581
40459
|
})
|
|
40582
40460
|
)));
|
|
40583
40461
|
}
|
|
40584
40462
|
|
|
40585
40463
|
// src/modals/CheckoutModal/MeldQuotes/MeldQuotes.tsx
|
|
40586
|
-
import
|
|
40464
|
+
import React233 from "react";
|
|
40587
40465
|
import { createPortal as createPortal18 } from "react-dom";
|
|
40588
40466
|
var MeldQuotesInfo = {
|
|
40589
40467
|
Component: MeldQuotes,
|
|
@@ -40618,10 +40496,10 @@ function MeldQuotes({
|
|
|
40618
40496
|
const { query, countdown } = useMeldQuotes(fiatAmount, fiatCurrency, true);
|
|
40619
40497
|
const titleCountdownRef = useTitleCountdownRef();
|
|
40620
40498
|
if (query.isPending) {
|
|
40621
|
-
return /* @__PURE__ */
|
|
40499
|
+
return /* @__PURE__ */ React233.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, Array.from({ length: 6 }).map((_, index) => /* @__PURE__ */ React233.createElement(MeldQuoteItem, { quote: void 0, key: index })));
|
|
40622
40500
|
}
|
|
40623
|
-
return /* @__PURE__ */
|
|
40624
|
-
return /* @__PURE__ */
|
|
40501
|
+
return /* @__PURE__ */ React233.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, query.data?.map((quote) => {
|
|
40502
|
+
return /* @__PURE__ */ React233.createElement(
|
|
40625
40503
|
MeldQuoteItem,
|
|
40626
40504
|
{
|
|
40627
40505
|
key: quote.serviceProvider,
|
|
@@ -40636,7 +40514,7 @@ function MeldQuotes({
|
|
|
40636
40514
|
|
|
40637
40515
|
// src/modals/CheckoutModal/MeldRedirect/MeldRedirect.tsx
|
|
40638
40516
|
import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO10 } from "@funkit/chains";
|
|
40639
|
-
import
|
|
40517
|
+
import React234 from "react";
|
|
40640
40518
|
var MeldRedirectInfo = {
|
|
40641
40519
|
Component: MeldRedirect,
|
|
40642
40520
|
onNext: () => {
|
|
@@ -40670,7 +40548,7 @@ function MeldRedirect({
|
|
|
40670
40548
|
);
|
|
40671
40549
|
return entry?.[0];
|
|
40672
40550
|
};
|
|
40673
|
-
return /* @__PURE__ */
|
|
40551
|
+
return /* @__PURE__ */ React234.createElement(
|
|
40674
40552
|
Box,
|
|
40675
40553
|
{
|
|
40676
40554
|
display: "flex",
|
|
@@ -40679,7 +40557,7 @@ function MeldRedirect({
|
|
|
40679
40557
|
gap: "24",
|
|
40680
40558
|
marginTop: "8"
|
|
40681
40559
|
},
|
|
40682
|
-
quote?.serviceProvider && /* @__PURE__ */
|
|
40560
|
+
quote?.serviceProvider && /* @__PURE__ */ React234.createElement(
|
|
40683
40561
|
AsyncImage,
|
|
40684
40562
|
{
|
|
40685
40563
|
width: "48",
|
|
@@ -40690,7 +40568,7 @@ function MeldRedirect({
|
|
|
40690
40568
|
borderRadius: "full"
|
|
40691
40569
|
}
|
|
40692
40570
|
),
|
|
40693
|
-
/* @__PURE__ */
|
|
40571
|
+
/* @__PURE__ */ React234.createElement(
|
|
40694
40572
|
Box,
|
|
40695
40573
|
{
|
|
40696
40574
|
display: "flex",
|
|
@@ -40699,10 +40577,10 @@ function MeldRedirect({
|
|
|
40699
40577
|
textAlign: "center",
|
|
40700
40578
|
gap: "8"
|
|
40701
40579
|
},
|
|
40702
|
-
/* @__PURE__ */
|
|
40703
|
-
/* @__PURE__ */
|
|
40580
|
+
/* @__PURE__ */ React234.createElement(Text, { size: "16" }, t("meldRedirect.completeTransactionWith", { providerLabel })),
|
|
40581
|
+
/* @__PURE__ */ React234.createElement(Text, { size: "12" }, t("meldRedirect.canCloseModal"))
|
|
40704
40582
|
),
|
|
40705
|
-
/* @__PURE__ */
|
|
40583
|
+
/* @__PURE__ */ React234.createElement(
|
|
40706
40584
|
YouPayYouReceive,
|
|
40707
40585
|
{
|
|
40708
40586
|
payLabel: t("meldRedirect.youBuy"),
|
|
@@ -40716,14 +40594,14 @@ function MeldRedirect({
|
|
|
40716
40594
|
showFiatCurrencySection: true
|
|
40717
40595
|
}
|
|
40718
40596
|
),
|
|
40719
|
-
/* @__PURE__ */
|
|
40597
|
+
/* @__PURE__ */ React234.createElement(FunAlert, { description: t("meldRedirect.intentAddressWarning") })
|
|
40720
40598
|
);
|
|
40721
40599
|
}
|
|
40722
40600
|
|
|
40723
40601
|
// src/modals/CheckoutModal/SelectAsset/SelectAsset.tsx
|
|
40724
40602
|
import { etherealChain, hyperEvmChain as hyperEvmChain3 } from "@funkit/chains";
|
|
40725
|
-
import { isTokenEquivalent as
|
|
40726
|
-
import
|
|
40603
|
+
import { isTokenEquivalent as isTokenEquivalent13 } from "@funkit/utils";
|
|
40604
|
+
import React238, {
|
|
40727
40605
|
useEffect as useEffect65,
|
|
40728
40606
|
useLayoutEffect as useLayoutEffect2,
|
|
40729
40607
|
useMemo as useMemo60,
|
|
@@ -40760,17 +40638,17 @@ var useDynamicRoutes = (_dynamicRoutingId) => {
|
|
|
40760
40638
|
|
|
40761
40639
|
// src/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.tsx
|
|
40762
40640
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify11 } from "@funkit/utils";
|
|
40763
|
-
import
|
|
40641
|
+
import React236 from "react";
|
|
40764
40642
|
|
|
40765
40643
|
// src/components/NewTokenDepositAlert/NewTokenDepositAlert.tsx
|
|
40766
|
-
import
|
|
40644
|
+
import React235 from "react";
|
|
40767
40645
|
import { Trans as Trans17 } from "react-i18next";
|
|
40768
40646
|
var FunLinkButtonComponent2 = ({
|
|
40769
40647
|
children,
|
|
40770
40648
|
onClick,
|
|
40771
40649
|
weight
|
|
40772
40650
|
}) => {
|
|
40773
|
-
return /* @__PURE__ */
|
|
40651
|
+
return /* @__PURE__ */ React235.createElement(
|
|
40774
40652
|
FunLinkButton,
|
|
40775
40653
|
{
|
|
40776
40654
|
inline: true,
|
|
@@ -40789,19 +40667,19 @@ var NewTokenDepositAlert = ({
|
|
|
40789
40667
|
if (!alertData || !isTokenTransferEnabled) {
|
|
40790
40668
|
return null;
|
|
40791
40669
|
}
|
|
40792
|
-
return /* @__PURE__ */
|
|
40670
|
+
return /* @__PURE__ */ React235.createElement(
|
|
40793
40671
|
FunAlert,
|
|
40794
40672
|
{
|
|
40795
|
-
icon: /* @__PURE__ */
|
|
40673
|
+
icon: /* @__PURE__ */ React235.createElement(NewTokenBadge, { iconSymbol: alertData.symbol }),
|
|
40796
40674
|
paddingX: "8",
|
|
40797
|
-
description: /* @__PURE__ */
|
|
40675
|
+
description: /* @__PURE__ */ React235.createElement(
|
|
40798
40676
|
Trans17,
|
|
40799
40677
|
{
|
|
40800
40678
|
t,
|
|
40801
40679
|
i18nKey: "common.depositsLiveTryNow",
|
|
40802
40680
|
values: { tokenName: alertData.name },
|
|
40803
40681
|
components: {
|
|
40804
|
-
TryNowLink: /* @__PURE__ */
|
|
40682
|
+
TryNowLink: /* @__PURE__ */ React235.createElement(
|
|
40805
40683
|
FunLinkButtonComponent2,
|
|
40806
40684
|
{
|
|
40807
40685
|
weight: "regular",
|
|
@@ -40828,9 +40706,9 @@ var SelectAssetInfoSection = ({
|
|
|
40828
40706
|
}) => {
|
|
40829
40707
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo, 16);
|
|
40830
40708
|
if (!isSourceNavWidgetEnabled) {
|
|
40831
|
-
return /* @__PURE__ */
|
|
40709
|
+
return /* @__PURE__ */ React236.createElement(NewTokenDepositAlert, { onClick: onTokenTransfer });
|
|
40832
40710
|
}
|
|
40833
|
-
return /* @__PURE__ */
|
|
40711
|
+
return /* @__PURE__ */ React236.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, /* @__PURE__ */ React236.createElement(
|
|
40834
40712
|
SourcePaymentMethodItem,
|
|
40835
40713
|
{
|
|
40836
40714
|
type: paymentMethodInfo.paymentMethod,
|
|
@@ -40840,12 +40718,12 @@ var SelectAssetInfoSection = ({
|
|
|
40840
40718
|
onClick: onSelectSource,
|
|
40841
40719
|
testId: "checkout-source-wallet-button"
|
|
40842
40720
|
}
|
|
40843
|
-
), /* @__PURE__ */
|
|
40721
|
+
), /* @__PURE__ */ React236.createElement(NewTokenDepositAlert, { onClick: onTokenTransfer }));
|
|
40844
40722
|
};
|
|
40845
40723
|
|
|
40846
40724
|
// src/modals/CheckoutModal/SelectAsset/SelectAssetList.tsx
|
|
40847
40725
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify12 } from "@funkit/utils";
|
|
40848
|
-
import
|
|
40726
|
+
import React237 from "react";
|
|
40849
40727
|
import { flushSync } from "react-dom";
|
|
40850
40728
|
var SelectAssetList = ({
|
|
40851
40729
|
isLoading,
|
|
@@ -40877,16 +40755,16 @@ var SelectAssetList = ({
|
|
|
40877
40755
|
return void 0;
|
|
40878
40756
|
}
|
|
40879
40757
|
if (isLoading) {
|
|
40880
|
-
return /* @__PURE__ */
|
|
40758
|
+
return /* @__PURE__ */ React237.createElement(FunAssetLoading, { count: 5 });
|
|
40881
40759
|
}
|
|
40882
40760
|
if (isAssetsEmpty) {
|
|
40883
|
-
return /* @__PURE__ */
|
|
40761
|
+
return /* @__PURE__ */ React237.createElement(
|
|
40884
40762
|
FunNoResults,
|
|
40885
40763
|
{
|
|
40886
40764
|
title: t("checkout.noAvailableTokens"),
|
|
40887
40765
|
text: t("checkout.noAvailableTokensMessage"),
|
|
40888
40766
|
variant: "actionable",
|
|
40889
|
-
actionButton: onBalanceTopUpSwitch ? /* @__PURE__ */
|
|
40767
|
+
actionButton: onBalanceTopUpSwitch ? /* @__PURE__ */ React237.createElement(
|
|
40890
40768
|
FunButton,
|
|
40891
40769
|
{
|
|
40892
40770
|
type: "tertiary",
|
|
@@ -40900,7 +40778,7 @@ var SelectAssetList = ({
|
|
|
40900
40778
|
}
|
|
40901
40779
|
);
|
|
40902
40780
|
}
|
|
40903
|
-
return /* @__PURE__ */
|
|
40781
|
+
return /* @__PURE__ */ React237.createElement(
|
|
40904
40782
|
Box,
|
|
40905
40783
|
{
|
|
40906
40784
|
display: "flex",
|
|
@@ -40909,7 +40787,7 @@ var SelectAssetList = ({
|
|
|
40909
40787
|
},
|
|
40910
40788
|
assetOptions.map(({ asset, isDisabled, badgeText, minUsdWithFees }) => {
|
|
40911
40789
|
const isAssetItemActive = !navigateOnAssetClick && selectedChainTokenSymbol === asset.chainSymbolKey;
|
|
40912
|
-
return /* @__PURE__ */
|
|
40790
|
+
return /* @__PURE__ */ React237.createElement(
|
|
40913
40791
|
FunAssetItem,
|
|
40914
40792
|
{
|
|
40915
40793
|
key: asset.chainSymbolKey,
|
|
@@ -41056,7 +40934,7 @@ function useAssetOptions({
|
|
|
41056
40934
|
const { isUsable, reason } = usableForCheckout;
|
|
41057
40935
|
const isKnown = isKnownAsset(asset);
|
|
41058
40936
|
const isDisabled = !isUsable || !isKnown;
|
|
41059
|
-
const isUserSelected =
|
|
40937
|
+
const isUserSelected = isTokenEquivalent13({
|
|
41060
40938
|
firstTokenChainId: asset.pickedChainId,
|
|
41061
40939
|
firstTokenAddress: asset.tokenAddress,
|
|
41062
40940
|
secondTokenChainId: userSelectedTargetAsset?.tokenChainId || "",
|
|
@@ -41217,7 +41095,7 @@ function AccountSelectAsset({
|
|
|
41217
41095
|
return;
|
|
41218
41096
|
}
|
|
41219
41097
|
const currentSourceAsset = checkoutItem?.selectedSourceAssetInfo;
|
|
41220
|
-
const sourceAssetChanged = !
|
|
41098
|
+
const sourceAssetChanged = !isTokenEquivalent13({
|
|
41221
41099
|
firstTokenChainId: currentSourceAsset?.chainId || "",
|
|
41222
41100
|
firstTokenAddress: currentSourceAsset?.address || "",
|
|
41223
41101
|
secondTokenChainId: tokenItem.pickedChainId,
|
|
@@ -41291,7 +41169,7 @@ function AccountSelectAsset({
|
|
|
41291
41169
|
});
|
|
41292
41170
|
}
|
|
41293
41171
|
}, [checkoutId, isLoading, logMeasuredEvent]);
|
|
41294
|
-
const assetList = /* @__PURE__ */
|
|
41172
|
+
const assetList = /* @__PURE__ */ React238.createElement(
|
|
41295
41173
|
SelectAssetList,
|
|
41296
41174
|
{
|
|
41297
41175
|
isLoading,
|
|
@@ -41305,7 +41183,7 @@ function AccountSelectAsset({
|
|
|
41305
41183
|
onContinueWithToken
|
|
41306
41184
|
}
|
|
41307
41185
|
);
|
|
41308
|
-
return /* @__PURE__ */
|
|
41186
|
+
return /* @__PURE__ */ React238.createElement(React238.Fragment, null, uiCustomizations.selectAssetScreen.customTopComponent?.(), /* @__PURE__ */ React238.createElement(
|
|
41309
41187
|
Box,
|
|
41310
41188
|
{
|
|
41311
41189
|
width: "full",
|
|
@@ -41318,11 +41196,11 @@ function AccountSelectAsset({
|
|
|
41318
41196
|
},
|
|
41319
41197
|
assetList
|
|
41320
41198
|
), bottomSectionRef && createPortal19(
|
|
41321
|
-
/* @__PURE__ */
|
|
41199
|
+
/* @__PURE__ */ React238.createElement(
|
|
41322
41200
|
Dialog.BottomBar,
|
|
41323
41201
|
{
|
|
41324
41202
|
topSectionVisible: !!fetchHoldingsError,
|
|
41325
|
-
topSection: navigateOnAssetClick && !fetchHoldingsError ? null : /* @__PURE__ */
|
|
41203
|
+
topSection: navigateOnAssetClick && !fetchHoldingsError ? null : /* @__PURE__ */ React238.createElement(
|
|
41326
41204
|
FunNotification,
|
|
41327
41205
|
{
|
|
41328
41206
|
isVisible: !!fetchHoldingsError,
|
|
@@ -41361,7 +41239,7 @@ function SelectAsset({
|
|
|
41361
41239
|
const handleFinish = useEffectEvent(() => {
|
|
41362
41240
|
onNext({});
|
|
41363
41241
|
});
|
|
41364
|
-
return /* @__PURE__ */
|
|
41242
|
+
return /* @__PURE__ */ React238.createElement(Box, { display: "flex", flexDirection: "column", gap: "12", style: { flex: 1 } }, moreSources.length > 0 && /* @__PURE__ */ React238.createElement(
|
|
41365
41243
|
SelectAssetInfoSection,
|
|
41366
41244
|
{
|
|
41367
41245
|
paymentMethodInfo,
|
|
@@ -41370,7 +41248,7 @@ function SelectAsset({
|
|
|
41370
41248
|
onSelectSource: handleSelectSource,
|
|
41371
41249
|
isSourceNavWidgetEnabled: modalState.startingStep === "select_asset" /* SELECT_ASSET */
|
|
41372
41250
|
}
|
|
41373
|
-
), /* @__PURE__ */
|
|
41251
|
+
), /* @__PURE__ */ React238.createElement(
|
|
41374
41252
|
AccountSelectAsset,
|
|
41375
41253
|
{
|
|
41376
41254
|
paymentMethodInfo,
|
|
@@ -41394,7 +41272,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41394
41272
|
return dynamicPath.badge === "NATIVE";
|
|
41395
41273
|
}
|
|
41396
41274
|
if (isEtherealCustomer(apiKey)) {
|
|
41397
|
-
if (
|
|
41275
|
+
if (isTokenEquivalent13({
|
|
41398
41276
|
firstTokenChainId: mainnet12.id.toString(),
|
|
41399
41277
|
firstTokenAddress: "0x90d2af7d622ca3141efa4d8f1f24d86e5974cc8f",
|
|
41400
41278
|
// eUSDe (Ethereum)
|
|
@@ -41403,7 +41281,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41403
41281
|
})) {
|
|
41404
41282
|
return true;
|
|
41405
41283
|
}
|
|
41406
|
-
if (
|
|
41284
|
+
if (isTokenEquivalent13({
|
|
41407
41285
|
firstTokenChainId: etherealChain.id.toString(),
|
|
41408
41286
|
firstTokenAddress: NATIVE_TOKEN,
|
|
41409
41287
|
// USDe (Ethereal) uses 0xeeee... address
|
|
@@ -41414,7 +41292,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41414
41292
|
}
|
|
41415
41293
|
}
|
|
41416
41294
|
if (isHyenaCustomer(apiKey)) {
|
|
41417
|
-
if (
|
|
41295
|
+
if (isTokenEquivalent13({
|
|
41418
41296
|
firstTokenChainId: hyperEvmChain3.id.toString(),
|
|
41419
41297
|
firstTokenAddress: "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
|
|
41420
41298
|
secondTokenChainId: asset.pickedChainId,
|
|
@@ -41424,7 +41302,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41424
41302
|
}
|
|
41425
41303
|
}
|
|
41426
41304
|
return dynamicTargetAssetCandidates.some(
|
|
41427
|
-
(token) =>
|
|
41305
|
+
(token) => isTokenEquivalent13({
|
|
41428
41306
|
firstTokenChainId: token.tokenChainId,
|
|
41429
41307
|
firstTokenAddress: token.tokenAddress,
|
|
41430
41308
|
secondTokenChainId: asset.pickedChainId,
|
|
@@ -41440,15 +41318,15 @@ function showsNativeTokensOnTop(apiKey) {
|
|
|
41440
41318
|
import {
|
|
41441
41319
|
BridgeCustomerStatus as BridgeCustomerStatus6
|
|
41442
41320
|
} from "@funkit/api-base";
|
|
41443
|
-
import { LIGHTER_CHAIN_ID as LIGHTER_CHAIN_ID3
|
|
41444
|
-
import { isTokenEquivalent as
|
|
41445
|
-
import
|
|
41321
|
+
import { LIGHTER_CHAIN_ID as LIGHTER_CHAIN_ID3 } from "@funkit/chains";
|
|
41322
|
+
import { isTokenEquivalent as isTokenEquivalent14, noop as noop6 } from "@funkit/utils";
|
|
41323
|
+
import React247, { useEffect as useEffect67, useMemo as useMemo61, useRef as useRef32, useState as useState72 } from "react";
|
|
41446
41324
|
import { createPortal as createPortal20 } from "react-dom";
|
|
41447
41325
|
|
|
41448
41326
|
// src/components/Dropdown/ReceiveTokenDropdown.tsx
|
|
41449
|
-
import
|
|
41327
|
+
import React239 from "react";
|
|
41450
41328
|
var TOKEN_ICON_SIZE2 = "16";
|
|
41451
|
-
var aprTag = (badgeText) => /* @__PURE__ */
|
|
41329
|
+
var aprTag = (badgeText) => /* @__PURE__ */ React239.createElement(
|
|
41452
41330
|
FunBadge,
|
|
41453
41331
|
{
|
|
41454
41332
|
background: "badgeBackgroundSuccess",
|
|
@@ -41480,7 +41358,7 @@ var ReceiveTokenDropdown = ({
|
|
|
41480
41358
|
onTokenSelected(matchingToken);
|
|
41481
41359
|
}
|
|
41482
41360
|
};
|
|
41483
|
-
return /* @__PURE__ */
|
|
41361
|
+
return /* @__PURE__ */ React239.createElement(
|
|
41484
41362
|
BaseDropdown_default,
|
|
41485
41363
|
{
|
|
41486
41364
|
maxDropdownHeight,
|
|
@@ -41489,7 +41367,7 @@ var ReceiveTokenDropdown = ({
|
|
|
41489
41367
|
size,
|
|
41490
41368
|
openToTopOnMobile: false,
|
|
41491
41369
|
activeItemProps: {
|
|
41492
|
-
iconComponent: selectedToken && /* @__PURE__ */
|
|
41370
|
+
iconComponent: selectedToken && /* @__PURE__ */ React239.createElement(
|
|
41493
41371
|
FunAssetAvatar,
|
|
41494
41372
|
{
|
|
41495
41373
|
assetIconSize: TOKEN_ICON_SIZE2,
|
|
@@ -41515,11 +41393,11 @@ var ReceiveTokenDropdown = ({
|
|
|
41515
41393
|
(token) => token.tokenSymbol === symbol
|
|
41516
41394
|
)?.badgeText;
|
|
41517
41395
|
const tagComponent = tokenBadgeText2 ? aprTag(tokenBadgeText2) : void 0;
|
|
41518
|
-
return /* @__PURE__ */
|
|
41396
|
+
return /* @__PURE__ */ React239.createElement(
|
|
41519
41397
|
BaseDropdownItem_default,
|
|
41520
41398
|
{
|
|
41521
41399
|
horizontalIconGap: "8",
|
|
41522
|
-
iconComponent: /* @__PURE__ */
|
|
41400
|
+
iconComponent: /* @__PURE__ */ React239.createElement(
|
|
41523
41401
|
FunAssetAvatar,
|
|
41524
41402
|
{
|
|
41525
41403
|
assetIconSize: TOKEN_ICON_SIZE2,
|
|
@@ -41550,7 +41428,7 @@ function useIsUserUnderComplianceReview() {
|
|
|
41550
41428
|
}
|
|
41551
41429
|
|
|
41552
41430
|
// src/modals/CheckoutModal/SourceChange/ComplianceReviewBanner.tsx
|
|
41553
|
-
import
|
|
41431
|
+
import React240, { useEffect as useEffect66 } from "react";
|
|
41554
41432
|
import { Trans as Trans18 } from "react-i18next";
|
|
41555
41433
|
function ComplianceReviewBanner({
|
|
41556
41434
|
checkoutId
|
|
@@ -41569,17 +41447,17 @@ function ComplianceReviewBanner({
|
|
|
41569
41447
|
metadata: { checkoutId }
|
|
41570
41448
|
});
|
|
41571
41449
|
};
|
|
41572
|
-
return /* @__PURE__ */
|
|
41450
|
+
return /* @__PURE__ */ React240.createElement(Box, { marginBottom: "8" }, /* @__PURE__ */ React240.createElement(
|
|
41573
41451
|
InfoBanner,
|
|
41574
41452
|
{
|
|
41575
41453
|
type: "warning",
|
|
41576
|
-
message: /* @__PURE__ */
|
|
41454
|
+
message: /* @__PURE__ */ React240.createElement(
|
|
41577
41455
|
Trans18,
|
|
41578
41456
|
{
|
|
41579
41457
|
t,
|
|
41580
41458
|
i18nKey: "sourceChange.complianceReviewMessage",
|
|
41581
41459
|
components: {
|
|
41582
|
-
GetHelpLink: /* @__PURE__ */
|
|
41460
|
+
GetHelpLink: /* @__PURE__ */ React240.createElement(ContactSupportLink, { size: "10", onClick: trackGetHelpClick })
|
|
41583
41461
|
}
|
|
41584
41462
|
}
|
|
41585
41463
|
)
|
|
@@ -41588,7 +41466,7 @@ function ComplianceReviewBanner({
|
|
|
41588
41466
|
}
|
|
41589
41467
|
|
|
41590
41468
|
// src/modals/CheckoutModal/SourceChange/ConnectedSource.tsx
|
|
41591
|
-
import
|
|
41469
|
+
import React241 from "react";
|
|
41592
41470
|
var ConnectedSource = ({
|
|
41593
41471
|
paymentInfo,
|
|
41594
41472
|
targetChainId,
|
|
@@ -41600,7 +41478,7 @@ var ConnectedSource = ({
|
|
|
41600
41478
|
const isSelected = selectedPaymentInfo?.paymentMethod === paymentInfo.paymentMethod;
|
|
41601
41479
|
switch (paymentInfo.paymentMethod) {
|
|
41602
41480
|
case PaymentMethod.ACCOUNT_BALANCE:
|
|
41603
|
-
return /* @__PURE__ */
|
|
41481
|
+
return /* @__PURE__ */ React241.createElement(
|
|
41604
41482
|
AccountBalancePaymentMethodItem,
|
|
41605
41483
|
{
|
|
41606
41484
|
showSelectedCheckmark,
|
|
@@ -41612,7 +41490,7 @@ var ConnectedSource = ({
|
|
|
41612
41490
|
}
|
|
41613
41491
|
);
|
|
41614
41492
|
case PaymentMethod.BROKERAGE:
|
|
41615
|
-
return /* @__PURE__ */
|
|
41493
|
+
return /* @__PURE__ */ React241.createElement(
|
|
41616
41494
|
ConnectedBluvoPaymentMethodItem,
|
|
41617
41495
|
{
|
|
41618
41496
|
paymentMethodInfo: paymentInfo,
|
|
@@ -41623,7 +41501,7 @@ var ConnectedSource = ({
|
|
|
41623
41501
|
}
|
|
41624
41502
|
);
|
|
41625
41503
|
case PaymentMethod.VIRTUAL_BANK:
|
|
41626
|
-
return /* @__PURE__ */
|
|
41504
|
+
return /* @__PURE__ */ React241.createElement(
|
|
41627
41505
|
ActiveFiatAccountPaymentMethodItem,
|
|
41628
41506
|
{
|
|
41629
41507
|
isActive: isSelected,
|
|
@@ -41639,10 +41517,10 @@ var ConnectedSource = ({
|
|
|
41639
41517
|
};
|
|
41640
41518
|
|
|
41641
41519
|
// src/modals/CheckoutModal/SourceChange/SourceList.tsx
|
|
41642
|
-
import
|
|
41520
|
+
import React246 from "react";
|
|
41643
41521
|
|
|
41644
41522
|
// src/modals/CheckoutModal/SourceChange/FlatList.tsx
|
|
41645
|
-
import
|
|
41523
|
+
import React242, { Fragment as Fragment2 } from "react";
|
|
41646
41524
|
function FlatList({
|
|
41647
41525
|
groups,
|
|
41648
41526
|
boxClassName,
|
|
@@ -41650,7 +41528,7 @@ function FlatList({
|
|
|
41650
41528
|
footer,
|
|
41651
41529
|
testId
|
|
41652
41530
|
}) {
|
|
41653
|
-
return /* @__PURE__ */
|
|
41531
|
+
return /* @__PURE__ */ React242.createElement(
|
|
41654
41532
|
Box,
|
|
41655
41533
|
{
|
|
41656
41534
|
display: "flex",
|
|
@@ -41659,7 +41537,7 @@ function FlatList({
|
|
|
41659
41537
|
testId,
|
|
41660
41538
|
...{ [WITH_EMPTY_STATE_DATA_ATTRIBUTE]: true }
|
|
41661
41539
|
},
|
|
41662
|
-
groups.map((group, index) => /* @__PURE__ */
|
|
41540
|
+
groups.map((group, index) => /* @__PURE__ */ React242.createElement(Fragment2, { key: index }, index > 0 && /* @__PURE__ */ React242.createElement(
|
|
41663
41541
|
FunDivider,
|
|
41664
41542
|
{
|
|
41665
41543
|
label: dividerLabel,
|
|
@@ -41673,7 +41551,7 @@ function FlatList({
|
|
|
41673
41551
|
}
|
|
41674
41552
|
|
|
41675
41553
|
// src/modals/CheckoutModal/SourceChange/GroupedList.tsx
|
|
41676
|
-
import
|
|
41554
|
+
import React243 from "react";
|
|
41677
41555
|
function GroupedList({
|
|
41678
41556
|
groups,
|
|
41679
41557
|
showLabels,
|
|
@@ -41681,7 +41559,7 @@ function GroupedList({
|
|
|
41681
41559
|
testId
|
|
41682
41560
|
}) {
|
|
41683
41561
|
const containerClass = showLabels ? sourceListGroupContainerStyles : sourceListGroupContainerNoLabelsStyles;
|
|
41684
|
-
return /* @__PURE__ */
|
|
41562
|
+
return /* @__PURE__ */ React243.createElement(
|
|
41685
41563
|
Box,
|
|
41686
41564
|
{
|
|
41687
41565
|
display: "flex",
|
|
@@ -41689,7 +41567,7 @@ function GroupedList({
|
|
|
41689
41567
|
testId,
|
|
41690
41568
|
...{ [WITH_EMPTY_STATE_DATA_ATTRIBUTE]: true }
|
|
41691
41569
|
},
|
|
41692
|
-
/* @__PURE__ */
|
|
41570
|
+
/* @__PURE__ */ React243.createElement(Box, { display: "flex", flexDirection: "column", className: containerClass }, groups.map((group, index) => /* @__PURE__ */ React243.createElement(Box, { key: index, display: "flex", flexDirection: "column", gap: "8" }, showLabels && group.label && (group.labelTooltip ? /* @__PURE__ */ React243.createElement(Box, { display: "flex", alignItems: "center", gap: "4" }, /* @__PURE__ */ React243.createElement(
|
|
41693
41571
|
Text,
|
|
41694
41572
|
{
|
|
41695
41573
|
color: "secondaryText",
|
|
@@ -41697,7 +41575,7 @@ function GroupedList({
|
|
|
41697
41575
|
weight: "sourceListSectionLabelFontWeight"
|
|
41698
41576
|
},
|
|
41699
41577
|
group.label
|
|
41700
|
-
), /* @__PURE__ */
|
|
41578
|
+
), /* @__PURE__ */ React243.createElement(FunTooltip, { content: group.labelTooltip }, /* @__PURE__ */ React243.createElement(
|
|
41701
41579
|
Box,
|
|
41702
41580
|
{
|
|
41703
41581
|
color: { base: "tertiaryText", hover: "primaryText" },
|
|
@@ -41705,8 +41583,8 @@ function GroupedList({
|
|
|
41705
41583
|
alignItems: "center",
|
|
41706
41584
|
justifyContent: "center"
|
|
41707
41585
|
},
|
|
41708
|
-
/* @__PURE__ */
|
|
41709
|
-
))) : /* @__PURE__ */
|
|
41586
|
+
/* @__PURE__ */ React243.createElement(FunInfoIcon, { size: 12 })
|
|
41587
|
+
))) : /* @__PURE__ */ React243.createElement(
|
|
41710
41588
|
Text,
|
|
41711
41589
|
{
|
|
41712
41590
|
color: "secondaryText",
|
|
@@ -41714,13 +41592,13 @@ function GroupedList({
|
|
|
41714
41592
|
weight: "sourceListSectionLabelFontWeight"
|
|
41715
41593
|
},
|
|
41716
41594
|
group.label
|
|
41717
|
-
)), /* @__PURE__ */
|
|
41595
|
+
)), /* @__PURE__ */ React243.createElement(Box, { className: boxClassName }, group.children))))
|
|
41718
41596
|
);
|
|
41719
41597
|
}
|
|
41720
41598
|
|
|
41721
41599
|
// src/modals/CheckoutModal/SourceChange/PayPal.tsx
|
|
41722
41600
|
import { MeldServiceProvider as MeldServiceProvider2 } from "@funkit/api-base";
|
|
41723
|
-
import
|
|
41601
|
+
import React244, { useCallback as useCallback48 } from "react";
|
|
41724
41602
|
function PayPal() {
|
|
41725
41603
|
const { apiKey } = useFunkitConfig();
|
|
41726
41604
|
const { data: defaultCurrency } = useMeldDefaultCurrency(PaymentMethod.CARD);
|
|
@@ -41747,7 +41625,7 @@ function PayPal() {
|
|
|
41747
41625
|
return null;
|
|
41748
41626
|
}
|
|
41749
41627
|
const isLoading = isPaypalReady && (!defaultCurrency || !amounts[1] || isPending);
|
|
41750
|
-
return /* @__PURE__ */
|
|
41628
|
+
return /* @__PURE__ */ React244.createElement(
|
|
41751
41629
|
PayPalPaymentMethodItem,
|
|
41752
41630
|
{
|
|
41753
41631
|
isClickable: !isLoading,
|
|
@@ -41759,7 +41637,7 @@ function PayPal() {
|
|
|
41759
41637
|
}
|
|
41760
41638
|
|
|
41761
41639
|
// src/modals/CheckoutModal/SourceChange/buildSourceGroups.tsx
|
|
41762
|
-
import
|
|
41640
|
+
import React245 from "react";
|
|
41763
41641
|
function buildSourceGroups(args) {
|
|
41764
41642
|
if (isAaveCustomer(args.apiKey)) {
|
|
41765
41643
|
return buildAaveSourceGroups(args);
|
|
@@ -41779,7 +41657,7 @@ function buildDefaultSourceGroups({
|
|
|
41779
41657
|
if (preferred.length > 0) {
|
|
41780
41658
|
groups.push({
|
|
41781
41659
|
label: isFallback ? t("sourceChange.mostPopular") : t("sourceChange.connected"),
|
|
41782
|
-
children: /* @__PURE__ */
|
|
41660
|
+
children: /* @__PURE__ */ React245.createElement(React245.Fragment, null, preferred)
|
|
41783
41661
|
});
|
|
41784
41662
|
}
|
|
41785
41663
|
const moreChildren = [...moreSources, ...unavailable];
|
|
@@ -41789,7 +41667,7 @@ function buildDefaultSourceGroups({
|
|
|
41789
41667
|
// when there's no preceding preferred group. Labeled mode skips
|
|
41790
41668
|
// groups with no label.
|
|
41791
41669
|
label: preferred.length > 0 ? t("sourceChange.moreOptions") : void 0,
|
|
41792
|
-
children: /* @__PURE__ */
|
|
41670
|
+
children: /* @__PURE__ */ React245.createElement(React245.Fragment, null, moreChildren)
|
|
41793
41671
|
});
|
|
41794
41672
|
}
|
|
41795
41673
|
if (!isSwappedEnabled) {
|
|
@@ -41820,7 +41698,7 @@ function buildAaveSourceGroups({
|
|
|
41820
41698
|
groups.push({
|
|
41821
41699
|
label: nativeRow ? t("sourceChange.useOtherAssets") : t("sourceChange.useAnyAsset"),
|
|
41822
41700
|
labelTooltip: nativeRow ? t("sourceChange.useOtherAssetsTooltip") : void 0,
|
|
41823
|
-
children: /* @__PURE__ */
|
|
41701
|
+
children: /* @__PURE__ */ React245.createElement(React245.Fragment, null, otherAssetsChildren)
|
|
41824
41702
|
});
|
|
41825
41703
|
}
|
|
41826
41704
|
return { layout: "grouped", groups, showLabels: true };
|
|
@@ -41852,18 +41730,18 @@ function SourceList({
|
|
|
41852
41730
|
nativeRow
|
|
41853
41731
|
});
|
|
41854
41732
|
if (result.layout === "flat") {
|
|
41855
|
-
return /* @__PURE__ */
|
|
41733
|
+
return /* @__PURE__ */ React246.createElement(
|
|
41856
41734
|
FlatList,
|
|
41857
41735
|
{
|
|
41858
41736
|
groups: result.groups,
|
|
41859
41737
|
boxClassName,
|
|
41860
41738
|
dividerLabel: t("sourceChange.more"),
|
|
41861
|
-
footer: /* @__PURE__ */
|
|
41739
|
+
footer: /* @__PURE__ */ React246.createElement(PayPal, null),
|
|
41862
41740
|
testId
|
|
41863
41741
|
}
|
|
41864
41742
|
);
|
|
41865
41743
|
}
|
|
41866
|
-
return /* @__PURE__ */
|
|
41744
|
+
return /* @__PURE__ */ React246.createElement(
|
|
41867
41745
|
GroupedList,
|
|
41868
41746
|
{
|
|
41869
41747
|
groups: result.groups,
|
|
@@ -41874,6 +41752,26 @@ function SourceList({
|
|
|
41874
41752
|
);
|
|
41875
41753
|
}
|
|
41876
41754
|
|
|
41755
|
+
// src/hooks/useStartBitcoinLightning.ts
|
|
41756
|
+
import { lightningChain as lightningChain3 } from "@funkit/chains";
|
|
41757
|
+
import { useCallback as useCallback49 } from "react";
|
|
41758
|
+
function useStartBitcoinLightning() {
|
|
41759
|
+
const { updateSelectedPaymentMethodInfo, updateSourceAsset } = useCheckoutContext();
|
|
41760
|
+
return useCallback49(() => {
|
|
41761
|
+
const paymentMethodInfo = createPaymentMethodInfo({
|
|
41762
|
+
paymentMethod: PaymentMethod.BITCOIN_LIGHTNING
|
|
41763
|
+
});
|
|
41764
|
+
updateSelectedPaymentMethodInfo(paymentMethodInfo);
|
|
41765
|
+
updateSourceAsset({
|
|
41766
|
+
iconSrc: chainMetadataById[String(lightningChain3.id)]?.iconUrl ?? "",
|
|
41767
|
+
symbol: "BTC",
|
|
41768
|
+
tokenAddress: NATIVE_TOKEN,
|
|
41769
|
+
pickedChainId: String(lightningChain3.id)
|
|
41770
|
+
});
|
|
41771
|
+
return paymentMethodInfo;
|
|
41772
|
+
}, [updateSelectedPaymentMethodInfo, updateSourceAsset]);
|
|
41773
|
+
}
|
|
41774
|
+
|
|
41877
41775
|
// src/modals/CheckoutModal/SourceChange/SourceChange.tsx
|
|
41878
41776
|
var SourceChangeInfo = {
|
|
41879
41777
|
Component: SourceChange,
|
|
@@ -41983,6 +41881,7 @@ function SourceChange({
|
|
|
41983
41881
|
const { logEvent } = useTrack();
|
|
41984
41882
|
const bottomSectionRef = useBottomSectionRef();
|
|
41985
41883
|
const { t } = useFunkitTranslation();
|
|
41884
|
+
const startBitcoinLightning = useStartBitcoinLightning();
|
|
41986
41885
|
const {
|
|
41987
41886
|
checkoutItem,
|
|
41988
41887
|
updateSelectedPaymentMethodInfo,
|
|
@@ -42039,7 +41938,7 @@ function SourceChange({
|
|
|
42039
41938
|
return void 0;
|
|
42040
41939
|
}
|
|
42041
41940
|
const holding = Object.values(walletHoldings).find(
|
|
42042
|
-
(h) =>
|
|
41941
|
+
(h) => isTokenEquivalent14({
|
|
42043
41942
|
firstTokenChainId: h.pickedChainId,
|
|
42044
41943
|
firstTokenAddress: h.tokenAddress,
|
|
42045
41944
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -42157,16 +42056,7 @@ function SourceChange({
|
|
|
42157
42056
|
brokerageFailed: false
|
|
42158
42057
|
});
|
|
42159
42058
|
} else if (newSource2 === PaymentMethod.BITCOIN_LIGHTNING) {
|
|
42160
|
-
const paymentMethodInfo2 =
|
|
42161
|
-
paymentMethod: PaymentMethod.BITCOIN_LIGHTNING
|
|
42162
|
-
});
|
|
42163
|
-
updateSelectedPaymentMethodInfo(paymentMethodInfo2);
|
|
42164
|
-
updateSourceAsset({
|
|
42165
|
-
iconSrc: chainMetadataById[String(lightningChain3.id)]?.iconUrl ?? "",
|
|
42166
|
-
symbol: "BTC",
|
|
42167
|
-
tokenAddress: NATIVE_TOKEN,
|
|
42168
|
-
pickedChainId: String(lightningChain3.id)
|
|
42169
|
-
});
|
|
42059
|
+
const paymentMethodInfo2 = startBitcoinLightning();
|
|
42170
42060
|
onNext({
|
|
42171
42061
|
connectNew: true,
|
|
42172
42062
|
reverseAnimation: true,
|
|
@@ -42245,7 +42135,7 @@ function SourceChange({
|
|
|
42245
42135
|
};
|
|
42246
42136
|
function renderSource(source) {
|
|
42247
42137
|
if (isConnectablePaymentMethodInfo(source)) {
|
|
42248
|
-
return /* @__PURE__ */
|
|
42138
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42249
42139
|
ConnectedSource,
|
|
42250
42140
|
{
|
|
42251
42141
|
key: source.title,
|
|
@@ -42258,7 +42148,7 @@ function SourceChange({
|
|
|
42258
42148
|
}
|
|
42259
42149
|
);
|
|
42260
42150
|
}
|
|
42261
|
-
return /* @__PURE__ */
|
|
42151
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42262
42152
|
AddPaymentMethodItem,
|
|
42263
42153
|
{
|
|
42264
42154
|
key: source,
|
|
@@ -42270,7 +42160,7 @@ function SourceChange({
|
|
|
42270
42160
|
);
|
|
42271
42161
|
}
|
|
42272
42162
|
function renderUnavailable({ method, reason }) {
|
|
42273
|
-
return /* @__PURE__ */
|
|
42163
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42274
42164
|
AddPaymentMethodItem,
|
|
42275
42165
|
{
|
|
42276
42166
|
key: method,
|
|
@@ -42278,7 +42168,7 @@ function SourceChange({
|
|
|
42278
42168
|
isActive: false,
|
|
42279
42169
|
isClickable: false,
|
|
42280
42170
|
onClick: noop6,
|
|
42281
|
-
customValueIcon: /* @__PURE__ */
|
|
42171
|
+
customValueIcon: /* @__PURE__ */ React247.createElement(PaymentMethodDisabledBadge, { reason })
|
|
42282
42172
|
}
|
|
42283
42173
|
);
|
|
42284
42174
|
}
|
|
@@ -42286,7 +42176,7 @@ function SourceChange({
|
|
|
42286
42176
|
if (tab === "withdraw") {
|
|
42287
42177
|
return (
|
|
42288
42178
|
// TODO: Integrate the full withdrawal flow
|
|
42289
|
-
/* @__PURE__ */
|
|
42179
|
+
/* @__PURE__ */ React247.createElement(
|
|
42290
42180
|
WithdrawalMethodSelect,
|
|
42291
42181
|
{
|
|
42292
42182
|
sourceChainId: targetChainId,
|
|
@@ -42298,7 +42188,7 @@ function SourceChange({
|
|
|
42298
42188
|
);
|
|
42299
42189
|
}
|
|
42300
42190
|
if (isSwappedEnabled && tab === "fiat") {
|
|
42301
|
-
return /* @__PURE__ */
|
|
42191
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42302
42192
|
FormOfPaymentsList,
|
|
42303
42193
|
{
|
|
42304
42194
|
fopsData: fopsData.data,
|
|
@@ -42311,7 +42201,7 @@ function SourceChange({
|
|
|
42311
42201
|
}
|
|
42312
42202
|
);
|
|
42313
42203
|
}
|
|
42314
|
-
const nativeRow = nativeHolding && connectedWallet ? /* @__PURE__ */
|
|
42204
|
+
const nativeRow = nativeHolding && connectedWallet ? /* @__PURE__ */ React247.createElement(
|
|
42315
42205
|
NativeAssetItem,
|
|
42316
42206
|
{
|
|
42317
42207
|
asset: nativeHolding,
|
|
@@ -42321,7 +42211,7 @@ function SourceChange({
|
|
|
42321
42211
|
onClick: handleNativeAssetClick
|
|
42322
42212
|
}
|
|
42323
42213
|
) : void 0;
|
|
42324
|
-
return /* @__PURE__ */
|
|
42214
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42325
42215
|
SourceList,
|
|
42326
42216
|
{
|
|
42327
42217
|
preferred: preferred.map(renderSource),
|
|
@@ -42333,21 +42223,21 @@ function SourceChange({
|
|
|
42333
42223
|
}
|
|
42334
42224
|
);
|
|
42335
42225
|
}
|
|
42336
|
-
return /* @__PURE__ */
|
|
42226
|
+
return /* @__PURE__ */ React247.createElement(Box, { id: "source-change-page", style: { display: "contents" } }, /* @__PURE__ */ React247.createElement(
|
|
42337
42227
|
Box,
|
|
42338
42228
|
{
|
|
42339
42229
|
className: paymentMethodStaticArea,
|
|
42340
42230
|
display: "flex",
|
|
42341
42231
|
flexDirection: "column"
|
|
42342
42232
|
},
|
|
42343
|
-
/* @__PURE__ */
|
|
42233
|
+
/* @__PURE__ */ React247.createElement(CheckoutTopAnnouncementBanner, null),
|
|
42344
42234
|
customTopComponent?.({
|
|
42345
42235
|
onStepChange,
|
|
42346
42236
|
modalState,
|
|
42347
42237
|
dynamicRoutingId: checkoutConfig?.dynamicRoutingId,
|
|
42348
42238
|
applyDynamicTargetAssetCandidate
|
|
42349
42239
|
}),
|
|
42350
|
-
isTargetAssetSelectable && dynamicTargetAssets && /* @__PURE__ */
|
|
42240
|
+
isTargetAssetSelectable && dynamicTargetAssets && /* @__PURE__ */ React247.createElement(Box, { marginBottom: "8" }, /* @__PURE__ */ React247.createElement(
|
|
42351
42241
|
ReceiveTokenDropdown,
|
|
42352
42242
|
{
|
|
42353
42243
|
activeItemLabel: t("sourceChange.selectDestinationTokenLabel"),
|
|
@@ -42360,7 +42250,7 @@ function SourceChange({
|
|
|
42360
42250
|
tokens: dynamicTargetAssets
|
|
42361
42251
|
}
|
|
42362
42252
|
))
|
|
42363
|
-
), showContentDivider && /* @__PURE__ */
|
|
42253
|
+
), showContentDivider && /* @__PURE__ */ React247.createElement(
|
|
42364
42254
|
FunDivider,
|
|
42365
42255
|
{
|
|
42366
42256
|
marginTop: "16",
|
|
@@ -42368,14 +42258,14 @@ function SourceChange({
|
|
|
42368
42258
|
borderColor: "lightStroke",
|
|
42369
42259
|
className: fullWidthContentDivider
|
|
42370
42260
|
}
|
|
42371
|
-
), /* @__PURE__ */
|
|
42261
|
+
), /* @__PURE__ */ React247.createElement(
|
|
42372
42262
|
Box,
|
|
42373
42263
|
{
|
|
42374
42264
|
className: paymentMethodStaticArea,
|
|
42375
42265
|
display: "flex",
|
|
42376
42266
|
flexDirection: "column"
|
|
42377
42267
|
},
|
|
42378
|
-
isSwappedEnabled && /* @__PURE__ */
|
|
42268
|
+
isSwappedEnabled && /* @__PURE__ */ React247.createElement(
|
|
42379
42269
|
CryptoCashToggle,
|
|
42380
42270
|
{
|
|
42381
42271
|
marginTop: cryptoCashToggleMarginTop,
|
|
@@ -42384,16 +42274,16 @@ function SourceChange({
|
|
|
42384
42274
|
tabs: tabOrder
|
|
42385
42275
|
}
|
|
42386
42276
|
),
|
|
42387
|
-
isFreeUsdcBannerEnabled && (paymentMethodTab === "crypto" || !isSwappedEnabled) && /* @__PURE__ */
|
|
42388
|
-
isUnderComplianceReview && /* @__PURE__ */
|
|
42389
|
-
), isSwappedEnabled && paymentMethodTab === "fiat" && /* @__PURE__ */
|
|
42277
|
+
isFreeUsdcBannerEnabled && (paymentMethodTab === "crypto" || !isSwappedEnabled) && /* @__PURE__ */ React247.createElement(FreeUsdcBanner, { type: "deposit" }),
|
|
42278
|
+
isUnderComplianceReview && /* @__PURE__ */ React247.createElement(ComplianceReviewBanner, { checkoutId: modalState.checkoutId })
|
|
42279
|
+
), isSwappedEnabled && paymentMethodTab === "fiat" && /* @__PURE__ */ React247.createElement(
|
|
42390
42280
|
FunDivider,
|
|
42391
42281
|
{
|
|
42392
42282
|
borderColor: "lightStroke",
|
|
42393
42283
|
className: fullWidthContentDivider,
|
|
42394
42284
|
visible: paymentListScroll.hasTopDivider
|
|
42395
42285
|
}
|
|
42396
|
-
), /* @__PURE__ */
|
|
42286
|
+
), /* @__PURE__ */ React247.createElement(
|
|
42397
42287
|
PaddedScrollableArea,
|
|
42398
42288
|
{
|
|
42399
42289
|
ref: paymentListScroll.ref,
|
|
@@ -42401,7 +42291,7 @@ function SourceChange({
|
|
|
42401
42291
|
isScrolling: paymentListScroll.isScrolling,
|
|
42402
42292
|
paddingBottom: hasBottomBar ? void 0 : "modalPaddingBottomLower"
|
|
42403
42293
|
},
|
|
42404
|
-
leavingTab !== null && /* @__PURE__ */
|
|
42294
|
+
leavingTab !== null && /* @__PURE__ */ React247.createElement(
|
|
42405
42295
|
Box,
|
|
42406
42296
|
{
|
|
42407
42297
|
key: leavingTab,
|
|
@@ -42415,15 +42305,15 @@ function SourceChange({
|
|
|
42415
42305
|
},
|
|
42416
42306
|
renderPaymentMethodContent(leavingTab)
|
|
42417
42307
|
),
|
|
42418
|
-
/* @__PURE__ */
|
|
42419
|
-
), /* @__PURE__ */
|
|
42308
|
+
/* @__PURE__ */ React247.createElement(Box, { className: leavingTab !== null ? enteringClass : void 0 }, renderPaymentMethodContent(paymentMethodTab))
|
|
42309
|
+
), /* @__PURE__ */ React247.createElement(Box, { className: emptyStateStyles }, /* @__PURE__ */ React247.createElement(
|
|
42420
42310
|
FunNoResults,
|
|
42421
42311
|
{
|
|
42422
42312
|
text: t("checkout.noAvailableTokensMessage"),
|
|
42423
42313
|
title: t("checkout.noAvailableTokens"),
|
|
42424
42314
|
variant: "actionable"
|
|
42425
42315
|
}
|
|
42426
|
-
)), isSwappedEnabled && paymentMethodTab === "fiat" && hasBottomBar && /* @__PURE__ */
|
|
42316
|
+
)), isSwappedEnabled && paymentMethodTab === "fiat" && hasBottomBar && /* @__PURE__ */ React247.createElement(
|
|
42427
42317
|
FunDivider,
|
|
42428
42318
|
{
|
|
42429
42319
|
borderColor: "lightStroke",
|
|
@@ -42431,7 +42321,7 @@ function SourceChange({
|
|
|
42431
42321
|
visible: paymentListScroll.isScrollable && !paymentListScroll.isAtBottom
|
|
42432
42322
|
}
|
|
42433
42323
|
), bottomSectionRef && createPortal20(
|
|
42434
|
-
/* @__PURE__ */
|
|
42324
|
+
/* @__PURE__ */ React247.createElement(
|
|
42435
42325
|
Dialog.BottomBar,
|
|
42436
42326
|
{
|
|
42437
42327
|
actionButtonProps: isAutoContinue ? void 0 : {
|
|
@@ -42460,7 +42350,7 @@ function trackEventForTabChange(checkoutItem, tab) {
|
|
|
42460
42350
|
|
|
42461
42351
|
// src/modals/CheckoutModal/SwappedIframe/SwappedIframeController.tsx
|
|
42462
42352
|
import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
42463
|
-
import
|
|
42353
|
+
import React248, { useEffect as useEffect68, useRef as useRef33 } from "react";
|
|
42464
42354
|
import { createPortal as createPortal21 } from "react-dom";
|
|
42465
42355
|
import { Trans as Trans19 } from "react-i18next";
|
|
42466
42356
|
var SwappedIframeInfo = {
|
|
@@ -42691,16 +42581,16 @@ function SwappedIframeController({
|
|
|
42691
42581
|
onTimeout: () => setModalState((s) => ({ ...s, error: true }))
|
|
42692
42582
|
});
|
|
42693
42583
|
if (modalState.error) {
|
|
42694
|
-
return /* @__PURE__ */
|
|
42584
|
+
return /* @__PURE__ */ React248.createElement(React248.Fragment, null, /* @__PURE__ */ React248.createElement(ModalErrorState, { minHeight: 268 }, /* @__PURE__ */ React248.createElement(
|
|
42695
42585
|
Trans19,
|
|
42696
42586
|
{
|
|
42697
42587
|
i18nKey: "sourceChange.noFormsOfPayments",
|
|
42698
42588
|
components: {
|
|
42699
|
-
ContactSupportLink: /* @__PURE__ */
|
|
42589
|
+
ContactSupportLink: /* @__PURE__ */ React248.createElement(ContactSupportLink, { size: "inherit" })
|
|
42700
42590
|
}
|
|
42701
42591
|
}
|
|
42702
42592
|
)), bottomSectionRef && createPortal21(
|
|
42703
|
-
/* @__PURE__ */
|
|
42593
|
+
/* @__PURE__ */ React248.createElement(
|
|
42704
42594
|
Dialog.BottomBar,
|
|
42705
42595
|
{
|
|
42706
42596
|
actionButtonProps: {
|
|
@@ -42717,9 +42607,9 @@ function SwappedIframeController({
|
|
|
42717
42607
|
));
|
|
42718
42608
|
}
|
|
42719
42609
|
if (!isSwappedReady) {
|
|
42720
|
-
return /* @__PURE__ */
|
|
42610
|
+
return /* @__PURE__ */ React248.createElement(SwappedIframeSkeleton, { id: "swapped-iframe-loading", onBack });
|
|
42721
42611
|
}
|
|
42722
|
-
return /* @__PURE__ */
|
|
42612
|
+
return /* @__PURE__ */ React248.createElement(Box, { id: "swapped-iframe" });
|
|
42723
42613
|
}
|
|
42724
42614
|
function trackEventForFormOfPayment(fop, checkoutItem, eventName, extras) {
|
|
42725
42615
|
return {
|
|
@@ -42743,6 +42633,52 @@ import { motion as motion17, useAnimationControls as useAnimationControls4 } fro
|
|
|
42743
42633
|
import React257, { useRef as useRef35, useState as useState74 } from "react";
|
|
42744
42634
|
import { createPortal as createPortal22 } from "react-dom";
|
|
42745
42635
|
|
|
42636
|
+
// src/components/BitcoinLightningBanner/BitcoinLightningBanner.tsx
|
|
42637
|
+
import { lightningChain as lightningChain5 } from "@funkit/chains";
|
|
42638
|
+
import React249 from "react";
|
|
42639
|
+
var BitcoinLightningBanner = ({
|
|
42640
|
+
onClick
|
|
42641
|
+
}) => {
|
|
42642
|
+
const { t } = useFunkitTranslation();
|
|
42643
|
+
return /* @__PURE__ */ React249.createElement(
|
|
42644
|
+
Box,
|
|
42645
|
+
{
|
|
42646
|
+
testId: "bitcoin-lightning-banner",
|
|
42647
|
+
width: "full",
|
|
42648
|
+
borderRadius: "connectButton",
|
|
42649
|
+
background: "offBackground",
|
|
42650
|
+
display: "flex",
|
|
42651
|
+
flexDirection: "row",
|
|
42652
|
+
alignItems: "center",
|
|
42653
|
+
gap: "8",
|
|
42654
|
+
paddingX: "10",
|
|
42655
|
+
paddingY: "8"
|
|
42656
|
+
},
|
|
42657
|
+
/* @__PURE__ */ React249.createElement(Box, { display: "flex", alignItems: "center", style: { flexShrink: 0 } }, /* @__PURE__ */ React249.createElement(
|
|
42658
|
+
AsyncImage,
|
|
42659
|
+
{
|
|
42660
|
+
alt: "Lightning",
|
|
42661
|
+
src: chainMetadataById[String(lightningChain5.id)]?.iconUrl ?? "",
|
|
42662
|
+
width: 16,
|
|
42663
|
+
height: 16,
|
|
42664
|
+
borderRadius: "full",
|
|
42665
|
+
borderColor: { custom: "rgba(0, 0, 0, 0.1)" }
|
|
42666
|
+
}
|
|
42667
|
+
)),
|
|
42668
|
+
/* @__PURE__ */ React249.createElement(Text, { as: "div", size: "12", color: "primaryText" }, t("transferToken.depositBitcoinLightning"), " ", /* @__PURE__ */ React249.createElement(
|
|
42669
|
+
FunLinkButton,
|
|
42670
|
+
{
|
|
42671
|
+
text: t("transferToken.lightningTryItNow"),
|
|
42672
|
+
onClick,
|
|
42673
|
+
variant: "accent",
|
|
42674
|
+
size: "12",
|
|
42675
|
+
weight: "medium",
|
|
42676
|
+
inline: true
|
|
42677
|
+
}
|
|
42678
|
+
))
|
|
42679
|
+
);
|
|
42680
|
+
};
|
|
42681
|
+
|
|
42746
42682
|
// src/components/BottomLinks/BottomLinks.tsx
|
|
42747
42683
|
import React250 from "react";
|
|
42748
42684
|
|
|
@@ -43175,7 +43111,7 @@ var TransferTokenDetails = ({
|
|
|
43175
43111
|
};
|
|
43176
43112
|
|
|
43177
43113
|
// src/modals/CheckoutModal/TransferToken/useTransferTokenTracking.ts
|
|
43178
|
-
import { useCallback as
|
|
43114
|
+
import { useCallback as useCallback50, useEffect as useEffect69, useRef as useRef34 } from "react";
|
|
43179
43115
|
|
|
43180
43116
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.ts
|
|
43181
43117
|
function getNotificationId(item) {
|
|
@@ -43281,7 +43217,7 @@ function useTransferTokenTracking({
|
|
|
43281
43217
|
});
|
|
43282
43218
|
}
|
|
43283
43219
|
}, [depositAddress, fromChainId, toChainId, toTokenAddress]);
|
|
43284
|
-
const trackAddressCopied =
|
|
43220
|
+
const trackAddressCopied = useCallback50(() => {
|
|
43285
43221
|
logEvent({
|
|
43286
43222
|
eventName: "fc::deposit::transfer::address::copied" /* DEPOSIT_TRANSFER_ADDRESS_COPIED */,
|
|
43287
43223
|
metadata: {
|
|
@@ -43290,7 +43226,7 @@ function useTransferTokenTracking({
|
|
|
43290
43226
|
}
|
|
43291
43227
|
});
|
|
43292
43228
|
}, [fromChainId, fromTokenSymbol, logEvent]);
|
|
43293
|
-
const trackImpactExpanded =
|
|
43229
|
+
const trackImpactExpanded = useCallback50(
|
|
43294
43230
|
(estPriceImpactPct) => {
|
|
43295
43231
|
logEvent({
|
|
43296
43232
|
eventName: "fc::deposit::transfer::impact::viewed" /* DEPOSIT_TRANSFER_IMPACT_VIEWED */,
|
|
@@ -43303,7 +43239,7 @@ function useTransferTokenTracking({
|
|
|
43303
43239
|
},
|
|
43304
43240
|
[fromChainId, fromTokenSymbol, logEvent]
|
|
43305
43241
|
);
|
|
43306
|
-
const trackSourceChainChange =
|
|
43242
|
+
const trackSourceChainChange = useCallback50(
|
|
43307
43243
|
(newChainId) => {
|
|
43308
43244
|
if (newChainId === fromChainId) {
|
|
43309
43245
|
return;
|
|
@@ -43319,7 +43255,7 @@ function useTransferTokenTracking({
|
|
|
43319
43255
|
},
|
|
43320
43256
|
[fromChainId, fromTokenSymbol, logEvent]
|
|
43321
43257
|
);
|
|
43322
|
-
const trackSourceTokenChange =
|
|
43258
|
+
const trackSourceTokenChange = useCallback50(
|
|
43323
43259
|
(newTokenSymbol) => {
|
|
43324
43260
|
if (newTokenSymbol === fromTokenSymbol) {
|
|
43325
43261
|
return;
|
|
@@ -43411,7 +43347,7 @@ function useNotificationTracking({
|
|
|
43411
43347
|
}
|
|
43412
43348
|
}
|
|
43413
43349
|
}, [logEvent, status]);
|
|
43414
|
-
const trackDismissal =
|
|
43350
|
+
const trackDismissal = useCallback50(() => {
|
|
43415
43351
|
if (!itemRef.current || !notificationDisplayedAtRef.current) {
|
|
43416
43352
|
return;
|
|
43417
43353
|
}
|
|
@@ -43424,7 +43360,7 @@ function useNotificationTracking({
|
|
|
43424
43360
|
);
|
|
43425
43361
|
reasonRef.current = "dismissed";
|
|
43426
43362
|
}, [logEvent]);
|
|
43427
|
-
const trackShowMore =
|
|
43363
|
+
const trackShowMore = useCallback50(() => {
|
|
43428
43364
|
if (!itemRef.current || !notificationDisplayedAtRef.current) {
|
|
43429
43365
|
return;
|
|
43430
43366
|
}
|
|
@@ -43503,6 +43439,7 @@ function getDepositCreditedEventData(item, addressDisplayedAtMs, notificationDis
|
|
|
43503
43439
|
}
|
|
43504
43440
|
|
|
43505
43441
|
// src/modals/CheckoutModal/TransferToken/TransferToken.tsx
|
|
43442
|
+
import { lightningChain as lightningChain6 } from "@funkit/chains";
|
|
43506
43443
|
var TransferTokenInfo = {
|
|
43507
43444
|
Component: TransferToken,
|
|
43508
43445
|
disableBack: ({ isSourceNavWidgetEnabled }) => isSourceNavWidgetEnabled,
|
|
@@ -43519,11 +43456,28 @@ var TransferTokenInfo = {
|
|
|
43519
43456
|
var TRANSFER_TOKEN_LOG_PREFIX = "transferToken";
|
|
43520
43457
|
function TransferToken({
|
|
43521
43458
|
onNext,
|
|
43459
|
+
onStepChange,
|
|
43522
43460
|
modalState
|
|
43523
43461
|
}) {
|
|
43524
43462
|
const { t } = useFunkitTranslation();
|
|
43525
43463
|
const controls = useAnimationControls4();
|
|
43526
43464
|
const udaParams = useUDAParams();
|
|
43465
|
+
const startBitcoinLightning = useStartBitcoinLightning();
|
|
43466
|
+
const { isLightningEnabled } = usePaymentMethodEnablement();
|
|
43467
|
+
const isBtcLightningBannerEnabled = useFeatureGate(
|
|
43468
|
+
"enable-btc-lightning-banner"
|
|
43469
|
+
);
|
|
43470
|
+
const handleBitcoinLightningClick = () => {
|
|
43471
|
+
logger.info("transferToken_startBitcoinLightning", {
|
|
43472
|
+
chainId: lightningChain6.id
|
|
43473
|
+
});
|
|
43474
|
+
const paymentMethodInfo = startBitcoinLightning();
|
|
43475
|
+
onStepChange({
|
|
43476
|
+
...extractCommonState(modalState),
|
|
43477
|
+
step: "input_amount" /* INPUT_AMOUNT */,
|
|
43478
|
+
paymentMethodInfo
|
|
43479
|
+
});
|
|
43480
|
+
};
|
|
43527
43481
|
const [qrCodeHover, setQrCodeHover] = useState74(false);
|
|
43528
43482
|
const isSourceNavWidgetEnabled = modalState.startingStep === "select_asset" /* SELECT_ASSET */;
|
|
43529
43483
|
const { textCustomizations, uiCustomizations } = useFunkitConfig();
|
|
@@ -43547,6 +43501,7 @@ function TransferToken({
|
|
|
43547
43501
|
transferInit
|
|
43548
43502
|
});
|
|
43549
43503
|
const chainIds = Object.keys(assets).map(Number);
|
|
43504
|
+
const showBitcoinLightningBanner = isBtcLightningBannerEnabled && isLightningEnabled && selectedToken === "BTC";
|
|
43550
43505
|
const {
|
|
43551
43506
|
depositAddress,
|
|
43552
43507
|
depositAddressTooltip,
|
|
@@ -43710,6 +43665,7 @@ function TransferToken({
|
|
|
43710
43665
|
chainIdSortOrder
|
|
43711
43666
|
}
|
|
43712
43667
|
),
|
|
43668
|
+
showBitcoinLightningBanner && /* @__PURE__ */ React257.createElement(BitcoinLightningBanner, { onClick: handleBitcoinLightningClick }),
|
|
43713
43669
|
/* @__PURE__ */ React257.createElement(
|
|
43714
43670
|
Box,
|
|
43715
43671
|
{
|
|
@@ -44170,9 +44126,9 @@ var FiatAccountDetail = {
|
|
|
44170
44126
|
|
|
44171
44127
|
// src/modals/CheckoutModal/VirtualFiatAccount/KycIframe.tsx
|
|
44172
44128
|
import { BridgeCustomerStatus as BridgeCustomerStatus7 } from "@funkit/api-base";
|
|
44173
|
-
import React263, { useCallback as
|
|
44129
|
+
import React263, { useCallback as useCallback51, useEffect as useEffect70, useMemo as useMemo62, useState as useState76 } from "react";
|
|
44174
44130
|
function useIframeListener(listeners, expectedOrigin) {
|
|
44175
|
-
const handleMessage =
|
|
44131
|
+
const handleMessage = useCallback51(
|
|
44176
44132
|
(event) => {
|
|
44177
44133
|
if (!expectedOrigin || event.origin !== expectedOrigin) {
|
|
44178
44134
|
return;
|
|
@@ -44439,7 +44395,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44439
44395
|
useEffect71(() => {
|
|
44440
44396
|
ensureLoadingAccountScreen();
|
|
44441
44397
|
}, [ensureLoadingAccountScreen]);
|
|
44442
|
-
const trackNextState =
|
|
44398
|
+
const trackNextState = useCallback52(
|
|
44443
44399
|
(nextState) => {
|
|
44444
44400
|
const trackEvent = trackEventFromNextState(nextState);
|
|
44445
44401
|
if (trackEvent) {
|
|
@@ -44455,7 +44411,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44455
44411
|
const { clearCheckoutQuoteMessages } = useCheckoutQuoteNotification();
|
|
44456
44412
|
const { getCheckoutProgress } = useCheckoutContext();
|
|
44457
44413
|
const { softHide } = useSoftHiddenCheckout();
|
|
44458
|
-
const onCloseWrapper =
|
|
44414
|
+
const onCloseWrapper = useCallback52(
|
|
44459
44415
|
(options) => {
|
|
44460
44416
|
const normalizedIsNewDeposit = !!options?.isNewDeposit;
|
|
44461
44417
|
const metadata = {
|
|
@@ -44499,7 +44455,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44499
44455
|
const [stateHistory, setHistory] = useState77([]);
|
|
44500
44456
|
const prevStep = useRef36(null);
|
|
44501
44457
|
const hasHistoryEntry = stateHistory.length > 1;
|
|
44502
|
-
const onNext =
|
|
44458
|
+
const onNext = useCallback52(
|
|
44503
44459
|
(payload) => {
|
|
44504
44460
|
if (prevStep.current === modalState.step) {
|
|
44505
44461
|
return;
|
|
@@ -44543,7 +44499,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44543
44499
|
ensureStepQueries
|
|
44544
44500
|
]
|
|
44545
44501
|
);
|
|
44546
|
-
const onStepChange =
|
|
44502
|
+
const onStepChange = useCallback52(
|
|
44547
44503
|
(nextState) => {
|
|
44548
44504
|
if (prevStep.current === modalState.step) {
|
|
44549
44505
|
return;
|
|
@@ -44558,7 +44514,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44558
44514
|
},
|
|
44559
44515
|
[modalState, animate, trackNextState, ensureStepQueries]
|
|
44560
44516
|
);
|
|
44561
|
-
const onBack =
|
|
44517
|
+
const onBack = useCallback52(() => {
|
|
44562
44518
|
clearCheckoutQuoteMessages();
|
|
44563
44519
|
const backStepOverride = checkoutBackMap[modalState.step];
|
|
44564
44520
|
const prevState = [...stateHistory].reverse().find((s) => s.step === backStepOverride) ?? stateHistory[stateHistory.length - 1];
|
|
@@ -44921,7 +44877,7 @@ var HomeCheckoutDisplayRowSkeleton = () => {
|
|
|
44921
44877
|
|
|
44922
44878
|
// src/modals/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.tsx
|
|
44923
44879
|
import {
|
|
44924
|
-
formatCryptoAndStringify as
|
|
44880
|
+
formatCryptoAndStringify as formatCryptoAndStringify8,
|
|
44925
44881
|
formatCurrencyAndStringify as formatCurrencyAndStringify15,
|
|
44926
44882
|
isMobile as isMobile9
|
|
44927
44883
|
} from "@funkit/utils";
|
|
@@ -44981,7 +44937,7 @@ var HomeTokenBalanceDisplayRow = ({
|
|
|
44981
44937
|
justifyContent: "space-between"
|
|
44982
44938
|
},
|
|
44983
44939
|
/* @__PURE__ */ React268.createElement(Text, { color: "primaryText", size: TEXT_SIZE, weight: "regular" }, asset.name),
|
|
44984
|
-
/* @__PURE__ */ React268.createElement(Text, { color: "secondaryText", size: TEXT_SIZE, weight: "regular" },
|
|
44940
|
+
/* @__PURE__ */ React268.createElement(Text, { color: "secondaryText", size: TEXT_SIZE, weight: "regular" }, formatCryptoAndStringify8(normalizedAmount, asset.symbol))
|
|
44985
44941
|
)
|
|
44986
44942
|
),
|
|
44987
44943
|
/* @__PURE__ */ React268.createElement(Text, { color: "primaryText", size: TEXT_SIZE, weight: "regular" }, formatCurrencyAndStringify15(asset.totalUsdValue || 0))
|
|
@@ -45030,7 +44986,7 @@ var HomeTokenBalanceDisplayRowSkeleton = () => {
|
|
|
45030
44986
|
|
|
45031
44987
|
// src/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.tsx
|
|
45032
44988
|
import React272 from "react";
|
|
45033
|
-
import { useCallback as
|
|
44989
|
+
import { useCallback as useCallback53, useState as useState78 } from "react";
|
|
45034
44990
|
|
|
45035
44991
|
// src/components/FunSelect/FunClickOutside.tsx
|
|
45036
44992
|
import React269 from "react";
|
|
@@ -45123,7 +45079,7 @@ var ProfileTitleSection = ({
|
|
|
45123
45079
|
}) => {
|
|
45124
45080
|
const { t } = useFunkitTranslation();
|
|
45125
45081
|
const [isDisconnectExpanded, setIsDisconnectExpanded] = useState78(false);
|
|
45126
|
-
const collapseDisconnect =
|
|
45082
|
+
const collapseDisconnect = useCallback53(
|
|
45127
45083
|
() => setIsDisconnectExpanded(false),
|
|
45128
45084
|
[]
|
|
45129
45085
|
);
|
|
@@ -45517,13 +45473,13 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
45517
45473
|
DEFAULT_CHECKOUT_HISTORY_DETAIL_TITLE
|
|
45518
45474
|
);
|
|
45519
45475
|
const singleActivityPage = "detail" /* DETAIL */;
|
|
45520
|
-
const resetView =
|
|
45476
|
+
const resetView = useCallback54(() => {
|
|
45521
45477
|
setView(returnView ?? 0 /* HOME */);
|
|
45522
45478
|
setSelectedHomeTab("checkouts" /* CHECKOUTS */);
|
|
45523
45479
|
resetActivityTraversal();
|
|
45524
45480
|
}, [resetActivityTraversal, returnView]);
|
|
45525
45481
|
const { animation, animate } = useAnimatedNavigation(void 0);
|
|
45526
|
-
const onSelectActivityWrapper =
|
|
45482
|
+
const onSelectActivityWrapper = useCallback54(
|
|
45527
45483
|
(activity) => {
|
|
45528
45484
|
onSelectActivity({
|
|
45529
45485
|
...activity,
|
|
@@ -45553,7 +45509,7 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
45553
45509
|
const isSingleActivityView = view === 3 /* SINGLE_ACTIVITY */;
|
|
45554
45510
|
const isCheckoutDetailView = isSingleActivityView && singleActivityPage === "detail" /* DETAIL */;
|
|
45555
45511
|
const withDivider = isSingleActivityView ? "always" : void 0;
|
|
45556
|
-
const handleHelp =
|
|
45512
|
+
const handleHelp = useCallback54(() => {
|
|
45557
45513
|
window.open(CONTACT_US_LINK, "_blank", "noopener");
|
|
45558
45514
|
}, []);
|
|
45559
45515
|
const { onScroll, topbar, withTopDivider } = useCustomStatusAnimationAboveTopbar({
|
|
@@ -45960,7 +45916,7 @@ function ChainModal({ onClose, open }) {
|
|
|
45960
45916
|
import React297, { useEffect as useEffect81, useRef as useRef41 } from "react";
|
|
45961
45917
|
|
|
45962
45918
|
// src/components/FunConnectOptions/FunConnectOptions.tsx
|
|
45963
|
-
import React289, { useCallback as
|
|
45919
|
+
import React289, { useCallback as useCallback55, useMemo as useMemo64, useState as useState83 } from "react";
|
|
45964
45920
|
|
|
45965
45921
|
// src/components/FunConnectOptions/FunConnectResultStep.tsx
|
|
45966
45922
|
import React284, { useEffect as useEffect74 } from "react";
|
|
@@ -46328,7 +46284,7 @@ function FunConnectOptions({
|
|
|
46328
46284
|
const [step, setStep] = useState83(INITIAL_STEP);
|
|
46329
46285
|
const [selectedWallet, setSelectedWallet] = useState83();
|
|
46330
46286
|
const [qrCodeUri, setQrCodeUri] = useState83("");
|
|
46331
|
-
const changeStep =
|
|
46287
|
+
const changeStep = useCallback55((newStep) => {
|
|
46332
46288
|
setStep(newStep);
|
|
46333
46289
|
if (isSignIn(newStep)) {
|
|
46334
46290
|
setSelectedWallet(void 0);
|
|
@@ -46339,7 +46295,7 @@ function FunConnectOptions({
|
|
|
46339
46295
|
navigateTo(0 /* SIGNIN_PRIMARY */, { reverse: true });
|
|
46340
46296
|
};
|
|
46341
46297
|
const walletConnectors = usePreparedWalletConnectors();
|
|
46342
|
-
const onRegenerateQrCode =
|
|
46298
|
+
const onRegenerateQrCode = useCallback55(
|
|
46343
46299
|
async (wallet) => {
|
|
46344
46300
|
const sWallet = walletConnectors.find((w) => wallet.id === w.id);
|
|
46345
46301
|
const uri = await sWallet?.getQrCodeUri?.();
|
|
@@ -46347,7 +46303,7 @@ function FunConnectOptions({
|
|
|
46347
46303
|
},
|
|
46348
46304
|
[walletConnectors]
|
|
46349
46305
|
);
|
|
46350
|
-
const connectToWallet =
|
|
46306
|
+
const connectToWallet = useCallback55(
|
|
46351
46307
|
async (wallet) => {
|
|
46352
46308
|
if (!wallet.ready) {
|
|
46353
46309
|
return;
|
|
@@ -46366,7 +46322,7 @@ function FunConnectOptions({
|
|
|
46366
46322
|
},
|
|
46367
46323
|
[changeStep, onRegenerateQrCode]
|
|
46368
46324
|
);
|
|
46369
|
-
const handleRetry =
|
|
46325
|
+
const handleRetry = useCallback55(() => {
|
|
46370
46326
|
if (selectedWallet) {
|
|
46371
46327
|
changeStep(1 /* PENDING_WALLET */);
|
|
46372
46328
|
connectToWallet(selectedWallet);
|
|
@@ -46539,7 +46495,7 @@ function CheckoutModalPrefetchedHooks() {
|
|
|
46539
46495
|
|
|
46540
46496
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotifications.tsx
|
|
46541
46497
|
import clsx26 from "clsx";
|
|
46542
|
-
import React296, { useCallback as
|
|
46498
|
+
import React296, { useCallback as useCallback57, useEffect as useEffect79, useMemo as useMemo65, useState as useState85 } from "react";
|
|
46543
46499
|
|
|
46544
46500
|
// src/components/FunNotificationBanner/FunNotificationShowMoreButton.tsx
|
|
46545
46501
|
import React291 from "react";
|
|
@@ -46668,7 +46624,7 @@ var showMoreButtonStyle = "_4yitd93 _1rsrm2f1r4 _1rsrm2f1i _1rsrm2f1f _1rsrm2f11
|
|
|
46668
46624
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.tsx
|
|
46669
46625
|
import clsx24 from "clsx";
|
|
46670
46626
|
import { motion as motion18, useAnimate as useAnimate3 } from "motion/react";
|
|
46671
|
-
import React292, { useCallback as
|
|
46627
|
+
import React292, { useCallback as useCallback56, useEffect as useEffect77, useRef as useRef39 } from "react";
|
|
46672
46628
|
|
|
46673
46629
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.css.ts
|
|
46674
46630
|
var STATUS_SPINNER_BOTTOM_POSITION = -5;
|
|
@@ -46917,7 +46873,7 @@ var FunNotificationBannerIcon = ({
|
|
|
46917
46873
|
fallbackIconUrl = FALLBACK_ASSET
|
|
46918
46874
|
}) => {
|
|
46919
46875
|
const [animationScope, animate] = useAnimate3();
|
|
46920
|
-
const triggerAnimationProcessingToCompleted =
|
|
46876
|
+
const triggerAnimationProcessingToCompleted = useCallback56(async () => {
|
|
46921
46877
|
const completedIconPath = document.querySelector(
|
|
46922
46878
|
`.${generateAnimationPrefixClassName("icon-wrapper-completed")} path`
|
|
46923
46879
|
);
|
|
@@ -47024,7 +46980,7 @@ var FunNotificationBannerIcon = ({
|
|
|
47024
46980
|
)
|
|
47025
46981
|
]);
|
|
47026
46982
|
}, [animate]);
|
|
47027
|
-
const triggerAnimationDelayedToFailed =
|
|
46983
|
+
const triggerAnimationDelayedToFailed = useCallback56(async () => {
|
|
47028
46984
|
await Promise.all([
|
|
47029
46985
|
animate(
|
|
47030
46986
|
`.${generateAnimationPrefixClassName("icon-wrapper")}`,
|
|
@@ -47406,13 +47362,13 @@ var FunNotificationBanner = ({
|
|
|
47406
47362
|
import {
|
|
47407
47363
|
getCheckoutByDepositAddress as getCheckoutByDepositAddress2
|
|
47408
47364
|
} from "@funkit/api-base";
|
|
47409
|
-
import { useQuery as
|
|
47365
|
+
import { useQuery as useQuery28 } from "@tanstack/react-query";
|
|
47410
47366
|
var useCheckout = (depositAddress, initial) => {
|
|
47411
47367
|
const { apiKey } = useFunkitConfig();
|
|
47412
47368
|
const { itemRefresh } = useDynamicConfig(
|
|
47413
47369
|
"checkoutnotificationsrefreshinterval"
|
|
47414
47370
|
);
|
|
47415
|
-
const query =
|
|
47371
|
+
const query = useQuery28({
|
|
47416
47372
|
queryKey: ["checkouts", "checkout", depositAddress],
|
|
47417
47373
|
queryFn: () => getCheckoutByDepositAddress2({
|
|
47418
47374
|
// biome-ignore lint/style/noNonNullAssertion: already checked for null
|
|
@@ -47605,8 +47561,6 @@ function getNotificationContent(message, status, defaultMessage) {
|
|
|
47605
47561
|
}
|
|
47606
47562
|
var getNotificationProcessingConfig = ({
|
|
47607
47563
|
t,
|
|
47608
|
-
isFasterNotificationsEnabled,
|
|
47609
|
-
isLighter,
|
|
47610
47564
|
isSyntheticDE
|
|
47611
47565
|
}) => {
|
|
47612
47566
|
if (isSyntheticDE) {
|
|
@@ -47615,21 +47569,9 @@ var getNotificationProcessingConfig = ({
|
|
|
47615
47569
|
description: t("transaction.depositWillBeginProcessing")
|
|
47616
47570
|
};
|
|
47617
47571
|
}
|
|
47618
|
-
if (isFasterNotificationsEnabled) {
|
|
47619
|
-
return {
|
|
47620
|
-
title: t("transaction.depositProcessing"),
|
|
47621
|
-
description: t("transaction.depositWillBeCompletedSoon")
|
|
47622
|
-
};
|
|
47623
|
-
}
|
|
47624
|
-
if (isLighter) {
|
|
47625
|
-
return {
|
|
47626
|
-
title: t("transaction.depositReceivedProcessing"),
|
|
47627
|
-
description: t("transaction.depositWillBeCreditedLighterNative")
|
|
47628
|
-
};
|
|
47629
|
-
}
|
|
47630
47572
|
return {
|
|
47631
|
-
title: t("transaction.
|
|
47632
|
-
description: t("transaction.
|
|
47573
|
+
title: t("transaction.depositProcessing"),
|
|
47574
|
+
description: t("transaction.depositWillBeCompletedSoon")
|
|
47633
47575
|
};
|
|
47634
47576
|
};
|
|
47635
47577
|
var DirectExecutionNotification = ({
|
|
@@ -47640,15 +47582,8 @@ var DirectExecutionNotification = ({
|
|
|
47640
47582
|
const { t } = useFunkitTranslation();
|
|
47641
47583
|
const { initSettings } = directExecution.clientMetadata;
|
|
47642
47584
|
const { isCompleted, isDelayed: isDelayed2, isFailed, isProcessing, isRefunded } = useMultiStepDirectExecutionStatus(directExecution);
|
|
47643
|
-
const { apiKey } = useFunkitConfig();
|
|
47644
|
-
const isFasterNotificationsEnabled = useFeatureGate("faster-notifications");
|
|
47645
|
-
const isLighter = isLighterSlowDeposit(apiKey, {
|
|
47646
|
-
targetChain: directExecution.toChainId
|
|
47647
|
-
});
|
|
47648
47585
|
const notificationProcessingConfig = getNotificationProcessingConfig({
|
|
47649
47586
|
t,
|
|
47650
|
-
isFasterNotificationsEnabled,
|
|
47651
|
-
isLighter,
|
|
47652
47587
|
isSyntheticDE: !!directExecution.isDepositDetectionDE
|
|
47653
47588
|
});
|
|
47654
47589
|
const titleConfig = {
|
|
@@ -47832,7 +47767,7 @@ var CheckoutNotifications = ({
|
|
|
47832
47767
|
}, [isExpanded, combinedNotifications]);
|
|
47833
47768
|
const handleNotificationClose = (id) => setClosedNotifications((prev) => [...prev, id]);
|
|
47834
47769
|
const { logEvent } = useTrack();
|
|
47835
|
-
const handleNewNotification =
|
|
47770
|
+
const handleNewNotification = useCallback57(
|
|
47836
47771
|
(item) => {
|
|
47837
47772
|
const trackEvent = trackEventFromNotification(item);
|
|
47838
47773
|
logEvent(trackEvent);
|
|
@@ -48220,16 +48155,16 @@ function ConnectModal({ onClose, open }) {
|
|
|
48220
48155
|
function useModalStateValue() {
|
|
48221
48156
|
const [isModalOpen, setModalOpen] = useState86(false);
|
|
48222
48157
|
return {
|
|
48223
|
-
closeModal:
|
|
48158
|
+
closeModal: useCallback58(() => setModalOpen(false), []),
|
|
48224
48159
|
isModalOpen,
|
|
48225
|
-
openModal:
|
|
48160
|
+
openModal: useCallback58(() => setModalOpen(true), [])
|
|
48226
48161
|
};
|
|
48227
48162
|
}
|
|
48228
48163
|
function useModalStateValueWithProp() {
|
|
48229
48164
|
const [isModalOpen, setModalOpen] = useState86(false);
|
|
48230
48165
|
const [prop, setProp] = useState86(null);
|
|
48231
48166
|
return {
|
|
48232
|
-
closeModal:
|
|
48167
|
+
closeModal: useCallback58(() => {
|
|
48233
48168
|
setTimeout(
|
|
48234
48169
|
() => {
|
|
48235
48170
|
setProp(null);
|
|
@@ -48240,7 +48175,7 @@ function useModalStateValueWithProp() {
|
|
|
48240
48175
|
}, []),
|
|
48241
48176
|
isModalOpen,
|
|
48242
48177
|
prop,
|
|
48243
|
-
openModal:
|
|
48178
|
+
openModal: useCallback58((prop2) => {
|
|
48244
48179
|
if (prop2 != null) {
|
|
48245
48180
|
setProp(prop2);
|
|
48246
48181
|
}
|
|
@@ -48285,19 +48220,19 @@ function ModalProvider({ children }) {
|
|
|
48285
48220
|
prop: funCheckoutModalId
|
|
48286
48221
|
} = useModalStateValueWithProp();
|
|
48287
48222
|
const [softHiddenCheckoutId, setSoftHiddenCheckoutId] = useState86(null);
|
|
48288
|
-
const softHideFunCheckoutModal =
|
|
48223
|
+
const softHideFunCheckoutModal = useCallback58(() => {
|
|
48289
48224
|
if (funCheckoutModalId) {
|
|
48290
48225
|
setSoftHiddenCheckoutId(funCheckoutModalId);
|
|
48291
48226
|
}
|
|
48292
48227
|
closeFunCheckoutModal();
|
|
48293
48228
|
}, [funCheckoutModalId, closeFunCheckoutModal]);
|
|
48294
|
-
const resumeSoftHiddenCheckout =
|
|
48229
|
+
const resumeSoftHiddenCheckout = useCallback58(() => {
|
|
48295
48230
|
if (softHiddenCheckoutId) {
|
|
48296
48231
|
openFunCheckoutModal(softHiddenCheckoutId);
|
|
48297
48232
|
setSoftHiddenCheckoutId(null);
|
|
48298
48233
|
}
|
|
48299
48234
|
}, [softHiddenCheckoutId, openFunCheckoutModal]);
|
|
48300
|
-
const discardSoftHiddenCheckout =
|
|
48235
|
+
const discardSoftHiddenCheckout = useCallback58(() => {
|
|
48301
48236
|
setSoftHiddenCheckoutId(null);
|
|
48302
48237
|
}, []);
|
|
48303
48238
|
const {
|
|
@@ -48515,13 +48450,13 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48515
48450
|
activeCheckout?.initSettings.config?.dynamicRoutingId
|
|
48516
48451
|
);
|
|
48517
48452
|
const [checkoutsProgress, setCheckoutsProgress] = useState87({});
|
|
48518
|
-
const getCheckoutProgress =
|
|
48453
|
+
const getCheckoutProgress = useCallback59(
|
|
48519
48454
|
(checkoutId) => {
|
|
48520
48455
|
return checkoutsProgress[checkoutId];
|
|
48521
48456
|
},
|
|
48522
48457
|
[checkoutsProgress]
|
|
48523
48458
|
);
|
|
48524
|
-
const setCheckoutProgress =
|
|
48459
|
+
const setCheckoutProgress = useCallback59(
|
|
48525
48460
|
(checkoutId, progress) => {
|
|
48526
48461
|
setCheckoutsProgress((data) => ({ ...data, [checkoutId]: progress }));
|
|
48527
48462
|
},
|
|
@@ -48543,7 +48478,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48543
48478
|
});
|
|
48544
48479
|
}
|
|
48545
48480
|
);
|
|
48546
|
-
const initNewWithdrawal =
|
|
48481
|
+
const initNewWithdrawal = useCallback59(
|
|
48547
48482
|
(props, checkoutConfig) => {
|
|
48548
48483
|
const { onWithdrawalConfirmation, onWithdrawalError, config } = props;
|
|
48549
48484
|
const newWithdrawalId = uuid2();
|
|
@@ -48593,7 +48528,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48593
48528
|
},
|
|
48594
48529
|
[logEvent, startMeasuredEvent]
|
|
48595
48530
|
);
|
|
48596
|
-
const initNewCheckout =
|
|
48531
|
+
const initNewCheckout = useCallback59(
|
|
48597
48532
|
({ config, ...initSettings }) => {
|
|
48598
48533
|
const newCheckoutId = uuid2();
|
|
48599
48534
|
const newActiveCheckoutItem = {
|
|
@@ -48615,9 +48550,9 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48615
48550
|
config: {
|
|
48616
48551
|
...config,
|
|
48617
48552
|
// Solana is case-sensitive for SPL token addresses, so we should not lowercase the target asset address here
|
|
48618
|
-
targetAsset: config.targetChain.toString() === SOLANA_MAINNET_CHAIN_ID2.toString() && !
|
|
48619
|
-
|
|
48620
|
-
|
|
48553
|
+
targetAsset: config.targetChain.toString() === SOLANA_MAINNET_CHAIN_ID2.toString() && !isEVMAddressEquivalent5({
|
|
48554
|
+
firstAddress: NATIVE_TOKEN,
|
|
48555
|
+
secondAddress: config.targetAsset
|
|
48621
48556
|
}) ? config.targetAsset : config.targetAsset.toLowerCase(),
|
|
48622
48557
|
targetChain: config.targetChain.toString(),
|
|
48623
48558
|
targetAssetAmount: config.targetAssetAmount === void 0 ? config.targetAssetAmount : Number.parseFloat(config.targetAssetAmount.toString()) || 0
|
|
@@ -48683,7 +48618,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48683
48618
|
});
|
|
48684
48619
|
}
|
|
48685
48620
|
);
|
|
48686
|
-
const startDirectExecutionCheckout =
|
|
48621
|
+
const startDirectExecutionCheckout = useCallback59(
|
|
48687
48622
|
async ({
|
|
48688
48623
|
stepMessageSetter,
|
|
48689
48624
|
latestQuote,
|
|
@@ -48834,7 +48769,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48834
48769
|
udaParams
|
|
48835
48770
|
]
|
|
48836
48771
|
);
|
|
48837
|
-
const startRegularCheckout =
|
|
48772
|
+
const startRegularCheckout = useCallback59(
|
|
48838
48773
|
async ({
|
|
48839
48774
|
stepMessageSetter,
|
|
48840
48775
|
latestQuote,
|
|
@@ -49125,14 +49060,14 @@ function useFunkitCheckout(props) {
|
|
|
49125
49060
|
resume: resumeSoftHiddenCheckout,
|
|
49126
49061
|
discard: discardSoftHiddenCheckout
|
|
49127
49062
|
} = useSoftHiddenCheckout();
|
|
49128
|
-
const onErrorWrapper =
|
|
49063
|
+
const onErrorWrapper = useCallback59(
|
|
49129
49064
|
(payload) => {
|
|
49130
49065
|
logger.warn(payload.message, payload);
|
|
49131
49066
|
onError?.(payload);
|
|
49132
49067
|
},
|
|
49133
49068
|
[onError]
|
|
49134
49069
|
);
|
|
49135
|
-
const onOpenWrapper =
|
|
49070
|
+
const onOpenWrapper = useCallback59(
|
|
49136
49071
|
(newId) => {
|
|
49137
49072
|
props?.onOpen?.();
|
|
49138
49073
|
openFunCheckoutModal?.(newId);
|
|
@@ -49371,9 +49306,9 @@ async function validateCheckoutConfig(config, apiKey) {
|
|
|
49371
49306
|
};
|
|
49372
49307
|
}
|
|
49373
49308
|
var hasSufficientBalance = async (wagmiConfig, walletAddress, tokenAddress, tokenChainId, requiredAssetAmount) => {
|
|
49374
|
-
const finalTokenAddress =
|
|
49375
|
-
|
|
49376
|
-
|
|
49309
|
+
const finalTokenAddress = isEVMAddressEquivalent6({
|
|
49310
|
+
firstAddress: tokenAddress,
|
|
49311
|
+
secondAddress: FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS5
|
|
49377
49312
|
}) ? void 0 : tokenAddress;
|
|
49378
49313
|
const data = await getBalance(wagmiConfig, {
|
|
49379
49314
|
address: walletAddress,
|
|
@@ -49412,16 +49347,10 @@ function getCheckoutReceivedAmountFormatted({
|
|
|
49412
49347
|
quote
|
|
49413
49348
|
}) {
|
|
49414
49349
|
const targetTokenAmount = getCheckoutReceivedAmount({ config, quote });
|
|
49415
|
-
const { finalizedTokenAmount } = computeDisplayDestinationToken(
|
|
49416
|
-
config,
|
|
49417
|
-
targetTokenAmount
|
|
49418
|
-
);
|
|
49419
49350
|
const feeBreakdown = quote?.baseQuote.metadata?.feeBreakdown;
|
|
49420
49351
|
const isAcross = isAcrossRoute(quote?.baseQuote.metadata);
|
|
49421
|
-
const swapImpactPct =
|
|
49422
|
-
return
|
|
49423
|
-
finalizedTokenAmount * (1 + swapImpactPct / 100)
|
|
49424
|
-
);
|
|
49352
|
+
const swapImpactPct = config?.generateActionsParams && !isAcross ? feeBreakdown?.swapImpact || 0 : 0;
|
|
49353
|
+
return formatCryptoAndStringify9(targetTokenAmount * (1 + swapImpactPct / 100));
|
|
49425
49354
|
}
|
|
49426
49355
|
function getCheckoutSentAmount({
|
|
49427
49356
|
quote
|
|
@@ -49435,7 +49364,7 @@ function getCheckoutSentAmountFormatted({
|
|
|
49435
49364
|
quote
|
|
49436
49365
|
}) {
|
|
49437
49366
|
const sourceTokenAmount = getCheckoutSentAmount({ quote });
|
|
49438
|
-
return
|
|
49367
|
+
return formatCryptoAndStringify9(sourceTokenAmount);
|
|
49439
49368
|
}
|
|
49440
49369
|
function getCheckoutItemDisplay({
|
|
49441
49370
|
checkoutConfig,
|
|
@@ -49450,9 +49379,9 @@ function getCheckoutItemDisplay({
|
|
|
49450
49379
|
const displayAmount = overrideAmount ?? targetAssetAmount;
|
|
49451
49380
|
const itemName = targetAssetTicker || checkoutItemTitle;
|
|
49452
49381
|
if (isCheckoutPostActionRequired(checkoutConfig)) {
|
|
49453
|
-
return !hideAmount && displayAmount > 0 ?
|
|
49382
|
+
return !hideAmount && displayAmount > 0 ? formatCryptoAndStringify9(round3(displayAmount, 5), itemName) : itemName;
|
|
49454
49383
|
}
|
|
49455
|
-
return hideAmount ? itemName :
|
|
49384
|
+
return hideAmount ? itemName : formatCryptoAndStringify9(displayAmount, itemName);
|
|
49456
49385
|
}
|
|
49457
49386
|
function getBaseQuoteTotalFeesFromAmount(baseQuote) {
|
|
49458
49387
|
const sourceAssetBaseAmount = Number(baseQuote.estSubtotalFromAmount);
|
|
@@ -49491,8 +49420,8 @@ async function getTokenDecimals(wagmiConfig, chainId2, tokenAddress) {
|
|
|
49491
49420
|
if (chainId2 === tronChain4.id.toString()) {
|
|
49492
49421
|
return tronChain4.nativeCurrency.decimals;
|
|
49493
49422
|
}
|
|
49494
|
-
if (chainId2 ===
|
|
49495
|
-
return
|
|
49423
|
+
if (chainId2 === lightningChain7.id.toString()) {
|
|
49424
|
+
return lightningChain7.nativeCurrency.decimals;
|
|
49496
49425
|
}
|
|
49497
49426
|
const decimals = await readContract(wagmiConfig, {
|
|
49498
49427
|
address: tokenAddress,
|
|
@@ -49537,42 +49466,6 @@ function isCheckoutPostActionRequired(config) {
|
|
|
49537
49466
|
}
|
|
49538
49467
|
return typeof actionCallback === "function";
|
|
49539
49468
|
}
|
|
49540
|
-
function isVaultDepositCheckout(checkoutConfig, sourceHolding) {
|
|
49541
|
-
return Boolean(
|
|
49542
|
-
checkoutConfig.finalizedToken && sourceHolding && checkoutConfig.generateActionsParams && isTokenEquivalent14({
|
|
49543
|
-
firstTokenChainId: checkoutConfig.targetChain,
|
|
49544
|
-
firstTokenAddress: checkoutConfig.targetAsset,
|
|
49545
|
-
secondTokenChainId: sourceHolding.chainId,
|
|
49546
|
-
secondTokenAddress: sourceHolding.tokenAddress
|
|
49547
|
-
})
|
|
49548
|
-
);
|
|
49549
|
-
}
|
|
49550
|
-
function computeDisplayDestinationToken(checkoutConfig, displayAssetAmount) {
|
|
49551
|
-
if (!checkoutConfig) {
|
|
49552
|
-
return {
|
|
49553
|
-
finalizedTokenAmount: displayAssetAmount,
|
|
49554
|
-
finalizedTokenSymbol: "",
|
|
49555
|
-
finalizedTokenIcon: ""
|
|
49556
|
-
};
|
|
49557
|
-
}
|
|
49558
|
-
const { finalizedToken, targetAssetTicker } = checkoutConfig;
|
|
49559
|
-
const targetToken = checkoutConfig.dynamicTargetAssetCandidates?.find(
|
|
49560
|
-
(cand) => isTokenEquivalent14({
|
|
49561
|
-
firstTokenChainId: cand.tokenChainId,
|
|
49562
|
-
firstTokenAddress: cand.tokenAddress,
|
|
49563
|
-
secondTokenChainId: checkoutConfig.targetChain,
|
|
49564
|
-
secondTokenAddress: checkoutConfig.targetAsset
|
|
49565
|
-
})
|
|
49566
|
-
);
|
|
49567
|
-
const finalizedTokenAmount = (targetToken?.finalizedTokenRate ?? 1) * displayAssetAmount;
|
|
49568
|
-
const finalizedTokenSymbol = finalizedToken?.tokenSymbol ?? targetAssetTicker;
|
|
49569
|
-
const finalizedTokenIcon = finalizedToken?.iconSrc ?? targetToken?.iconSrc ?? checkoutConfig.iconSrc ?? "";
|
|
49570
|
-
return {
|
|
49571
|
-
finalizedTokenAmount,
|
|
49572
|
-
finalizedTokenSymbol,
|
|
49573
|
-
finalizedTokenIcon
|
|
49574
|
-
};
|
|
49575
|
-
}
|
|
49576
49469
|
function computeSwitcherDisplayToken({
|
|
49577
49470
|
checkoutConfig,
|
|
49578
49471
|
displayAssetAmount,
|
|
@@ -49582,8 +49475,10 @@ function computeSwitcherDisplayToken({
|
|
|
49582
49475
|
if (isExactIn) {
|
|
49583
49476
|
return { amount: displayAssetAmount, symbol: sourceTokenSymbol ?? "" };
|
|
49584
49477
|
}
|
|
49585
|
-
|
|
49586
|
-
|
|
49478
|
+
return {
|
|
49479
|
+
amount: displayAssetAmount,
|
|
49480
|
+
symbol: checkoutConfig?.targetAssetTicker ?? ""
|
|
49481
|
+
};
|
|
49587
49482
|
}
|
|
49588
49483
|
|
|
49589
49484
|
// src/domains/asset.ts
|
|
@@ -49615,9 +49510,9 @@ function isPreferredChain(chainId2, additionalChains = []) {
|
|
|
49615
49510
|
return chains.has(chainId2);
|
|
49616
49511
|
}
|
|
49617
49512
|
function isNativeTokenAddress(address) {
|
|
49618
|
-
return
|
|
49619
|
-
|
|
49620
|
-
|
|
49513
|
+
return isEVMAddressEquivalent7({
|
|
49514
|
+
firstAddress: address,
|
|
49515
|
+
secondAddress: NATIVE_TOKEN
|
|
49621
49516
|
});
|
|
49622
49517
|
}
|
|
49623
49518
|
var isPolygonEcosystemToken = (chainId2, tokenAddress) => chainId2 === polygon7.id.toString() && tokenAddress === "0x0000000000000000000000000000000000001010";
|
|
@@ -49644,13 +49539,7 @@ var isAssetUsableToPayForCheckout = ({
|
|
|
49644
49539
|
return false;
|
|
49645
49540
|
}
|
|
49646
49541
|
if (isCheckoutPostActionRequired(config)) {
|
|
49647
|
-
|
|
49648
|
-
return finalizedToken && isTokenEquivalent15({
|
|
49649
|
-
firstTokenChainId: targetChainId,
|
|
49650
|
-
firstTokenAddress: targetTokenAddress,
|
|
49651
|
-
secondTokenChainId: finalizedToken.tokenChainId,
|
|
49652
|
-
secondTokenAddress: finalizedToken.tokenAddress
|
|
49653
|
-
});
|
|
49542
|
+
return false;
|
|
49654
49543
|
}
|
|
49655
49544
|
return paymentMethod === PaymentMethod.ACCOUNT_BALANCE && finalCheckoutRecipient.toLowerCase() === payerAddress.toLowerCase() && isTokenEquivalent15({
|
|
49656
49545
|
firstTokenChainId: targetChainId,
|
|
@@ -49775,7 +49664,7 @@ var useWalletAssets = ({
|
|
|
49775
49664
|
} = {}) => {
|
|
49776
49665
|
const { address, isConnected } = useAccount();
|
|
49777
49666
|
const { apiKey } = useFunkitConfig();
|
|
49778
|
-
const { data, isLoading, isFetching } =
|
|
49667
|
+
const { data, isLoading, isFetching } = useQuery29({
|
|
49779
49668
|
queryKey: ["getWalletAssets", address, apiKey],
|
|
49780
49669
|
meta: stepQueryMeta({
|
|
49781
49670
|
name: "walletAssets",
|