@funkit/connect 9.27.1 → 9.28.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +60 -0
- package/dist/clients/{chunk-UBBBMSKL.js → chunk-4O4YAFYK.js} +65 -6
- 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-E36JOYL4.js → chunk-TQVRP3Z2.js} +1 -1
- package/dist/clients/lighter.css +7 -1
- package/dist/clients/lighter.js +1 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +7 -1
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +4 -5
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +2 -2
- package/dist/clients/polymarket/index.css +7 -1
- package/dist/clients/polymarket/index.js +4 -5
- 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/usePaymentSources.d.ts +1 -1
- package/dist/hooks/useStartBitcoinLightning.d.ts +11 -0
- package/dist/index.css +7 -1
- package/dist/index.js +607 -720
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +4 -9
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +7 -1
- package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +1 -3
- package/dist/modals/CheckoutModal/TransferToken/TransferToken.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 +56 -56
- 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
|
@@ -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.1";
|
|
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",
|
|
@@ -5183,6 +5181,7 @@ import {
|
|
|
5183
5181
|
} from "@funkit/connect-core";
|
|
5184
5182
|
|
|
5185
5183
|
// src/utils/withdrawal.ts
|
|
5184
|
+
import { isEVMAddressEquivalent, isTokenEquivalent as isTokenEquivalent3 } from "@funkit/utils";
|
|
5186
5185
|
import { parseUnits } from "viem";
|
|
5187
5186
|
function safeEvaluateWithdrawalSourceTokenBalance(fn) {
|
|
5188
5187
|
const raw = fn?.();
|
|
@@ -5199,6 +5198,25 @@ function safeEvaluateWithdrawalSourceTokenBalance(fn) {
|
|
|
5199
5198
|
function isWalletWithdrawalConfig(config) {
|
|
5200
5199
|
return "wallet" in config;
|
|
5201
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
|
+
}
|
|
5202
5220
|
function isCustomWithdrawalConfig(config) {
|
|
5203
5221
|
return "withdrawCallback" in config;
|
|
5204
5222
|
}
|
|
@@ -6189,7 +6207,7 @@ var useFunkitPostCheckoutInternal = (checkoutId) => {
|
|
|
6189
6207
|
// src/providers/ModalContext.tsx
|
|
6190
6208
|
import React299, {
|
|
6191
6209
|
createContext as createContext20,
|
|
6192
|
-
useCallback as
|
|
6210
|
+
useCallback as useCallback58,
|
|
6193
6211
|
useContext as useContext20,
|
|
6194
6212
|
useEffect as useEffect82,
|
|
6195
6213
|
useMemo as useMemo66,
|
|
@@ -10647,7 +10665,9 @@ var en_default = {
|
|
|
10647
10665
|
groupPopularTokens: "Popular",
|
|
10648
10666
|
groupStablecoins: "Stablecoins",
|
|
10649
10667
|
groupOtherChains: "All",
|
|
10650
|
-
groupOtherTokens: "All supported tokens"
|
|
10668
|
+
groupOtherTokens: "All supported tokens",
|
|
10669
|
+
depositBitcoinLightning: "Deposit Bitcoin instantly with Lightning.",
|
|
10670
|
+
lightningTryItNow: "Try it now"
|
|
10651
10671
|
},
|
|
10652
10672
|
lightningInvoice: {
|
|
10653
10673
|
yourLightningInvoice: "Lightning Invoice"
|
|
@@ -10671,7 +10691,6 @@ var en_default = {
|
|
|
10671
10691
|
depositProcessing: "Deposit processing",
|
|
10672
10692
|
depositWillBeCompletedSoon: "Your deposit will be completed soon.",
|
|
10673
10693
|
depositWillBeCredited: "Your deposit will be credited to your account shortly.",
|
|
10674
|
-
depositWillBeCreditedLighterNative: "Your deposit will be credited to your account in approximately two minutes.",
|
|
10675
10694
|
depositHasBeenCredited: "Your deposit has been credited to your account.",
|
|
10676
10695
|
depositRefundedOrReprocessed: "Your deposit has been refunded or reprocessed. Feel free to <ContactSupportLink>reach out</ContactSupportLink> for an update.",
|
|
10677
10696
|
issueOccurredWithDeposit: "An issue occurred processing your deposit. Please try again.",
|
|
@@ -10770,6 +10789,7 @@ var en_default = {
|
|
|
10770
10789
|
unsupportedExecutionType: "Transaction type not supported. Try different method.",
|
|
10771
10790
|
unsupportedRoute: "Token pair unavailable. Try different tokens.",
|
|
10772
10791
|
userRecipientMismatch: "Sender and recipient must match. Check addresses.",
|
|
10792
|
+
recipientSameAsSource: "Recipient can't be the same as the source address.",
|
|
10773
10793
|
destinationTxFailed: "Transaction failed. Please try again or <ContactSupportLink>contact us</ContactSupportLink>.",
|
|
10774
10794
|
erc20RouterAddressNotFound: "Something went wrong. Please try a different token or <ContactSupportLink>contact us</ContactSupportLink>.",
|
|
10775
10795
|
unknownError: "Something went wrong. Please try again or <ContactSupportLink>contact us</ContactSupportLink>.",
|
|
@@ -11004,7 +11024,7 @@ var en_default = {
|
|
|
11004
11024
|
sourceMethodTitle: "Your source",
|
|
11005
11025
|
tokensListTitle: "Your tokens",
|
|
11006
11026
|
transferTokens: "Transfer Crypto",
|
|
11007
|
-
bitcoinLightning: "Bitcoin
|
|
11027
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
11008
11028
|
receiveDropdownTitle: "",
|
|
11009
11029
|
receiveDropdownLabel: "Asset to Receive",
|
|
11010
11030
|
payAmountLabel: "You send",
|
|
@@ -11249,7 +11269,9 @@ var es_default = {
|
|
|
11249
11269
|
groupPopularTokens: "Populares",
|
|
11250
11270
|
groupStablecoins: "Stablecoins",
|
|
11251
11271
|
groupOtherChains: "Todas",
|
|
11252
|
-
groupOtherTokens: "Todos los tokens compatibles"
|
|
11272
|
+
groupOtherTokens: "Todos los tokens compatibles",
|
|
11273
|
+
depositBitcoinLightning: "Deposita Bitcoin al instante con Lightning.",
|
|
11274
|
+
lightningTryItNow: "Pru\xE9balo ahora"
|
|
11253
11275
|
},
|
|
11254
11276
|
lightningInvoice: {
|
|
11255
11277
|
yourLightningInvoice: "Factura Lightning"
|
|
@@ -11273,7 +11295,6 @@ var es_default = {
|
|
|
11273
11295
|
depositProcessing: "Dep\xF3sito en proceso",
|
|
11274
11296
|
depositWillBeCompletedSoon: "Tu dep\xF3sito se completar\xE1 pronto.",
|
|
11275
11297
|
depositWillBeCredited: "Tu dep\xF3sito ser\xE1 acreditado a tu cuenta pronto.",
|
|
11276
|
-
depositWillBeCreditedLighterNative: "Tu dep\xF3sito ser\xE1 acreditado a tu cuenta en aproximadamente dos minutos.",
|
|
11277
11298
|
depositHasBeenCredited: "Tu dep\xF3sito ha sido acreditado a tu cuenta.",
|
|
11278
11299
|
depositRefundedOrReprocessed: "Tu dep\xF3sito ha sido reembolsado o reprocesado. No dudes en <ContactSupportLink>contactarnos</ContactSupportLink> para una actualizaci\xF3n.",
|
|
11279
11300
|
issueOccurredWithDeposit: "Ocurri\xF3 un problema al procesar tu dep\xF3sito. Por favor intenta nuevamente.",
|
|
@@ -11372,6 +11393,7 @@ var es_default = {
|
|
|
11372
11393
|
unsupportedExecutionType: "Tipo de transacci\xF3n no soportado. Prueba un m\xE9todo diferente.",
|
|
11373
11394
|
unsupportedRoute: "Par de tokens no disponible. Prueba tokens diferentes.",
|
|
11374
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.",
|
|
11375
11397
|
destinationTxFailed: "Transacci\xF3n fallida. Por favor, intenta nuevamente o <ContactSupportLink>cont\xE1ctanos</ContactSupportLink>.",
|
|
11376
11398
|
erc20RouterAddressNotFound: "Algo sali\xF3 mal. Por favor, prueba un token diferente o <ContactSupportLink>cont\xE1ctanos</ContactSupportLink>.",
|
|
11377
11399
|
unknownError: "Algo sali\xF3 mal. Por favor, intenta nuevamente o <ContactSupportLink>cont\xE1ctanos</ContactSupportLink>.",
|
|
@@ -11603,7 +11625,7 @@ var es_default = {
|
|
|
11603
11625
|
sourceMethodTitle: "Tu origen",
|
|
11604
11626
|
tokensListTitle: "Tus tokens",
|
|
11605
11627
|
transferTokens: "Transferir Cripto",
|
|
11606
|
-
bitcoinLightning: "Bitcoin
|
|
11628
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
11607
11629
|
receiveDropdownTitle: "",
|
|
11608
11630
|
receiveDropdownLabel: "Activo a Recibir",
|
|
11609
11631
|
payAmountLabel: "Env\xEDas",
|
|
@@ -11848,7 +11870,9 @@ var fr_default = {
|
|
|
11848
11870
|
groupPopularTokens: "Populaires",
|
|
11849
11871
|
groupStablecoins: "Stablecoins",
|
|
11850
11872
|
groupOtherChains: "Toutes",
|
|
11851
|
-
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"
|
|
11852
11876
|
},
|
|
11853
11877
|
lightningInvoice: {
|
|
11854
11878
|
yourLightningInvoice: "Facture Lightning"
|
|
@@ -11872,7 +11896,6 @@ var fr_default = {
|
|
|
11872
11896
|
depositProcessing: "D\xE9p\xF4t en cours de traitement",
|
|
11873
11897
|
depositWillBeCompletedSoon: "Votre d\xE9p\xF4t sera bient\xF4t termin\xE9.",
|
|
11874
11898
|
depositWillBeCredited: "Votre d\xE9p\xF4t sera cr\xE9dit\xE9 sur votre compte sous peu.",
|
|
11875
|
-
depositWillBeCreditedLighterNative: "Votre d\xE9p\xF4t sera cr\xE9dit\xE9 sur votre compte dans environ deux minutes.",
|
|
11876
11899
|
depositHasBeenCredited: "Votre d\xE9p\xF4t a \xE9t\xE9 cr\xE9dit\xE9 sur votre compte.",
|
|
11877
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.",
|
|
11878
11901
|
issueOccurredWithDeposit: "Un probl\xE8me est survenu lors du traitement de votre d\xE9p\xF4t. Veuillez r\xE9essayer.",
|
|
@@ -11971,6 +11994,7 @@ var fr_default = {
|
|
|
11971
11994
|
unsupportedExecutionType: "M\xE9thode de transaction non prise en charge. S\xE9lectionnez une autre m\xE9thode.",
|
|
11972
11995
|
unsupportedRoute: "Paire d'actifs non prises en charge. Essayez des actifs diff\xE9rents.",
|
|
11973
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.",
|
|
11974
11998
|
destinationTxFailed: "Transaction \xE9chou\xE9e. Veuillez r\xE9essayer ou <ContactSupportLink>contactez-nous</ContactSupportLink>.",
|
|
11975
11999
|
erc20RouterAddressNotFound: "Une erreur s'est produite. Veuillez essayer une devise diff\xE9rente ou <ContactSupportLink>contactez-nous</ContactSupportLink>.",
|
|
11976
12000
|
unknownError: "Une erreur s'est produite. Veuillez r\xE9essayer ou <ContactSupportLink>contactez-nous</ContactSupportLink>.",
|
|
@@ -12202,7 +12226,7 @@ var fr_default = {
|
|
|
12202
12226
|
sourceMethodTitle: "Votre source",
|
|
12203
12227
|
tokensListTitle: "Vos actifs",
|
|
12204
12228
|
transferTokens: "Transf\xE9rer des cryptos",
|
|
12205
|
-
bitcoinLightning: "Bitcoin
|
|
12229
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
12206
12230
|
receiveDropdownTitle: "",
|
|
12207
12231
|
receiveDropdownLabel: "Actif \xE0 recevoir",
|
|
12208
12232
|
payAmountLabel: "Vous envoyez",
|
|
@@ -12447,7 +12471,9 @@ var ja_default = {
|
|
|
12447
12471
|
groupPopularTokens: "\u4EBA\u6C17",
|
|
12448
12472
|
groupStablecoins: "\u30B9\u30C6\u30FC\u30D6\u30EB\u30B3\u30A4\u30F3",
|
|
12449
12473
|
groupOtherChains: "\u3059\u3079\u3066",
|
|
12450
|
-
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"
|
|
12451
12477
|
},
|
|
12452
12478
|
lightningInvoice: {
|
|
12453
12479
|
yourLightningInvoice: "\u30E9\u30A4\u30C8\u30CB\u30F3\u30B0\u8ACB\u6C42\u66F8"
|
|
@@ -12471,7 +12497,6 @@ var ja_default = {
|
|
|
12471
12497
|
depositProcessing: "\u5165\u91D1\u51E6\u7406\u4E2D",
|
|
12472
12498
|
depositWillBeCompletedSoon: "\u5165\u91D1\u306F\u307E\u3082\u306A\u304F\u5B8C\u4E86\u3057\u307E\u3059\u3002",
|
|
12473
12499
|
depositWillBeCredited: "\u307E\u3082\u306A\u304F\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5165\u91D1\u3055\u308C\u307E\u3059\u3002",
|
|
12474
|
-
depositWillBeCreditedLighterNative: "\u304A\u5BA2\u69D8\u306E\u5165\u91D1\u306F\u7D042\u5206\u3067\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5165\u91D1\u3055\u308C\u307E\u3059\u3002",
|
|
12475
12500
|
depositHasBeenCredited: "\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u5165\u91D1\u3055\u308C\u307E\u3057\u305F\u3002",
|
|
12476
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",
|
|
12477
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",
|
|
@@ -12570,6 +12595,7 @@ var ja_default = {
|
|
|
12570
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",
|
|
12571
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",
|
|
12572
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",
|
|
12573
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",
|
|
12574
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",
|
|
12575
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",
|
|
@@ -12801,7 +12827,7 @@ var ja_default = {
|
|
|
12801
12827
|
sourceMethodTitle: "\u9001\u4FE1\u5143",
|
|
12802
12828
|
tokensListTitle: "\u3042\u306A\u305F\u306E\u30C8\u30FC\u30AF\u30F3",
|
|
12803
12829
|
transferTokens: "\u6697\u53F7\u8CC7\u7523\u3092\u9001\u91D1",
|
|
12804
|
-
bitcoinLightning: "
|
|
12830
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
12805
12831
|
receiveDropdownTitle: "",
|
|
12806
12832
|
receiveDropdownLabel: "\u53D7\u53D6\u8CC7\u7523",
|
|
12807
12833
|
payAmountLabel: "\u9001\u4FE1\u91D1\u984D",
|
|
@@ -13046,7 +13072,9 @@ var ko_default = {
|
|
|
13046
13072
|
groupPopularTokens: "\uC778\uAE30",
|
|
13047
13073
|
groupStablecoins: "\uC2A4\uD14C\uC774\uBE14\uCF54\uC778",
|
|
13048
13074
|
groupOtherChains: "\uC804\uCCB4",
|
|
13049
|
-
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"
|
|
13050
13078
|
},
|
|
13051
13079
|
lightningInvoice: {
|
|
13052
13080
|
yourLightningInvoice: "\uB77C\uC774\uD2B8\uB2DD \uC778\uBCF4\uC774\uC2A4"
|
|
@@ -13070,7 +13098,6 @@ var ko_default = {
|
|
|
13070
13098
|
depositProcessing: "\uC785\uAE08 \uCC98\uB9AC \uC911",
|
|
13071
13099
|
depositWillBeCompletedSoon: "\uC785\uAE08\uC774 \uACE7 \uC644\uB8CC\uB429\uB2C8\uB2E4.",
|
|
13072
13100
|
depositWillBeCredited: "\uC785\uAE08\uC774 \uACE7 \uACC4\uC815\uC5D0 \uC785\uAE08\uB429\uB2C8\uB2E4.",
|
|
13073
|
-
depositWillBeCreditedLighterNative: "\uC785\uAE08\uC774 \uC57D 2\uBD84 \uB0B4\uC5D0 \uACC4\uC815\uC5D0 \uC785\uAE08\uB429\uB2C8\uB2E4.",
|
|
13074
13101
|
depositHasBeenCredited: "\uC785\uAE08\uC774 \uACC4\uC815\uC5D0 \uC785\uAE08\uB418\uC5C8\uC2B5\uB2C8\uB2E4.",
|
|
13075
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>.",
|
|
13076
13103
|
issueOccurredWithDeposit: "\uC785\uAE08 \uCC98\uB9AC \uC911 \uBB38\uC81C\uAC00 \uBC1C\uC0DD\uD588\uC2B5\uB2C8\uB2E4. \uB2E4\uC2DC \uC2DC\uB3C4\uD574 \uC8FC\uC138\uC694.",
|
|
@@ -13169,6 +13196,7 @@ var ko_default = {
|
|
|
13169
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.",
|
|
13170
13197
|
unsupportedRoute: "\uD1A0\uD070 \uC30D\uC744 \uC0AC\uC6A9\uD560 \uC218 \uC5C6\uC2B5\uB2C8\uB2E4. \uB2E4\uB978 \uD1A0\uD070\uC744 \uC2DC\uB3C4\uD558\uC138\uC694.",
|
|
13171
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.",
|
|
13172
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>.",
|
|
13173
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>.",
|
|
13174
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>.",
|
|
@@ -13400,7 +13428,7 @@ var ko_default = {
|
|
|
13400
13428
|
sourceMethodTitle: "\uC18C\uC2A4",
|
|
13401
13429
|
tokensListTitle: "\uB0B4 \uD1A0\uD070",
|
|
13402
13430
|
transferTokens: "\uC554\uD638\uD654\uD3D0 \uC804\uC1A1",
|
|
13403
|
-
bitcoinLightning: "
|
|
13431
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
13404
13432
|
receiveDropdownTitle: "",
|
|
13405
13433
|
receiveDropdownLabel: "\uBC1B\uC744 \uC790\uC0B0",
|
|
13406
13434
|
payAmountLabel: "\uBCF4\uB0BC \uAE08\uC561",
|
|
@@ -13645,7 +13673,9 @@ var ru_default = {
|
|
|
13645
13673
|
groupPopularTokens: "\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u044B\u0435",
|
|
13646
13674
|
groupStablecoins: "\u0421\u0442\u0435\u0439\u0431\u043B\u043A\u043E\u0438\u043D\u044B",
|
|
13647
13675
|
groupOtherChains: "\u0412\u0441\u0435",
|
|
13648
|
-
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"
|
|
13649
13679
|
},
|
|
13650
13680
|
lightningInvoice: {
|
|
13651
13681
|
yourLightningInvoice: "\u0421\u0447\u0451\u0442 Lightning"
|
|
@@ -13669,7 +13699,6 @@ var ru_default = {
|
|
|
13669
13699
|
depositProcessing: "\u0414\u0435\u043F\u043E\u0437\u0438\u0442 \u043E\u0431\u0440\u0430\u0431\u0430\u0442\u044B\u0432\u0430\u0435\u0442\u0441\u044F",
|
|
13670
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.",
|
|
13671
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.",
|
|
13672
|
-
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.",
|
|
13673
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.",
|
|
13674
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.",
|
|
13675
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.",
|
|
@@ -13768,6 +13797,7 @@ var ru_default = {
|
|
|
13768
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.",
|
|
13769
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.",
|
|
13770
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.",
|
|
13771
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>.",
|
|
13772
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>.",
|
|
13773
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>.",
|
|
@@ -13999,7 +14029,7 @@ var ru_default = {
|
|
|
13999
14029
|
sourceMethodTitle: "\u0412\u0430\u0448 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A",
|
|
14000
14030
|
tokensListTitle: "\u0412\u0430\u0448\u0438 \u0442\u043E\u043A\u0435\u043D\u044B",
|
|
14001
14031
|
transferTokens: "\u041F\u0435\u0440\u0435\u0432\u0435\u0441\u0442\u0438 \u043A\u0440\u0438\u043F\u0442\u043E\u0432\u0430\u043B\u044E\u0442\u0443",
|
|
14002
|
-
bitcoinLightning: "
|
|
14032
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
14003
14033
|
receiveDropdownTitle: "",
|
|
14004
14034
|
receiveDropdownLabel: "\u0410\u043A\u0442\u0438\u0432 \u0434\u043B\u044F \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F",
|
|
14005
14035
|
payAmountLabel: "\u0412\u044B \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u0442\u0435",
|
|
@@ -14244,7 +14274,9 @@ var tr_default = {
|
|
|
14244
14274
|
groupPopularTokens: "Pop\xFCler",
|
|
14245
14275
|
groupStablecoins: "Stablecoinler",
|
|
14246
14276
|
groupOtherChains: "T\xFCm\xFC",
|
|
14247
|
-
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"
|
|
14248
14280
|
},
|
|
14249
14281
|
lightningInvoice: {
|
|
14250
14282
|
yourLightningInvoice: "Lightning Faturas\u0131"
|
|
@@ -14268,7 +14300,6 @@ var tr_default = {
|
|
|
14268
14300
|
depositProcessing: "Yat\u0131r\u0131m i\u015Fleniyor",
|
|
14269
14301
|
depositWillBeCompletedSoon: "Yat\u0131r\u0131m\u0131n\u0131z yak\u0131nda tamamlanacak.",
|
|
14270
14302
|
depositWillBeCredited: "Yat\u0131r\u0131m\u0131n\u0131z k\u0131sa s\xFCre i\xE7inde hesab\u0131n\u0131za aktar\u0131lacak.",
|
|
14271
|
-
depositWillBeCreditedLighterNative: "Yat\u0131r\u0131m\u0131n\u0131z yakla\u015F\u0131k iki dakika i\xE7inde hesab\u0131n\u0131za aktar\u0131lacak.",
|
|
14272
14303
|
depositHasBeenCredited: "Yat\u0131r\u0131m\u0131n\u0131z hesab\u0131n\u0131za aktar\u0131ld\u0131.",
|
|
14273
14304
|
depositRefundedOrReprocessed: "Yat\u0131r\u0131m\u0131n\u0131z iade edildi veya yeniden i\u015Flendi. Bilgi almak i\xE7in <ContactSupportLink>bizimle ileti\u015Fime ge\xE7ebilirsiniz</ContactSupportLink>.",
|
|
14274
14305
|
issueOccurredWithDeposit: "Yat\u0131r\u0131m\u0131n\u0131zda bir sorun olu\u015Ftu. L\xFCtfen tekrar deneyin.",
|
|
@@ -14367,6 +14398,7 @@ var tr_default = {
|
|
|
14367
14398
|
unsupportedExecutionType: "\u0130\u015Flem t\xFCr\xFC desteklenmiyor. Farkl\u0131 y\xF6ntem deneyin.",
|
|
14368
14399
|
unsupportedRoute: "Token \xE7ifti kullan\u0131lam\u0131yor. Farkl\u0131 token'lar deneyin.",
|
|
14369
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.",
|
|
14370
14402
|
destinationTxFailed: "\u0130\u015Flem ba\u015Far\u0131s\u0131z. L\xFCtfen tekrar deneyin veya <ContactSupportLink>bizimle ileti\u015Fime ge\xE7in</ContactSupportLink>.",
|
|
14371
14403
|
erc20RouterAddressNotFound: "Bir \u015Feyler yanl\u0131\u015F gitti. L\xFCtfen farkl\u0131 bir token deneyin veya <ContactSupportLink>bizimle ileti\u015Fime ge\xE7in</ContactSupportLink>.",
|
|
14372
14404
|
unknownError: "Bir \u015Feyler yanl\u0131\u015F gitti. L\xFCtfen tekrar deneyin veya <ContactSupportLink>bizimle ileti\u015Fime ge\xE7in</ContactSupportLink>.",
|
|
@@ -14598,7 +14630,7 @@ var tr_default = {
|
|
|
14598
14630
|
sourceMethodTitle: "Kayna\u011F\u0131n\u0131z",
|
|
14599
14631
|
tokensListTitle: "Token'lar\u0131n\u0131z",
|
|
14600
14632
|
transferTokens: "Kripto Transfer Et",
|
|
14601
|
-
bitcoinLightning: "
|
|
14633
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
14602
14634
|
receiveDropdownTitle: "",
|
|
14603
14635
|
receiveDropdownLabel: "Al\u0131nacak Varl\u0131k",
|
|
14604
14636
|
payAmountLabel: "G\xF6nderdi\u011Finiz",
|
|
@@ -14843,7 +14875,9 @@ var zh_default = {
|
|
|
14843
14875
|
groupPopularTokens: "\u70ED\u95E8",
|
|
14844
14876
|
groupStablecoins: "\u7A33\u5B9A\u5E01",
|
|
14845
14877
|
groupOtherChains: "\u5168\u90E8",
|
|
14846
|
-
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"
|
|
14847
14881
|
},
|
|
14848
14882
|
lightningInvoice: {
|
|
14849
14883
|
yourLightningInvoice: "\u95EA\u7535\u7F51\u7EDC\u53D1\u7968"
|
|
@@ -14867,7 +14901,6 @@ var zh_default = {
|
|
|
14867
14901
|
depositProcessing: "\u5B58\u6B3E\u5904\u7406\u4E2D",
|
|
14868
14902
|
depositWillBeCompletedSoon: "\u60A8\u7684\u5B58\u6B3E\u5C06\u5F88\u5FEB\u5B8C\u6210\u3002",
|
|
14869
14903
|
depositWillBeCredited: "\u60A8\u7684\u5B58\u6B3E\u5C06\u5F88\u5FEB\u8BB0\u5165\u60A8\u7684\u8D26\u6237\u3002",
|
|
14870
|
-
depositWillBeCreditedLighterNative: "\u60A8\u7684\u5B58\u6B3E\u5C06\u5728\u5927\u7EA6\u4E24\u5206\u949F\u5185\u8BB0\u5165\u60A8\u7684\u8D26\u6237\u3002",
|
|
14871
14904
|
depositHasBeenCredited: "\u60A8\u7684\u5B58\u6B3E\u5DF2\u8BB0\u5165\u60A8\u7684\u8D26\u6237\u3002",
|
|
14872
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",
|
|
14873
14906
|
issueOccurredWithDeposit: "\u60A8\u7684\u5B58\u6B3E\u51FA\u73B0\u95EE\u9898\u3002\u8BF7\u91CD\u8BD5\u3002",
|
|
@@ -14966,6 +14999,7 @@ var zh_default = {
|
|
|
14966
14999
|
unsupportedExecutionType: "\u4E0D\u652F\u6301\u7684\u4EA4\u6613\u7C7B\u578B\u3002\u5C1D\u8BD5\u4E0D\u540C\u7684\u65B9\u6CD5\u3002",
|
|
14967
15000
|
unsupportedRoute: "\u4EE3\u5E01\u5BF9\u4E0D\u53EF\u7528\u3002\u5C1D\u8BD5\u4E0D\u540C\u7684\u4EE3\u5E01\u3002",
|
|
14968
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",
|
|
14969
15003
|
destinationTxFailed: "\u4EA4\u6613\u5931\u8D25\u3002\u8BF7\u91CD\u8BD5\u6216<ContactSupportLink>\u8054\u7CFB\u6211\u4EEC</ContactSupportLink>\u3002",
|
|
14970
15004
|
erc20RouterAddressNotFound: "\u51FA\u73B0\u95EE\u9898\u3002\u8BF7\u5C1D\u8BD5\u4E0D\u540C\u7684\u4EE3\u5E01\u6216<ContactSupportLink>\u8054\u7CFB\u6211\u4EEC</ContactSupportLink>\u3002",
|
|
14971
15005
|
unknownError: "\u51FA\u73B0\u95EE\u9898\u3002\u8BF7\u91CD\u8BD5\u6216<ContactSupportLink>\u8054\u7CFB\u6211\u4EEC</ContactSupportLink>\u3002",
|
|
@@ -15197,7 +15231,7 @@ var zh_default = {
|
|
|
15197
15231
|
sourceMethodTitle: "\u60A8\u7684\u6765\u6E90",
|
|
15198
15232
|
tokensListTitle: "\u60A8\u7684\u4EE3\u5E01",
|
|
15199
15233
|
transferTokens: "\u8F6C\u8D26\u52A0\u5BC6\u8D27\u5E01",
|
|
15200
|
-
bitcoinLightning: "
|
|
15234
|
+
bitcoinLightning: "Bitcoin Lightning",
|
|
15201
15235
|
receiveDropdownTitle: "",
|
|
15202
15236
|
receiveDropdownLabel: "\u63A5\u6536\u8D44\u4EA7",
|
|
15203
15237
|
payAmountLabel: "\u60A8\u53D1\u9001",
|
|
@@ -15628,7 +15662,7 @@ function generateQuoteApiErrorForDisplay(err, t) {
|
|
|
15628
15662
|
|
|
15629
15663
|
// src/domains/aave.ts
|
|
15630
15664
|
import { AaveV3Ethereum } from "@aave-dao/aave-address-book";
|
|
15631
|
-
import { isTokenEquivalent as
|
|
15665
|
+
import { isTokenEquivalent as isTokenEquivalent4 } from "@funkit/utils";
|
|
15632
15666
|
var AAVE_MARKET_ADDRESS_BY_CHAIN = {
|
|
15633
15667
|
"1": AaveV3Ethereum.POOL
|
|
15634
15668
|
};
|
|
@@ -15646,7 +15680,7 @@ function isAaveNativeSupplyContext({
|
|
|
15646
15680
|
if (!AAVE_MARKET_ADDRESS_BY_CHAIN[String(checkoutConfig.targetChain)]) {
|
|
15647
15681
|
return false;
|
|
15648
15682
|
}
|
|
15649
|
-
return
|
|
15683
|
+
return isTokenEquivalent4({
|
|
15650
15684
|
firstTokenChainId: String(sourceAsset.chainId),
|
|
15651
15685
|
firstTokenAddress: sourceAsset.address,
|
|
15652
15686
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -16252,7 +16286,7 @@ function createExactOutBuilder(isStablecoin) {
|
|
|
16252
16286
|
};
|
|
16253
16287
|
},
|
|
16254
16288
|
hasKnownAmountBeforeQuote(config) {
|
|
16255
|
-
return !!config.targetAssetAmount &&
|
|
16289
|
+
return !!config.targetAssetAmount && isStablecoin(config.targetAssetTicker);
|
|
16256
16290
|
},
|
|
16257
16291
|
computeQuickOptionAmount({ percentage, usdAvailableAmount }) {
|
|
16258
16292
|
const fiatAmount = usdAvailableAmount != null ? usdAvailableAmount * (percentage / 100) : percentage;
|
|
@@ -18596,7 +18630,7 @@ Dialog.BottomBar = FunBottomBar;
|
|
|
18596
18630
|
|
|
18597
18631
|
// src/modals/WithdrawalModal/LighterWithdrawal.tsx
|
|
18598
18632
|
import { RELAY_LIGHTER_CHAIN_ID as RELAY_LIGHTER_CHAIN_ID2 } from "@funkit/fun-relay";
|
|
18599
|
-
import { formatAddress as formatAddress3, formatCryptoAndStringify
|
|
18633
|
+
import { formatAddress as formatAddress3, formatCryptoAndStringify } from "@funkit/utils";
|
|
18600
18634
|
import * as dnum6 from "dnum";
|
|
18601
18635
|
import React83, { useEffect as useEffect33, useMemo as useMemo26 } from "react";
|
|
18602
18636
|
import { createPortal as createPortal2 } from "react-dom";
|
|
@@ -19118,7 +19152,6 @@ var DecimalSpan = ({
|
|
|
19118
19152
|
|
|
19119
19153
|
// src/components/FunTransactionSummary/PaymentFeesSummary.tsx
|
|
19120
19154
|
import {
|
|
19121
|
-
formatCryptoAndStringify,
|
|
19122
19155
|
formatCurrencyAndStringify as formatCurrencyAndStringify2,
|
|
19123
19156
|
formatDynamicFeeUsd,
|
|
19124
19157
|
formatPercent,
|
|
@@ -19386,17 +19419,9 @@ function translateAppFeeLabel(appFeeLabel, t) {
|
|
|
19386
19419
|
};
|
|
19387
19420
|
return feeLabelMap[appFeeLabel] ?? t("fees.funxyzFee");
|
|
19388
19421
|
}
|
|
19389
|
-
function computeDigest(relayQuoteMetadata, uiCustomizations, totalPriceImpactPercent, gasUsd
|
|
19422
|
+
function computeDigest(relayQuoteMetadata, uiCustomizations, totalPriceImpactPercent, gasUsd) {
|
|
19390
19423
|
const showTransactionDigest = uiCustomizations.confirmationScreen.showTransactionDigest;
|
|
19391
19424
|
const details = relayQuoteMetadata.relayQuote.details;
|
|
19392
|
-
if (checkoutConfig && hasFinalizedToken) {
|
|
19393
|
-
const { finalizedTokenAmount, finalizedTokenSymbol } = computeDisplayDestinationToken(checkoutConfig, 1);
|
|
19394
|
-
const amount = formatCryptoAndStringify(finalizedTokenAmount);
|
|
19395
|
-
return {
|
|
19396
|
-
isMainnet: false,
|
|
19397
|
-
value: `1 ${checkoutConfig.targetAssetTicker} = ${amount} ${finalizedTokenSymbol}`
|
|
19398
|
-
};
|
|
19399
|
-
}
|
|
19400
19425
|
if (showTransactionDigest === "none") {
|
|
19401
19426
|
return {
|
|
19402
19427
|
isMainnet: false,
|
|
@@ -19434,11 +19459,6 @@ function renderRelayFee({
|
|
|
19434
19459
|
const totalPriceImpact = swapImpactUsd + appFeeUsd;
|
|
19435
19460
|
const totalPriceImpactPercent = swapImpact + appFeePercent;
|
|
19436
19461
|
const details = relayQuoteMetadata.relayQuote.details;
|
|
19437
|
-
const hasFinalizedToken = Boolean(checkoutConfig?.finalizedToken);
|
|
19438
|
-
const isVaultDeposit = checkoutConfig && isVaultDepositCheckout(checkoutConfig, {
|
|
19439
|
-
tokenAddress: details?.currencyIn?.currency?.address || "0x",
|
|
19440
|
-
chainId: String(details?.currencyIn?.currency?.chainId || "")
|
|
19441
|
-
});
|
|
19442
19462
|
const selectedRouteConfig = uiCustomizations.confirmationScreen.selectedRouteConfig;
|
|
19443
19463
|
const passthroughLabel = selectedRouteConfig?.passthroughLabel ?? t("fees.selectedRouteNativeBridge");
|
|
19444
19464
|
const passthroughIcon = selectedRouteConfig ? /* @__PURE__ */ React81.createElement(
|
|
@@ -19477,13 +19497,7 @@ function renderRelayFee({
|
|
|
19477
19497
|
relayQuoteMetadata,
|
|
19478
19498
|
uiCustomizations,
|
|
19479
19499
|
totalPriceImpactPercent,
|
|
19480
|
-
totalNetworkCostUsd
|
|
19481
|
-
checkoutConfig,
|
|
19482
|
-
hasFinalizedToken
|
|
19483
|
-
);
|
|
19484
|
-
const { finalizedTokenAmount } = computeDisplayDestinationToken(
|
|
19485
|
-
checkoutConfig,
|
|
19486
|
-
checkoutConfig?.targetAssetAmount || 0
|
|
19500
|
+
totalNetworkCostUsd
|
|
19487
19501
|
);
|
|
19488
19502
|
const showSelectedRoute = uiCustomizations.confirmationScreen.showSelectedRoute || !!selectedRouteConfig;
|
|
19489
19503
|
return {
|
|
@@ -19501,20 +19515,6 @@ function renderRelayFee({
|
|
|
19501
19515
|
value: selectedRoute.label
|
|
19502
19516
|
}
|
|
19503
19517
|
] : [],
|
|
19504
|
-
...checkoutConfig?.finalizedToken && !isVaultDeposit ? [
|
|
19505
|
-
{
|
|
19506
|
-
label: t("fees.receiveAtLeast"),
|
|
19507
|
-
testId: "receive-at-least",
|
|
19508
|
-
value: `${formatCryptoAndStringify(finalizedTokenAmount)} ${checkoutConfig.finalizedToken.tokenSymbol}`
|
|
19509
|
-
}
|
|
19510
|
-
] : [],
|
|
19511
|
-
...hasFinalizedToken ? [
|
|
19512
|
-
{
|
|
19513
|
-
label: t("fees.exchangeRate"),
|
|
19514
|
-
testId: "exchange-rate",
|
|
19515
|
-
value: collapsedValue ?? ""
|
|
19516
|
-
}
|
|
19517
|
-
] : [],
|
|
19518
19518
|
{
|
|
19519
19519
|
label: t("fees.networkCost"),
|
|
19520
19520
|
testId: "network-cost",
|
|
@@ -19611,7 +19611,7 @@ function renderRelayFee({
|
|
|
19611
19611
|
value: t("fees.autoSlippageValue", {
|
|
19612
19612
|
value: formatPercent(maxSlippage)
|
|
19613
19613
|
}),
|
|
19614
|
-
tooltipText:
|
|
19614
|
+
tooltipText: t("fees.slippageTooltipWithMin", {
|
|
19615
19615
|
minReceived: formatCurrencyAndStringify2(minReceived)
|
|
19616
19616
|
})
|
|
19617
19617
|
},
|
|
@@ -19945,6 +19945,20 @@ var getTokenIconUrl = (symbol, tokens) => {
|
|
|
19945
19945
|
|
|
19946
19946
|
// src/modals/WithdrawalModal/LighterWithdrawal.tsx
|
|
19947
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
|
+
}
|
|
19948
19962
|
var LIGHTER_FAST_MAX_WITHDRAWAL_LABEL = "$3M";
|
|
19949
19963
|
function LighterFastMaxExceededMessage({
|
|
19950
19964
|
onSwitchToSecure
|
|
@@ -20239,7 +20253,7 @@ function LighterSecureReceiveAmountValue({
|
|
|
20239
20253
|
size: "withdrawalYouWillReceive",
|
|
20240
20254
|
weight: "withdrawalYouWillReceiveValueCrypto"
|
|
20241
20255
|
},
|
|
20242
|
-
amount ?
|
|
20256
|
+
amount ? formatCryptoAndStringify(Number(amount), tokenSymbol, true, {
|
|
20243
20257
|
minBeforeUseScientific: 0,
|
|
20244
20258
|
numberFormatOptions: { maximumFractionDigits: 8 }
|
|
20245
20259
|
}) : NO_DATA_VALUE
|
|
@@ -20267,7 +20281,7 @@ function LighterSecureWithdrawalSuccess({
|
|
|
20267
20281
|
height: 15,
|
|
20268
20282
|
borderRadius: "full"
|
|
20269
20283
|
}
|
|
20270
|
-
), /* @__PURE__ */ React83.createElement(Text, { size: "txSummaryValue", weight: "txSummaryValue" },
|
|
20284
|
+
), /* @__PURE__ */ React83.createElement(Text, { size: "txSummaryValue", weight: "txSummaryValue" }, formatCryptoAndStringify(Number(amount), tokenSymbol))));
|
|
20271
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(
|
|
20272
20286
|
FunRedirectButton,
|
|
20273
20287
|
{
|
|
@@ -20361,10 +20375,8 @@ import {
|
|
|
20361
20375
|
} from "@funkit/connect-core";
|
|
20362
20376
|
import { useMemo as useMemo27 } from "react";
|
|
20363
20377
|
function useRecentDepositsApi(params) {
|
|
20364
|
-
const isFasterNotificationsEnabled = useFeatureGate("faster-notifications");
|
|
20365
20378
|
return useRecentDepositsApiQuery({
|
|
20366
20379
|
...params,
|
|
20367
|
-
isFasterNotificationsEnabled,
|
|
20368
20380
|
logger
|
|
20369
20381
|
});
|
|
20370
20382
|
}
|
|
@@ -20420,7 +20432,7 @@ function useFunkitRecentDepositsImpl(query) {
|
|
|
20420
20432
|
import {
|
|
20421
20433
|
formatAddress as formatAddress6,
|
|
20422
20434
|
formatTimestamp as formatTimestamp2,
|
|
20423
|
-
isTokenEquivalent as
|
|
20435
|
+
isTokenEquivalent as isTokenEquivalent5
|
|
20424
20436
|
} from "@funkit/utils";
|
|
20425
20437
|
import React112, { useCallback as useCallback23, useMemo as useMemo33, useRef as useRef14, useState as useState31 } from "react";
|
|
20426
20438
|
import { createPortal as createPortal3 } from "react-dom";
|
|
@@ -20437,13 +20449,14 @@ import React106 from "react";
|
|
|
20437
20449
|
|
|
20438
20450
|
// src/hooks/usePaymentMethodIcon.tsx
|
|
20439
20451
|
import React105 from "react";
|
|
20452
|
+
import { bitcoinChain as bitcoinChain4 } from "@funkit/chains";
|
|
20440
20453
|
|
|
20441
20454
|
// src/components/FunPayments/FunPaymentMethods.tsx
|
|
20442
20455
|
import {
|
|
20443
20456
|
BridgeCustomerStatus as BridgeCustomerStatus3,
|
|
20444
20457
|
FormOfPaymentType as FormOfPaymentType3
|
|
20445
20458
|
} from "@funkit/api-base";
|
|
20446
|
-
import {
|
|
20459
|
+
import { lightningChain } from "@funkit/chains";
|
|
20447
20460
|
import {
|
|
20448
20461
|
formatCurrencyAndStringify as formatCurrencyAndStringify4
|
|
20449
20462
|
} from "@funkit/utils";
|
|
@@ -20727,7 +20740,8 @@ var EMPTY_RESULT = {
|
|
|
20727
20740
|
chainIdSortOrder: [],
|
|
20728
20741
|
defaultChainId: void 0,
|
|
20729
20742
|
priorityTokenSymbols: [],
|
|
20730
|
-
newBadgeSymbols: /* @__PURE__ */ new Set()
|
|
20743
|
+
newBadgeSymbols: /* @__PURE__ */ new Set(),
|
|
20744
|
+
addressBySymbolByChainId: {}
|
|
20731
20745
|
};
|
|
20732
20746
|
function useTokenTransferConfig(isWithdrawal = false) {
|
|
20733
20747
|
const tokenTransferConfig = useDynamicConfig("tokentransferconfig");
|
|
@@ -21846,12 +21860,7 @@ var BitcoinLightningPaymentMethodItem = ({
|
|
|
21846
21860
|
const { isUserGeoblocked } = useFunkitUserIp();
|
|
21847
21861
|
const { t } = useFunkitTranslation();
|
|
21848
21862
|
const { textCustomizations } = useFunkitConfig();
|
|
21849
|
-
const valueIcon = customValueIcon ?? /* @__PURE__ */ React92.createElement(
|
|
21850
|
-
SupportedChainList,
|
|
21851
|
-
{
|
|
21852
|
-
chainIdList: [bitcoinChain4.id, lightningChain.id].map(String)
|
|
21853
|
-
}
|
|
21854
|
-
);
|
|
21863
|
+
const valueIcon = customValueIcon ?? /* @__PURE__ */ React92.createElement(SupportedChainList, { chainIdList: [lightningChain.id].map(String) });
|
|
21855
21864
|
const limit = formatCurrencyAndStringify4(MAX_BTC_LIGHTNING_AMOUNT_USD, {
|
|
21856
21865
|
maxBeforeUseSuffix: 1e3
|
|
21857
21866
|
});
|
|
@@ -22202,32 +22211,9 @@ var ApplePayIcon = ({ size = 20 }) => /* @__PURE__ */ React93.createElement(
|
|
|
22202
22211
|
)
|
|
22203
22212
|
);
|
|
22204
22213
|
|
|
22205
|
-
// src/components/Icons/CashAppIcon.tsx
|
|
22206
|
-
import React94 from "react";
|
|
22207
|
-
var CashAppIcon = ({ size = 20 }) => /* @__PURE__ */ React94.createElement(
|
|
22208
|
-
"svg",
|
|
22209
|
-
{
|
|
22210
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
22211
|
-
width: size,
|
|
22212
|
-
height: size,
|
|
22213
|
-
viewBox: "0 0 210 210",
|
|
22214
|
-
fill: "none"
|
|
22215
|
-
},
|
|
22216
|
-
/* @__PURE__ */ React94.createElement("rect", { width: "150", height: "150", x: "25", y: "25", rx: "7.81424", fill: "#ffffff" }),
|
|
22217
|
-
/* @__PURE__ */ React94.createElement(
|
|
22218
|
-
"path",
|
|
22219
|
-
{
|
|
22220
|
-
fill: "#00e013",
|
|
22221
|
-
fillRule: "evenodd",
|
|
22222
|
-
clipRule: "evenodd",
|
|
22223
|
-
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"
|
|
22224
|
-
}
|
|
22225
|
-
)
|
|
22226
|
-
);
|
|
22227
|
-
|
|
22228
22214
|
// src/components/Icons/CryptoTransferQRIcon.tsx
|
|
22229
|
-
import
|
|
22230
|
-
var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22215
|
+
import React94 from "react";
|
|
22216
|
+
var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */ React94.createElement(
|
|
22231
22217
|
"svg",
|
|
22232
22218
|
{
|
|
22233
22219
|
width: size,
|
|
@@ -22236,7 +22222,7 @@ var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */ React95.createElem
|
|
|
22236
22222
|
fill: "none",
|
|
22237
22223
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22238
22224
|
},
|
|
22239
|
-
/* @__PURE__ */
|
|
22225
|
+
/* @__PURE__ */ React94.createElement(
|
|
22240
22226
|
"path",
|
|
22241
22227
|
{
|
|
22242
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",
|
|
@@ -22249,8 +22235,8 @@ var CryptoTransferQRIcon = ({ size = 20 }) => /* @__PURE__ */ React95.createElem
|
|
|
22249
22235
|
);
|
|
22250
22236
|
|
|
22251
22237
|
// src/components/Icons/ExchangeIcon.tsx
|
|
22252
|
-
import
|
|
22253
|
-
var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22238
|
+
import React95 from "react";
|
|
22239
|
+
var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */ React95.createElement(
|
|
22254
22240
|
"svg",
|
|
22255
22241
|
{
|
|
22256
22242
|
width: size,
|
|
@@ -22259,7 +22245,7 @@ var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */ React96.createElement(
|
|
|
22259
22245
|
fill: "none",
|
|
22260
22246
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22261
22247
|
},
|
|
22262
|
-
/* @__PURE__ */
|
|
22248
|
+
/* @__PURE__ */ React95.createElement(
|
|
22263
22249
|
"path",
|
|
22264
22250
|
{
|
|
22265
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",
|
|
@@ -22272,8 +22258,8 @@ var ExchangeIcon = ({ size = 20 }) => /* @__PURE__ */ React96.createElement(
|
|
|
22272
22258
|
);
|
|
22273
22259
|
|
|
22274
22260
|
// src/components/Icons/FanaticsCreditCardIcon.tsx
|
|
22275
|
-
import
|
|
22276
|
-
var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22261
|
+
import React96 from "react";
|
|
22262
|
+
var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */ React96.createElement(
|
|
22277
22263
|
"svg",
|
|
22278
22264
|
{
|
|
22279
22265
|
width: size,
|
|
@@ -22282,7 +22268,7 @@ var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */ React97.createEl
|
|
|
22282
22268
|
fill: "none",
|
|
22283
22269
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22284
22270
|
},
|
|
22285
|
-
/* @__PURE__ */
|
|
22271
|
+
/* @__PURE__ */ React96.createElement(
|
|
22286
22272
|
"path",
|
|
22287
22273
|
{
|
|
22288
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",
|
|
@@ -22295,8 +22281,8 @@ var FanaticsCreditCardIcon = ({ size = 20 }) => /* @__PURE__ */ React97.createEl
|
|
|
22295
22281
|
);
|
|
22296
22282
|
|
|
22297
22283
|
// src/components/Icons/GooglePayIcon.tsx
|
|
22298
|
-
import
|
|
22299
|
-
var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */
|
|
22284
|
+
import React97 from "react";
|
|
22285
|
+
var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */ React97.createElement(
|
|
22300
22286
|
"svg",
|
|
22301
22287
|
{
|
|
22302
22288
|
width: size,
|
|
@@ -22305,28 +22291,28 @@ var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */ React98.createElement(
|
|
|
22305
22291
|
fill: "none",
|
|
22306
22292
|
xmlns: "http://www.w3.org/2000/svg"
|
|
22307
22293
|
},
|
|
22308
|
-
/* @__PURE__ */
|
|
22294
|
+
/* @__PURE__ */ React97.createElement(
|
|
22309
22295
|
"path",
|
|
22310
22296
|
{
|
|
22311
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",
|
|
22312
22298
|
fill: "currentColor"
|
|
22313
22299
|
}
|
|
22314
22300
|
),
|
|
22315
|
-
/* @__PURE__ */
|
|
22301
|
+
/* @__PURE__ */ React97.createElement(
|
|
22316
22302
|
"path",
|
|
22317
22303
|
{
|
|
22318
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",
|
|
22319
22305
|
fill: "currentColor"
|
|
22320
22306
|
}
|
|
22321
22307
|
),
|
|
22322
|
-
/* @__PURE__ */
|
|
22308
|
+
/* @__PURE__ */ React97.createElement(
|
|
22323
22309
|
"path",
|
|
22324
22310
|
{
|
|
22325
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",
|
|
22326
22312
|
fill: "currentColor"
|
|
22327
22313
|
}
|
|
22328
22314
|
),
|
|
22329
|
-
/* @__PURE__ */
|
|
22315
|
+
/* @__PURE__ */ React97.createElement(
|
|
22330
22316
|
"path",
|
|
22331
22317
|
{
|
|
22332
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",
|
|
@@ -22335,6 +22321,44 @@ var GooglePayIcon = ({ size = 20 }) => /* @__PURE__ */ React98.createElement(
|
|
|
22335
22321
|
)
|
|
22336
22322
|
);
|
|
22337
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
|
+
|
|
22338
22362
|
// src/components/Icons/New/BankIcon.tsx
|
|
22339
22363
|
import React99 from "react";
|
|
22340
22364
|
var BankIcon = ({ size = 20 }) => {
|
|
@@ -22542,7 +22566,20 @@ var PAYMENT_METHOD_ICONS = {
|
|
|
22542
22566
|
[PaymentMethod.GOOGLE_PAY]: (size) => /* @__PURE__ */ React105.createElement(GooglePayIcon, { size }),
|
|
22543
22567
|
[PaymentMethod.REVOLUT_PAY]: (size) => /* @__PURE__ */ React105.createElement(RevolutPayIcon, { size }),
|
|
22544
22568
|
[PaymentMethod.TOKEN_TRANSFER]: (size) => /* @__PURE__ */ React105.createElement(CryptoTransferQRIcon, { size }),
|
|
22545
|
-
[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
|
+
},
|
|
22546
22583
|
[PaymentMethod.VIRTUAL_BANK]: (size) => /* @__PURE__ */ React105.createElement(BankIcon, { size })
|
|
22547
22584
|
};
|
|
22548
22585
|
var DEFAULT_PAYMENT_METHOD_ICON_SIZE = 20;
|
|
@@ -22912,7 +22949,7 @@ function getCheckoutCompletionTime(checkout) {
|
|
|
22912
22949
|
// src/components/ReceiveAmount/ReceiveAmount.tsx
|
|
22913
22950
|
import React108 from "react";
|
|
22914
22951
|
var ReceiveAmount = ({ config, icon, quote }) => {
|
|
22915
|
-
const iconSrc = config.
|
|
22952
|
+
const iconSrc = config.iconSrc ?? FALLBACK_ASSET;
|
|
22916
22953
|
return /* @__PURE__ */ React108.createElement(Box, { display: "flex", gap: "5", alignItems: "center" }, icon ?? /* @__PURE__ */ React108.createElement(
|
|
22917
22954
|
AsyncImage,
|
|
22918
22955
|
{
|
|
@@ -23306,7 +23343,7 @@ function DirectExecutionSummaryHistory({
|
|
|
23306
23343
|
});
|
|
23307
23344
|
const receiveAmountLabel = useReceiveAmountLabel({
|
|
23308
23345
|
directExecutionType: directExecution?.type,
|
|
23309
|
-
isSameToken: directExecution ?
|
|
23346
|
+
isSameToken: directExecution ? isTokenEquivalent5({
|
|
23310
23347
|
firstTokenAddress: directExecution.fromTokenAddress,
|
|
23311
23348
|
firstTokenChainId: directExecution.fromChainId,
|
|
23312
23349
|
secondTokenAddress: directExecution.toTokenAddress,
|
|
@@ -23737,7 +23774,7 @@ var WithdrawalCallbackSuccess = ({
|
|
|
23737
23774
|
|
|
23738
23775
|
// src/modals/WithdrawalModal/WithdrawalContent.tsx
|
|
23739
23776
|
import {
|
|
23740
|
-
formatCryptoAndStringify as
|
|
23777
|
+
formatCryptoAndStringify as formatCryptoAndStringify3,
|
|
23741
23778
|
formatCurrencyAndStringify as formatCurrencyAndStringify6
|
|
23742
23779
|
} from "@funkit/utils";
|
|
23743
23780
|
import React133, { useCallback as useCallback27, useEffect as useEffect43, useMemo as useMemo40, useRef as useRef19, useState as useState41 } from "react";
|
|
@@ -25214,11 +25251,11 @@ function FunNotification({
|
|
|
25214
25251
|
}
|
|
25215
25252
|
|
|
25216
25253
|
// src/hooks/queries/useWithdrawalQuote.ts
|
|
25217
|
-
import { isTokenEquivalent as
|
|
25254
|
+
import { isTokenEquivalent as isTokenEquivalent6 } from "@funkit/utils";
|
|
25218
25255
|
import { useQuery as useQuery17 } from "@tanstack/react-query";
|
|
25219
25256
|
|
|
25220
25257
|
// src/hooks/useIsBlacklistedWithdrawalAddress.ts
|
|
25221
|
-
import {
|
|
25258
|
+
import { isEVMAddressEquivalent as isEVMAddressEquivalent2 } from "@funkit/utils";
|
|
25222
25259
|
import { useMemo as useMemo39 } from "react";
|
|
25223
25260
|
function useIsBlacklistedWithdrawalAddress(address) {
|
|
25224
25261
|
const addressBlacklist = useDynamicConfig("blacklistedwithdrawaladdress");
|
|
@@ -25235,9 +25272,9 @@ function useIsBlacklistedWithdrawalAddress(address) {
|
|
|
25235
25272
|
return addresses;
|
|
25236
25273
|
}, [withdrawalConfig.chains]);
|
|
25237
25274
|
return Object.keys(addressBlacklist).concat(withdrawalTokenAddresses).some(
|
|
25238
|
-
(blockedAddress) =>
|
|
25239
|
-
|
|
25240
|
-
|
|
25275
|
+
(blockedAddress) => isEVMAddressEquivalent2({
|
|
25276
|
+
firstAddress: blockedAddress,
|
|
25277
|
+
secondAddress: address
|
|
25241
25278
|
})
|
|
25242
25279
|
);
|
|
25243
25280
|
}
|
|
@@ -25271,7 +25308,7 @@ function useWithdrawalQuote({
|
|
|
25271
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
|
|
25272
25309
|
// may not be matching the props in intermediate renders. This ensures we don't
|
|
25273
25310
|
// fire quotes in such states.
|
|
25274
|
-
|
|
25311
|
+
isTokenEquivalent6({
|
|
25275
25312
|
firstTokenChainId: targetChain,
|
|
25276
25313
|
firstTokenAddress: targetAsset,
|
|
25277
25314
|
secondTokenChainId: selectedChainId,
|
|
@@ -25393,40 +25430,7 @@ import {
|
|
|
25393
25430
|
convertFunToRelayTokenAddress,
|
|
25394
25431
|
getRelayAssetPriceInfo
|
|
25395
25432
|
} from "@funkit/fun-relay";
|
|
25396
|
-
import { skipToken, useQuery as
|
|
25397
|
-
|
|
25398
|
-
// src/hooks/queries/useErc20Asset.ts
|
|
25399
|
-
import { getAssetErc20ByChainAndSymbol } from "@funkit/api-base";
|
|
25400
|
-
import { useQuery as useQuery19 } from "@tanstack/react-query";
|
|
25401
|
-
var useErc20Asset = ({
|
|
25402
|
-
chainId: chainId2,
|
|
25403
|
-
symbol,
|
|
25404
|
-
enabled = true
|
|
25405
|
-
}) => {
|
|
25406
|
-
const { apiKey } = useFunkitConfig();
|
|
25407
|
-
const query = useQuery19({
|
|
25408
|
-
queryKey: ["erc20Asset", chainId2, symbol],
|
|
25409
|
-
queryFn: async () => {
|
|
25410
|
-
if (!apiKey || !chainId2 || !symbol) {
|
|
25411
|
-
return null;
|
|
25412
|
-
}
|
|
25413
|
-
const response = await getAssetErc20ByChainAndSymbol({
|
|
25414
|
-
chainId: chainId2,
|
|
25415
|
-
symbol,
|
|
25416
|
-
apiKey,
|
|
25417
|
-
logger
|
|
25418
|
-
});
|
|
25419
|
-
return response;
|
|
25420
|
-
},
|
|
25421
|
-
enabled: enabled && !!apiKey && !!chainId2 && !!symbol,
|
|
25422
|
-
refetchOnMount: false,
|
|
25423
|
-
refetchOnReconnect: false,
|
|
25424
|
-
refetchOnWindowFocus: false
|
|
25425
|
-
});
|
|
25426
|
-
return query;
|
|
25427
|
-
};
|
|
25428
|
-
|
|
25429
|
-
// src/hooks/useAssetPrice.ts
|
|
25433
|
+
import { skipToken, useQuery as useQuery19 } from "@tanstack/react-query";
|
|
25430
25434
|
async function getFormattedRelayAssetPriceInfo({
|
|
25431
25435
|
chainId: chainId2,
|
|
25432
25436
|
assetTokenAddress
|
|
@@ -25479,7 +25483,7 @@ function useAssetAddressPrice({
|
|
|
25479
25483
|
}) {
|
|
25480
25484
|
const { apiKey } = useFunkitConfig();
|
|
25481
25485
|
const isStablecoin = useIsStablecoin();
|
|
25482
|
-
const { data, error, isLoading } =
|
|
25486
|
+
const { data, error, isLoading } = useQuery19({
|
|
25483
25487
|
queryKey: ["getAssetPriceInfo", chainId2, assetTokenAddress],
|
|
25484
25488
|
queryFn: enabled && chainId2 && assetTokenAddress ? () => getAssetPriceInfoWithFallback({
|
|
25485
25489
|
apiKey,
|
|
@@ -25495,27 +25499,6 @@ function useAssetAddressPrice({
|
|
|
25495
25499
|
price: unitPrice !== void 0 ? unitPrice * amount : void 0
|
|
25496
25500
|
};
|
|
25497
25501
|
}
|
|
25498
|
-
var useAssetSymbolPrice = ({
|
|
25499
|
-
chainId: chainId2,
|
|
25500
|
-
symbol,
|
|
25501
|
-
refetchInterval,
|
|
25502
|
-
enabled = true
|
|
25503
|
-
}) => {
|
|
25504
|
-
const assetQuery = useErc20Asset({ chainId: chainId2, symbol, enabled });
|
|
25505
|
-
const priceQuery = useAssetAddressPrice({
|
|
25506
|
-
chainId: chainId2,
|
|
25507
|
-
assetTokenAddress: assetQuery.data?.address,
|
|
25508
|
-
symbol,
|
|
25509
|
-
refetchInterval,
|
|
25510
|
-
enabled
|
|
25511
|
-
});
|
|
25512
|
-
return {
|
|
25513
|
-
asset: assetQuery.data,
|
|
25514
|
-
error: assetQuery.error || priceQuery.error,
|
|
25515
|
-
isLoading: priceQuery.isLoading || assetQuery.isLoading,
|
|
25516
|
-
price: priceQuery.price
|
|
25517
|
-
};
|
|
25518
|
-
};
|
|
25519
25502
|
|
|
25520
25503
|
// src/hooks/useTokenAndChainDropdown.ts
|
|
25521
25504
|
import { useEffect as useEffect40, useState as useState36 } from "react";
|
|
@@ -25579,7 +25562,7 @@ var useTokenAndChainDropdown = ({
|
|
|
25579
25562
|
const tokenTransferConfig = useTokenTransferConfig(isWithdrawal);
|
|
25580
25563
|
const isLoadingAssets = tokenTransferConfig.isLoading || Object.keys(tokenTransferConfig.symbolsByChainId).length === 0;
|
|
25581
25564
|
const popularTokenSymbols = tokenTransferConfig.popularTokenSymbols ?? [];
|
|
25582
|
-
const preferredChainId = defaultValues?.chainId ?? tokenTransferConfig.defaultChainId;
|
|
25565
|
+
const preferredChainId = isWithdrawal ? tokenTransferConfig.defaultChainId ?? defaultValues?.chainId : defaultValues?.chainId ?? tokenTransferConfig.defaultChainId;
|
|
25583
25566
|
const validDefaultChainId = resolveDefaultChainId(
|
|
25584
25567
|
enabledChainSymbols,
|
|
25585
25568
|
preferredChainId
|
|
@@ -25981,7 +25964,7 @@ function WithdrawRecipientAddress({
|
|
|
25981
25964
|
// src/modals/WithdrawalModal/WithdrawAmountInput.tsx
|
|
25982
25965
|
import { RELAY_LIGHTER_CHAIN_ID as RELAY_LIGHTER_CHAIN_ID3 } from "@funkit/fun-relay";
|
|
25983
25966
|
import {
|
|
25984
|
-
formatCryptoAndStringify as
|
|
25967
|
+
formatCryptoAndStringify as formatCryptoAndStringify2,
|
|
25985
25968
|
formatCurrencyAndStringify as formatCurrencyAndStringify5
|
|
25986
25969
|
} from "@funkit/utils";
|
|
25987
25970
|
import * as DropdownMenu3 from "@radix-ui/react-dropdown-menu";
|
|
@@ -26065,7 +26048,7 @@ function WithdrawAmountInput({
|
|
|
26065
26048
|
Number(withdrawalInputAmount) * sourceTokenUsdPrice,
|
|
26066
26049
|
{ minBeforeUseScientific: 0 }
|
|
26067
26050
|
)), Number(sourceTokenBalance) > 0 && /* @__PURE__ */ React131.createElement(Text, { size: "12", color: "secondaryText" }, t("withdrawal.balance", {
|
|
26068
|
-
amount:
|
|
26051
|
+
amount: formatCryptoAndStringify2(Number(sourceTokenBalance)),
|
|
26069
26052
|
symbol: activeSymbol
|
|
26070
26053
|
})))));
|
|
26071
26054
|
}
|
|
@@ -26720,6 +26703,7 @@ function useWithdrawalAssets(config) {
|
|
|
26720
26703
|
isWithdrawal: true,
|
|
26721
26704
|
noDefaultSelection: enableEmptyWithdrawalSelection
|
|
26722
26705
|
});
|
|
26706
|
+
const { addressBySymbolByChainId } = useTokenTransferConfig(true);
|
|
26723
26707
|
return {
|
|
26724
26708
|
assets,
|
|
26725
26709
|
selectedChainId,
|
|
@@ -26730,7 +26714,8 @@ function useWithdrawalAssets(config) {
|
|
|
26730
26714
|
chainIdSortOrder,
|
|
26731
26715
|
popularTokenSymbols,
|
|
26732
26716
|
priorityTokenSymbols,
|
|
26733
|
-
isLoadingAssets
|
|
26717
|
+
isLoadingAssets,
|
|
26718
|
+
addressBySymbolByChainId
|
|
26734
26719
|
};
|
|
26735
26720
|
}
|
|
26736
26721
|
function toUsdValue(sourceAmount, sourceTokenUsdPrice) {
|
|
@@ -26754,6 +26739,7 @@ function getWithdrawButtonText({
|
|
|
26754
26739
|
isWithdrawing,
|
|
26755
26740
|
isValidAddress,
|
|
26756
26741
|
isRecipientBlacklisted,
|
|
26742
|
+
isRecipientSameAsSource,
|
|
26757
26743
|
withdrawalInputAmount,
|
|
26758
26744
|
isWithdrawAmountValid,
|
|
26759
26745
|
isWithdrawAmountTooHigh,
|
|
@@ -26772,6 +26758,9 @@ function getWithdrawButtonText({
|
|
|
26772
26758
|
if (isRecipientBlacklisted) {
|
|
26773
26759
|
return t("withdrawal.unsupportedRecipientAddress");
|
|
26774
26760
|
}
|
|
26761
|
+
if (isRecipientSameAsSource) {
|
|
26762
|
+
return t("withdrawal.recipientSameAsSource");
|
|
26763
|
+
}
|
|
26775
26764
|
if (isWithdrawAmountTooHigh) {
|
|
26776
26765
|
return t("withdrawal.maxAmountExceeded");
|
|
26777
26766
|
}
|
|
@@ -26872,16 +26861,6 @@ var WithdrawContent = ({
|
|
|
26872
26861
|
} = useLighterWithdrawal(config, setRecipientAddress);
|
|
26873
26862
|
const { address: connectedWalletAddress } = useAccount();
|
|
26874
26863
|
const sourceTokenBalance = lighterBalances[selectedSourceToken.toUpperCase()] ?? fallbackBalance;
|
|
26875
|
-
const {
|
|
26876
|
-
asset: lighterSecureMainnetAsset,
|
|
26877
|
-
price: lighterSecureSourceTokenUsdPrice
|
|
26878
|
-
} = useAssetSymbolPrice({
|
|
26879
|
-
chainId: config.sourceChainId,
|
|
26880
|
-
symbol: selectedSourceToken,
|
|
26881
|
-
refetchInterval: PRICE_REFRESH_INTERVAL,
|
|
26882
|
-
enabled: isLighterSecure
|
|
26883
|
-
});
|
|
26884
|
-
const sourceTokenUsdPrice = isLighterSecure ? lighterSecureSourceTokenUsdPrice : 1;
|
|
26885
26864
|
const [debouncedInputAmount] = useDebounce(withdrawalInputAmount, 300);
|
|
26886
26865
|
const isAmountSettled = withdrawalInputAmount === debouncedInputAmount;
|
|
26887
26866
|
const quoteInputAmount = deductLighterUnstakedFee(
|
|
@@ -26904,14 +26883,22 @@ var WithdrawContent = ({
|
|
|
26904
26883
|
chainIdSortOrder,
|
|
26905
26884
|
popularTokenSymbols,
|
|
26906
26885
|
priorityTokenSymbols,
|
|
26907
|
-
isLoadingAssets
|
|
26886
|
+
isLoadingAssets,
|
|
26887
|
+
addressBySymbolByChainId
|
|
26908
26888
|
} = useWithdrawalAssets(config);
|
|
26909
|
-
const
|
|
26910
|
-
|
|
26911
|
-
|
|
26912
|
-
|
|
26913
|
-
|
|
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({
|
|
26914
26900
|
chainId: selectedChainId?.toString(),
|
|
26901
|
+
assetTokenAddress: targetAssetAddress,
|
|
26915
26902
|
symbol: selectedToken,
|
|
26916
26903
|
refetchInterval: PRICE_REFRESH_INTERVAL
|
|
26917
26904
|
});
|
|
@@ -26929,17 +26916,17 @@ var WithdrawContent = ({
|
|
|
26929
26916
|
}, 0);
|
|
26930
26917
|
}, [targetAssetAmount, updateTargetAssetAmount]);
|
|
26931
26918
|
useEffect43(() => {
|
|
26932
|
-
if (!
|
|
26919
|
+
if (!targetAssetAddress || !selectedChainId || !selectedToken) {
|
|
26933
26920
|
return;
|
|
26934
26921
|
}
|
|
26935
26922
|
updateTargetAsset({
|
|
26936
|
-
targetAsset:
|
|
26923
|
+
targetAsset: targetAssetAddress,
|
|
26937
26924
|
targetChain: selectedChainId.toString(),
|
|
26938
|
-
targetAssetTicker:
|
|
26925
|
+
targetAssetTicker: selectedToken,
|
|
26939
26926
|
targetAssetMinAmount: 0,
|
|
26940
26927
|
iconSrc: getTokenIconUrl(selectedToken)
|
|
26941
26928
|
});
|
|
26942
|
-
}, [
|
|
26929
|
+
}, [targetAssetAddress, updateTargetAsset, selectedChainId, selectedToken]);
|
|
26943
26930
|
const { apiKey } = useFunkitConfig();
|
|
26944
26931
|
const {
|
|
26945
26932
|
data: isRisky,
|
|
@@ -26987,6 +26974,12 @@ var WithdrawContent = ({
|
|
|
26987
26974
|
selectedSourceToken,
|
|
26988
26975
|
selectedChainId
|
|
26989
26976
|
});
|
|
26977
|
+
const isRelaySelfTransfer = isNoOpSelfWithdrawal({
|
|
26978
|
+
config,
|
|
26979
|
+
recipientAddress,
|
|
26980
|
+
selectedChainId,
|
|
26981
|
+
destinationTokenAddress: targetAssetAddress
|
|
26982
|
+
});
|
|
26990
26983
|
const {
|
|
26991
26984
|
isLoading: isQuoteLoading,
|
|
26992
26985
|
data: quote,
|
|
@@ -26996,11 +26989,11 @@ var WithdrawContent = ({
|
|
|
26996
26989
|
config,
|
|
26997
26990
|
recipientAddress: isLighterSecure ? "" : recipientAddress,
|
|
26998
26991
|
selectedChainId: selectedChainId?.toString(),
|
|
26999
|
-
selectedTokenAddress: isLighterSecure ? void 0 :
|
|
26992
|
+
selectedTokenAddress: isLighterSecure ? void 0 : targetAssetAddress,
|
|
27000
26993
|
selectedTokenSymbol: isLighterSecure ? void 0 : selectedToken,
|
|
27001
|
-
// Quote only when risk is clear (fail-closed)
|
|
27002
|
-
// settled
|
|
27003
|
-
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
|
|
27004
26997
|
});
|
|
27005
26998
|
const lighterAssetIndex = isLighterSecure ? resolveLighterAssetIndex(lighterAssets, selectedSourceToken) : void 0;
|
|
27006
26999
|
const submitLighterSecureWithdrawal = () => {
|
|
@@ -27017,7 +27010,7 @@ var WithdrawContent = ({
|
|
|
27017
27010
|
// L1 destination matches the user's L2 source-token selection. Falls
|
|
27018
27011
|
// back to '0x' only if the price/asset hook hasn't resolved — the
|
|
27019
27012
|
// submit button is gated on `lighterAssetIndex` but not on this asset.
|
|
27020
|
-
tokenAddress:
|
|
27013
|
+
tokenAddress: lighterSecureMainnetAddress ?? "0x",
|
|
27021
27014
|
chainId: mainnet8.id,
|
|
27022
27015
|
lighterAssetIndex,
|
|
27023
27016
|
userInputAmount: withdrawalInputAmount
|
|
@@ -27045,7 +27038,7 @@ var WithdrawContent = ({
|
|
|
27045
27038
|
});
|
|
27046
27039
|
throw missingQuoteError;
|
|
27047
27040
|
}
|
|
27048
|
-
if (!
|
|
27041
|
+
if (!targetAssetAddress || !selectedChainId) {
|
|
27049
27042
|
const missingTargetAssetError = new Error(
|
|
27050
27043
|
"Target asset info is not available"
|
|
27051
27044
|
);
|
|
@@ -27072,7 +27065,7 @@ var WithdrawContent = ({
|
|
|
27072
27065
|
destinationAddress: recipientAddress,
|
|
27073
27066
|
withdrawalUSD: usdValue.toString(),
|
|
27074
27067
|
tokenSymbol: token,
|
|
27075
|
-
tokenAddress:
|
|
27068
|
+
tokenAddress: targetAssetAddress,
|
|
27076
27069
|
chainId: selectedChainId,
|
|
27077
27070
|
userInputAmount: withdrawalInputAmount,
|
|
27078
27071
|
quote: quote.finalEstimation
|
|
@@ -27166,7 +27159,7 @@ var WithdrawContent = ({
|
|
|
27166
27159
|
const baseChecks = !!recipientAddress && !!withdrawalInputAmount && !hasAmountError && !hasAddressError && // Fail closed: require a definitive "not risky" result. `undefined`
|
|
27167
27160
|
// (check in flight, query disabled, or API error) must block — a
|
|
27168
27161
|
// Chainalysis outage or a non-screenable address is not a green light.
|
|
27169
|
-
isRisky === false && !isRecipientBlacklisted;
|
|
27162
|
+
isRisky === false && !isRecipientBlacklisted && !isRelaySelfTransfer;
|
|
27170
27163
|
if (!baseChecks) {
|
|
27171
27164
|
return false;
|
|
27172
27165
|
}
|
|
@@ -27260,7 +27253,7 @@ var WithdrawContent = ({
|
|
|
27260
27253
|
size: "withdrawalYouWillReceive",
|
|
27261
27254
|
weight: "withdrawalYouWillReceiveValueCrypto"
|
|
27262
27255
|
},
|
|
27263
|
-
|
|
27256
|
+
formatCryptoAndStringify3(receiveAmountCrypto, selectedToken)
|
|
27264
27257
|
), /* @__PURE__ */ React133.createElement(
|
|
27265
27258
|
Text,
|
|
27266
27259
|
{
|
|
@@ -27282,6 +27275,7 @@ var WithdrawContent = ({
|
|
|
27282
27275
|
isWithdrawing,
|
|
27283
27276
|
isValidAddress,
|
|
27284
27277
|
isRecipientBlacklisted,
|
|
27278
|
+
isRecipientSameAsSource: isRelaySelfTransfer,
|
|
27285
27279
|
withdrawalInputAmount,
|
|
27286
27280
|
isWithdrawAmountValid,
|
|
27287
27281
|
isWithdrawAmountTooHigh,
|
|
@@ -27397,16 +27391,17 @@ var WithdrawContent = ({
|
|
|
27397
27391
|
};
|
|
27398
27392
|
|
|
27399
27393
|
// src/modals/WithdrawalModal/WithdrawalMethodSelect.tsx
|
|
27394
|
+
import { getWithdrawalFopsLimit } from "@funkit/connect-core";
|
|
27400
27395
|
import React139 from "react";
|
|
27401
27396
|
|
|
27402
27397
|
// src/hooks/queries/useWithdrawFops.ts
|
|
27403
27398
|
import { RailConfigType as RailConfigType2, getFops as getFops3 } from "@funkit/api-base";
|
|
27404
|
-
import { useQuery as
|
|
27399
|
+
import { useQuery as useQuery20 } from "@tanstack/react-query";
|
|
27405
27400
|
import { useMemo as useMemo41 } from "react";
|
|
27406
27401
|
|
|
27407
27402
|
// src/utils/swappedRouteOverride.ts
|
|
27408
27403
|
import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9 } from "@funkit/chains";
|
|
27409
|
-
import { isTokenEquivalent as
|
|
27404
|
+
import { isTokenEquivalent as isTokenEquivalent7 } from "@funkit/utils";
|
|
27410
27405
|
var isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
27411
27406
|
var isSupportedChainId = (value) => typeof value === "string" && /^\d+$/.test(value) && Boolean(FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO9[Number(value)]);
|
|
27412
27407
|
var isEvmAddress = (value) => typeof value === "string" && /^0x[a-fA-F0-9]{40}$/.test(value);
|
|
@@ -27415,7 +27410,7 @@ function isWellFormedOverride(override) {
|
|
|
27415
27410
|
}
|
|
27416
27411
|
function findSwappedSourceOverride(overrides, source) {
|
|
27417
27412
|
return overrides?.find(
|
|
27418
|
-
(override) => isWellFormedOverride(override) &&
|
|
27413
|
+
(override) => isWellFormedOverride(override) && isTokenEquivalent7({
|
|
27419
27414
|
firstTokenChainId: override.when.chainId,
|
|
27420
27415
|
firstTokenAddress: override.when.tokenAddress,
|
|
27421
27416
|
secondTokenChainId: source.chainId,
|
|
@@ -27456,7 +27451,7 @@ var useWithdrawFops = (params) => {
|
|
|
27456
27451
|
const userId = userInfo.id;
|
|
27457
27452
|
const countryCode = userIpInfo?.alpha2;
|
|
27458
27453
|
const isEnabled = (params.enabled ?? true) && !!apiKey && !!userId && !!userInfo.address && !!countryCode && !!params.sourceChainId && !!params.sourceTokenAddress && !isSwappedCurrencyCodeLoading;
|
|
27459
|
-
const query =
|
|
27454
|
+
const query = useQuery20({
|
|
27460
27455
|
// `prefillFiatEmail` is intentionally NOT in the queryKey: it's read inside
|
|
27461
27456
|
// `queryFn` and captured at fetch time, so post-mount changes don't trigger a refetch
|
|
27462
27457
|
queryKey: [
|
|
@@ -27748,6 +27743,7 @@ function FormOfPaymentsContent({
|
|
|
27748
27743
|
selectedFop,
|
|
27749
27744
|
onFopSelect,
|
|
27750
27745
|
exchangeRatesData,
|
|
27746
|
+
getDisclaimerLimit,
|
|
27751
27747
|
defaultMaxItems,
|
|
27752
27748
|
enableSourceGroupLabels,
|
|
27753
27749
|
isDisabled,
|
|
@@ -27798,7 +27794,7 @@ function FormOfPaymentsContent({
|
|
|
27798
27794
|
{
|
|
27799
27795
|
key: fop.embeddedFlowUrl || fop.fopType,
|
|
27800
27796
|
fop,
|
|
27801
|
-
disclaimerLimit:
|
|
27797
|
+
disclaimerLimit: getDisclaimerLimit(fop, exchangeRatesData),
|
|
27802
27798
|
isActive: selectedFop?.embeddedFlowUrl === fop.embeddedFlowUrl,
|
|
27803
27799
|
onClick: () => onFopSelect(fop),
|
|
27804
27800
|
disabled: isDisabled,
|
|
@@ -27833,6 +27829,7 @@ function FormOfPaymentsList({
|
|
|
27833
27829
|
selectedFop,
|
|
27834
27830
|
onFopSelect,
|
|
27835
27831
|
exchangeRatesData,
|
|
27832
|
+
getDisclaimerLimit = getFopsLimit,
|
|
27836
27833
|
enableSourceGroupLabels,
|
|
27837
27834
|
isDisabled,
|
|
27838
27835
|
isBelowMinimumBalance
|
|
@@ -27864,6 +27861,7 @@ function FormOfPaymentsList({
|
|
|
27864
27861
|
selectedFop,
|
|
27865
27862
|
onFopSelect,
|
|
27866
27863
|
exchangeRatesData,
|
|
27864
|
+
getDisclaimerLimit,
|
|
27867
27865
|
defaultMaxItems,
|
|
27868
27866
|
enableSourceGroupLabels,
|
|
27869
27867
|
isDisabled,
|
|
@@ -27970,6 +27968,7 @@ function WithdrawalMethodSelect({
|
|
|
27970
27968
|
isLoading: withdrawFops.isLoading || exchangeRates.isLoading,
|
|
27971
27969
|
onFopSelect: onCashFopSelect,
|
|
27972
27970
|
exchangeRatesData: exchangeRates.data,
|
|
27971
|
+
getDisclaimerLimit: getWithdrawalFopsLimit,
|
|
27973
27972
|
enableSourceGroupLabels: false,
|
|
27974
27973
|
isBelowMinimumBalance
|
|
27975
27974
|
}
|
|
@@ -29126,14 +29125,14 @@ var useActivityTraversal = () => {
|
|
|
29126
29125
|
};
|
|
29127
29126
|
|
|
29128
29127
|
// src/modals/ProfileDetails/ProfileDetails.tsx
|
|
29129
|
-
import React277, { useCallback as
|
|
29128
|
+
import React277, { useCallback as useCallback54, useState as useState80 } from "react";
|
|
29130
29129
|
|
|
29131
29130
|
// src/components/ModalHeightAnimationLayer/FunCheckoutModalHeightAnimationWrapper.tsx
|
|
29132
29131
|
import React264 from "react";
|
|
29133
29132
|
|
|
29134
29133
|
// src/modals/CheckoutModal/stepTransition.ts
|
|
29135
29134
|
import {
|
|
29136
|
-
useCallback as
|
|
29135
|
+
useCallback as useCallback52,
|
|
29137
29136
|
useEffect as useEffect71,
|
|
29138
29137
|
useRef as useRef36,
|
|
29139
29138
|
useState as useState77
|
|
@@ -30597,10 +30596,10 @@ import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
|
|
|
30597
30596
|
import React176, { useEffect as useEffect51, useRef as useRef24, useState as useState49 } from "react";
|
|
30598
30597
|
import { createPortal as createPortal9 } from "react-dom";
|
|
30599
30598
|
|
|
30600
|
-
// src/
|
|
30599
|
+
// src/hooks/usePolymarketAccountBalances.ts
|
|
30601
30600
|
import {
|
|
30602
30601
|
skipToken as skipToken2,
|
|
30603
|
-
useQuery as
|
|
30602
|
+
useQuery as useQuery21,
|
|
30604
30603
|
useQueryClient as useQueryClient5
|
|
30605
30604
|
} from "@tanstack/react-query";
|
|
30606
30605
|
import * as dnum7 from "dnum";
|
|
@@ -30660,7 +30659,7 @@ function useAccountBalance(account, refetchIntervalMs) {
|
|
|
30660
30659
|
const queryClient = useQueryClient5();
|
|
30661
30660
|
const getBalanceUsd = account?.getBalanceUsd;
|
|
30662
30661
|
const address = account?.address;
|
|
30663
|
-
const query =
|
|
30662
|
+
const query = useQuery21({
|
|
30664
30663
|
queryKey: polymarketAccountBalanceQueryKey(address),
|
|
30665
30664
|
// `skipToken` disables the query when the account isn't configured (the
|
|
30666
30665
|
// perps-transfer config is optional). It is *not* a fallback for a missing
|
|
@@ -31527,6 +31526,7 @@ var FunTwoFaInput = ({
|
|
|
31527
31526
|
wrap: "nowrap",
|
|
31528
31527
|
justifyContent: "center",
|
|
31529
31528
|
padding: "12",
|
|
31529
|
+
fontFamily: "body",
|
|
31530
31530
|
fontWeight: "medium",
|
|
31531
31531
|
borderStyle: "solid",
|
|
31532
31532
|
borderWidth: "1",
|
|
@@ -32567,8 +32567,8 @@ var ChainInfoBanners = ({ chainId: chainId2 }) => {
|
|
|
32567
32567
|
// src/components/FunTransactionSummary/PaymentAmountSummary.tsx
|
|
32568
32568
|
import {
|
|
32569
32569
|
formatCurrencyAndStringify as formatCurrencyAndStringify7,
|
|
32570
|
-
|
|
32571
|
-
isTokenEquivalent as
|
|
32570
|
+
isEVMAddressEquivalent as isEVMAddressEquivalent3,
|
|
32571
|
+
isTokenEquivalent as isTokenEquivalent8
|
|
32572
32572
|
} from "@funkit/utils";
|
|
32573
32573
|
import NumberFlow from "@number-flow/react";
|
|
32574
32574
|
import { motion as motion11 } from "motion/react";
|
|
@@ -32609,7 +32609,7 @@ function PaymentAmountSummary({
|
|
|
32609
32609
|
const isBrokeragePayment = paymentMethod === PaymentMethod.BROKERAGE;
|
|
32610
32610
|
const receiveAmountLabel = useReceiveAmountLabel({
|
|
32611
32611
|
directExecutionType,
|
|
32612
|
-
isSameToken:
|
|
32612
|
+
isSameToken: isTokenEquivalent8({
|
|
32613
32613
|
firstTokenAddress: sourceTokenAddress,
|
|
32614
32614
|
firstTokenChainId: sourceTokenChainId,
|
|
32615
32615
|
secondTokenAddress: targetTokenAddress,
|
|
@@ -32619,21 +32619,17 @@ function PaymentAmountSummary({
|
|
|
32619
32619
|
const sourceTokenAmount = displayAmounts ? floorToDecimals(Number.parseFloat(displayAmounts.sendAmount), 6) : quote?.finalPaymentTokenAmount ? floorToDecimals(Number.parseFloat(quote.finalPaymentTokenAmount), 6) : void 0;
|
|
32620
32620
|
const paymentTokenUsdAmount = quote ? formatCurrencyAndStringify7(quote.baseQuote.estTotalUsd) : void 0;
|
|
32621
32621
|
const targetTokenAmount = displayAmounts?.receiveAmount != null ? floorToDecimals(Number.parseFloat(displayAmounts.receiveAmount), 6) : checkoutConfig?.targetAssetAmount ?? 0;
|
|
32622
|
-
const { finalizedTokenAmount, finalizedTokenSymbol, finalizedTokenIcon } = computeDisplayDestinationToken(checkoutConfig, targetTokenAmount);
|
|
32623
32622
|
const targetItemName = checkoutConfig?.targetAssetTicker || checkoutConfig?.checkoutItemTitle;
|
|
32624
32623
|
const sourceChainId = sourceAssetInfo?.chainId;
|
|
32625
32624
|
const areSameChains = sourceChainId === targetChainId;
|
|
32626
32625
|
const sourceIcon = sourceAssetInfo?.iconSrc ?? void 0;
|
|
32627
|
-
const isSameTokenAddress =
|
|
32628
|
-
|
|
32629
|
-
|
|
32626
|
+
const isSameTokenAddress = isEVMAddressEquivalent3({
|
|
32627
|
+
firstAddress: sourceTokenAddress,
|
|
32628
|
+
secondAddress: targetTokenAddress
|
|
32630
32629
|
});
|
|
32631
32630
|
const isExactSameToken = areSameChains && isSameTokenAddress;
|
|
32632
|
-
const hasFinalizedToken = Boolean(
|
|
32633
|
-
checkoutItem?.initSettings.config.finalizedToken
|
|
32634
|
-
);
|
|
32635
32631
|
const collapsesToReceive = isExactSameToken || isDirectTransfer;
|
|
32636
|
-
const showYouWillPaySummary = !collapsesToReceive && !isCardPayment
|
|
32632
|
+
const showYouWillPaySummary = !collapsesToReceive && !isCardPayment;
|
|
32637
32633
|
const swapImpactPct = (() => {
|
|
32638
32634
|
if (isAcrossRoute(quote?.baseQuote.metadata)) {
|
|
32639
32635
|
return 0;
|
|
@@ -32671,7 +32667,7 @@ function PaymentAmountSummary({
|
|
|
32671
32667
|
isLoading,
|
|
32672
32668
|
testId: "payment-you-send"
|
|
32673
32669
|
}
|
|
32674
|
-
), /* @__PURE__ */ React190.createElement(FunTxSummaryDivider, null)),
|
|
32670
|
+
), /* @__PURE__ */ React190.createElement(FunTxSummaryDivider, null)), /* @__PURE__ */ React190.createElement(
|
|
32675
32671
|
PaymentAmountSummaryItem,
|
|
32676
32672
|
{
|
|
32677
32673
|
labelIcon: uiCustomizations.customIcons.youReceive,
|
|
@@ -32698,27 +32694,6 @@ function PaymentAmountSummary({
|
|
|
32698
32694
|
isLoading,
|
|
32699
32695
|
testId: "payment-you-receive"
|
|
32700
32696
|
}
|
|
32701
|
-
), hasFinalizedToken && /* @__PURE__ */ React190.createElement(
|
|
32702
|
-
PaymentAmountSummaryItem,
|
|
32703
|
-
{
|
|
32704
|
-
label: receiveAmountLabel,
|
|
32705
|
-
paymentTokenAmount: finalizedTokenAmount * (1 + swapImpactPct / 100),
|
|
32706
|
-
valueSymbol: finalizedTokenSymbol ?? "",
|
|
32707
|
-
icon: /* @__PURE__ */ React190.createElement(
|
|
32708
|
-
FunAssetAvatar,
|
|
32709
|
-
{
|
|
32710
|
-
largeChainIcon: true,
|
|
32711
|
-
assetIconSize: "16",
|
|
32712
|
-
assetSrc: finalizedTokenIcon ?? void 0,
|
|
32713
|
-
chainId: areSameChains ? void 0 : targetChainId,
|
|
32714
|
-
prioritizeDefaults: false,
|
|
32715
|
-
assetName: "checkout-asset"
|
|
32716
|
-
}
|
|
32717
|
-
),
|
|
32718
|
-
paymentUsdAmount: uiCustomizations.confirmationScreen.showReceiveAmountUsd && receiveTokenUsdAmount ? receiveTokenUsdAmount : void 0,
|
|
32719
|
-
isLoading,
|
|
32720
|
-
testId: "payment-you-receive"
|
|
32721
|
-
}
|
|
32722
32697
|
));
|
|
32723
32698
|
}
|
|
32724
32699
|
function PaymentAmountSummaryItem({
|
|
@@ -32999,17 +32974,17 @@ import {
|
|
|
32999
32974
|
import { permitTypedData, reserve, supply } from "@aave/client/actions";
|
|
33000
32975
|
import { sendWith, signERC20PermitWith } from "@aave/client/viem";
|
|
33001
32976
|
import { DirectExecutionType as DirectExecutionType4, createDirectExecution } from "@funkit/api-base";
|
|
33002
|
-
import { useQuery as
|
|
32977
|
+
import { useQuery as useQuery22 } from "@tanstack/react-query";
|
|
33003
32978
|
import * as dnum8 from "dnum";
|
|
33004
32979
|
import { useCallback as useCallback36, useState as useState54 } from "react";
|
|
33005
32980
|
import { erc20Abi as erc20Abi6 } from "viem";
|
|
33006
32981
|
|
|
33007
32982
|
// src/utils/isMainnetUsdt.ts
|
|
33008
|
-
import { isTokenEquivalent as
|
|
32983
|
+
import { isTokenEquivalent as isTokenEquivalent9 } from "@funkit/utils";
|
|
33009
32984
|
import { mainnet as mainnet10 } from "viem/chains";
|
|
33010
32985
|
var USDT_MAINNET_ADDRESS = "0xdAC17F958D2ee523a2206206994597C13D831ec7";
|
|
33011
32986
|
function isMainnetUsdt(chainId2, address) {
|
|
33012
|
-
return
|
|
32987
|
+
return isTokenEquivalent9({
|
|
33013
32988
|
firstTokenAddress: address,
|
|
33014
32989
|
firstTokenChainId: chainId2.toString(),
|
|
33015
32990
|
secondTokenAddress: USDT_MAINNET_ADDRESS,
|
|
@@ -33238,7 +33213,7 @@ function useAaveTargetPoolAllowance(checkoutItem, owner) {
|
|
|
33238
33213
|
const targetAsset = config?.targetAsset;
|
|
33239
33214
|
const market = targetChainStr ? AAVE_MARKET_ADDRESS_BY_CHAIN[targetChainStr] : void 0;
|
|
33240
33215
|
const wagmiConfig = useConfig();
|
|
33241
|
-
const { data } =
|
|
33216
|
+
const { data } = useQuery22({
|
|
33242
33217
|
queryKey: [
|
|
33243
33218
|
"aaveTargetPoolAllowance",
|
|
33244
33219
|
targetChainStr,
|
|
@@ -33270,7 +33245,7 @@ function useAaveTargetReservePermit(checkoutItem) {
|
|
|
33270
33245
|
const targetChainStr = config?.targetChain;
|
|
33271
33246
|
const targetAsset = config?.targetAsset;
|
|
33272
33247
|
const market = targetChainStr ? AAVE_MARKET_ADDRESS_BY_CHAIN[targetChainStr] : void 0;
|
|
33273
|
-
const { data } =
|
|
33248
|
+
const { data } = useQuery22({
|
|
33274
33249
|
queryKey: [
|
|
33275
33250
|
"aaveReservePermitSupported",
|
|
33276
33251
|
targetChainStr,
|
|
@@ -33459,7 +33434,7 @@ function useAaveNativeSupply() {
|
|
|
33459
33434
|
// src/modals/CheckoutModal/InputAmount/useNadoDirectTransfer.ts
|
|
33460
33435
|
import { DirectExecutionType as DirectExecutionType5, createDirectExecution as createDirectExecution2 } from "@funkit/api-base";
|
|
33461
33436
|
import {
|
|
33462
|
-
isTokenEquivalent as
|
|
33437
|
+
isTokenEquivalent as isTokenEquivalent10
|
|
33463
33438
|
} from "@funkit/utils";
|
|
33464
33439
|
import { useCallback as useCallback37, useRef as useRef26, useState as useState55 } from "react";
|
|
33465
33440
|
import { erc20Abi as erc20Abi7 } from "viem";
|
|
@@ -33553,7 +33528,7 @@ function isNadoDirectTransferContext({
|
|
|
33553
33528
|
if (!isNadoCustomer(apiKey) || !checkoutConfig.customRecipient || !isXstockTarget) {
|
|
33554
33529
|
return false;
|
|
33555
33530
|
}
|
|
33556
|
-
const matchesTarget =
|
|
33531
|
+
const matchesTarget = isTokenEquivalent10({
|
|
33557
33532
|
firstTokenChainId: String(sourceAsset.chainId),
|
|
33558
33533
|
firstTokenAddress: sourceAsset.address,
|
|
33559
33534
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -33565,7 +33540,7 @@ function isNadoDirectTransferContext({
|
|
|
33565
33540
|
if (!wrappedTokenAddress) {
|
|
33566
33541
|
return false;
|
|
33567
33542
|
}
|
|
33568
|
-
return
|
|
33543
|
+
return isTokenEquivalent10({
|
|
33569
33544
|
firstTokenChainId: String(sourceAsset.chainId),
|
|
33570
33545
|
firstTokenAddress: sourceAsset.address,
|
|
33571
33546
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -33777,9 +33752,6 @@ var AnimatedDollarValue = forwardRef5((props, ref) => {
|
|
|
33777
33752
|
return /* @__PURE__ */ React195.createElement(NumberFlow2, { ...restProps, ref, value, format: formatOptions });
|
|
33778
33753
|
});
|
|
33779
33754
|
|
|
33780
|
-
// src/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.tsx
|
|
33781
|
-
import { formatCryptoAndStringify as formatCryptoAndStringify5 } from "@funkit/utils";
|
|
33782
|
-
|
|
33783
33755
|
// src/modals/CheckoutModal/ConfirmationStep/ConfirmationStepLoading.tsx
|
|
33784
33756
|
import React196 from "react";
|
|
33785
33757
|
import { createPortal as createPortal13 } from "react-dom";
|
|
@@ -33872,10 +33844,6 @@ function CheckoutPrimaryInfo({
|
|
|
33872
33844
|
const isStablecoin = useIsStablecoin();
|
|
33873
33845
|
const checkoutValueRaw = inputFiatAmount != null ? inputFiatAmount : displayAmounts?.confirmationScreenDisplayAmount ? Number.parseFloat(displayAmounts.confirmationScreenDisplayAmount) : isStablecoin(config.targetAssetTicker) ? config.targetAssetAmount : usdAmount;
|
|
33874
33846
|
const checkoutValue = checkoutValueRaw != null ? floorToDecimals(checkoutValueRaw, 2) : void 0;
|
|
33875
|
-
const { finalizedTokenAmount } = computeDisplayDestinationToken(
|
|
33876
|
-
config,
|
|
33877
|
-
config.targetAssetAmount || 0
|
|
33878
|
-
);
|
|
33879
33847
|
const doShowTokenAmount = showTokenAmount && !config.generateActionsParams;
|
|
33880
33848
|
return /* @__PURE__ */ React197.createElement(
|
|
33881
33849
|
Box,
|
|
@@ -33885,19 +33853,7 @@ function CheckoutPrimaryInfo({
|
|
|
33885
33853
|
alignItems: showLeftAlignedDollarValueWithLabel ? "flex-start" : "center",
|
|
33886
33854
|
justifyContent: "center"
|
|
33887
33855
|
},
|
|
33888
|
-
isLoading ? /* @__PURE__ */ React197.createElement(DollarValueSkeleton, null) :
|
|
33889
|
-
Text,
|
|
33890
|
-
{
|
|
33891
|
-
font: "inputAmount",
|
|
33892
|
-
size: "dollarValue",
|
|
33893
|
-
weight: "inputAmount",
|
|
33894
|
-
textAlign: showLeftAlignedDollarValueWithLabel ? "left" : "center"
|
|
33895
|
-
},
|
|
33896
|
-
showLeftAlignedDollarValueWithLabel && /* @__PURE__ */ React197.createElement("span", { style: { textTransform: "uppercase", whiteSpace: "pre" } }, t("common.deposit"), " "),
|
|
33897
|
-
formatCryptoAndStringify5(config.targetAssetAmount || 0),
|
|
33898
|
-
" ",
|
|
33899
|
-
config.targetAssetTicker
|
|
33900
|
-
) : checkoutValue ? /* @__PURE__ */ React197.createElement(
|
|
33856
|
+
isLoading ? /* @__PURE__ */ React197.createElement(DollarValueSkeleton, null) : checkoutValue ? /* @__PURE__ */ React197.createElement(
|
|
33901
33857
|
Box,
|
|
33902
33858
|
{
|
|
33903
33859
|
fontFamily: "inputAmount",
|
|
@@ -33928,10 +33884,7 @@ function CheckoutPrimaryInfo({
|
|
|
33928
33884
|
largeChainIcon: true,
|
|
33929
33885
|
prioritizeDefaults: false
|
|
33930
33886
|
}
|
|
33931
|
-
) : null, /* @__PURE__ */ React197.createElement(Text, { color: "tertiaryText", size: "14", weight: "medium" }, getCheckoutItemDisplay({
|
|
33932
|
-
checkoutConfig: config,
|
|
33933
|
-
overrideAmount: finalizedTokenAmount
|
|
33934
|
-
})))
|
|
33887
|
+
) : null, /* @__PURE__ */ React197.createElement(Text, { color: "tertiaryText", size: "14", weight: "medium" }, getCheckoutItemDisplay({ checkoutConfig: config })))
|
|
33935
33888
|
);
|
|
33936
33889
|
}
|
|
33937
33890
|
|
|
@@ -35055,12 +35008,6 @@ function ConfirmationStep({
|
|
|
35055
35008
|
const isQuoteLoading = isInitialQuoting || isQuoting;
|
|
35056
35009
|
const isStepLoading = isInitialQuoting || isContinuing || isRefreshing || aaveSupply.isPending || nadoDirectTransfer.isPending;
|
|
35057
35010
|
const customRecipient = checkoutItem?.initSettings.config.customRecipient;
|
|
35058
|
-
const hasFinalizedToken = Boolean(checkoutConfig?.finalizedToken);
|
|
35059
|
-
const isVaultDeposit = checkoutConfig && isVaultDepositCheckout(checkoutConfig, {
|
|
35060
|
-
chainId: checkoutItem.selectedSourceAssetInfo.chainId,
|
|
35061
|
-
tokenAddress: checkoutItem.selectedSourceAssetInfo.address || "0x"
|
|
35062
|
-
});
|
|
35063
|
-
const hidePrimaryInfo = hasFinalizedToken && !isVaultDeposit;
|
|
35064
35011
|
const displayAmounts = useMemo50(() => {
|
|
35065
35012
|
if (!latestQuote || !checkoutConfig?.targetAssetAmount) {
|
|
35066
35013
|
return null;
|
|
@@ -35085,10 +35032,10 @@ function ConfirmationStep({
|
|
|
35085
35032
|
const healthFactorInfo = resolveHealthFactor ? {
|
|
35086
35033
|
before: resolvedHealthFactor?.before ?? null,
|
|
35087
35034
|
after: resolvedHealthFactor?.after ?? null,
|
|
35088
|
-
isLoading:
|
|
35035
|
+
isLoading: isQuoteLoading
|
|
35089
35036
|
} : void 0;
|
|
35090
35037
|
const isExactIn = quoteBuilder.isExactIn();
|
|
35091
|
-
const hasStaticPrimaryInfoValue = isExactIn && checkoutItem?.inputFiatAmount != null || !isExactIn && !!checkoutConfig?.targetAssetAmount &&
|
|
35038
|
+
const hasStaticPrimaryInfoValue = isExactIn && checkoutItem?.inputFiatAmount != null || !isExactIn && !!checkoutConfig?.targetAssetAmount && isStablecoin(checkoutConfig.targetAssetTicker);
|
|
35092
35039
|
const checkoutId = checkoutItem?.id;
|
|
35093
35040
|
const isReady = !!checkoutItem?.finalDollarValue && !isQuoteLoading;
|
|
35094
35041
|
useEffect57(() => {
|
|
@@ -35145,7 +35092,7 @@ function ConfirmationStep({
|
|
|
35145
35092
|
gap: "confirmationStepVerticalGap",
|
|
35146
35093
|
paddingTop: "confirmationStepMarginTop"
|
|
35147
35094
|
},
|
|
35148
|
-
checkoutItem &&
|
|
35095
|
+
checkoutItem && /* @__PURE__ */ React202.createElement(
|
|
35149
35096
|
CheckoutPrimaryInfo,
|
|
35150
35097
|
{
|
|
35151
35098
|
showLeftAlignedDollarValueWithLabel,
|
|
@@ -35228,7 +35175,7 @@ import React217, { useEffect as useEffect60 } from "react";
|
|
|
35228
35175
|
|
|
35229
35176
|
// src/hooks/queries/useMeldCurrencies.ts
|
|
35230
35177
|
import { getMeldSupportedFiat } from "@funkit/api-base";
|
|
35231
|
-
import { useQuery as
|
|
35178
|
+
import { useQuery as useQuery23 } from "@tanstack/react-query";
|
|
35232
35179
|
var getPriority = (currencyCode) => {
|
|
35233
35180
|
if (currencyCode === "USD") {
|
|
35234
35181
|
return 0;
|
|
@@ -35240,7 +35187,7 @@ var getPriority = (currencyCode) => {
|
|
|
35240
35187
|
};
|
|
35241
35188
|
var useMeldCurrencies = (isEnabled = true) => {
|
|
35242
35189
|
const { apiKey } = useFunkitConfig();
|
|
35243
|
-
const query =
|
|
35190
|
+
const query = useQuery23({
|
|
35244
35191
|
queryKey: ["meld", "currencies"],
|
|
35245
35192
|
queryFn: async () => {
|
|
35246
35193
|
if (!apiKey) {
|
|
@@ -35266,12 +35213,12 @@ var useMeldCurrencies = (isEnabled = true) => {
|
|
|
35266
35213
|
|
|
35267
35214
|
// src/hooks/queries/useMeldDefaultCurrency.ts
|
|
35268
35215
|
import { getMeldDefaultFiat } from "@funkit/api-base";
|
|
35269
|
-
import { useQuery as
|
|
35216
|
+
import { useQuery as useQuery24 } from "@tanstack/react-query";
|
|
35270
35217
|
var useMeldDefaultCurrency = (paymentMethod) => {
|
|
35271
35218
|
const { apiKey } = useFunkitConfig();
|
|
35272
35219
|
const { userIpInfo } = useFunkitUserIp();
|
|
35273
35220
|
const enableMeld = useIsMeldEnabled();
|
|
35274
|
-
const query =
|
|
35221
|
+
const query = useQuery24({
|
|
35275
35222
|
queryKey: ["meld", "defaultCurrency", paymentMethod],
|
|
35276
35223
|
queryFn: async () => {
|
|
35277
35224
|
if (!apiKey) {
|
|
@@ -35297,7 +35244,7 @@ var useMeldDefaultCurrency = (paymentMethod) => {
|
|
|
35297
35244
|
// src/hooks/queries/useMeldLimits.ts
|
|
35298
35245
|
import { getMeldFiatLimits } from "@funkit/api-base";
|
|
35299
35246
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify8 } from "@funkit/utils";
|
|
35300
|
-
import { useQuery as
|
|
35247
|
+
import { useQuery as useQuery25 } from "@tanstack/react-query";
|
|
35301
35248
|
|
|
35302
35249
|
// src/consts/meld.ts
|
|
35303
35250
|
var MELD_MIN_LIMIT_BUFFER = 5;
|
|
@@ -35347,7 +35294,7 @@ var useMeldLimits = (isEnabled = true) => {
|
|
|
35347
35294
|
const { userIpInfo } = useFunkitUserIp();
|
|
35348
35295
|
const cryptoCurrency = useMeldCryptoCurrencyCode();
|
|
35349
35296
|
const countryCode = userIpInfo?.alpha2;
|
|
35350
|
-
const query =
|
|
35297
|
+
const query = useQuery25({
|
|
35351
35298
|
queryKey: ["meld", "limits", countryCode, cryptoCurrency],
|
|
35352
35299
|
queryFn: async () => {
|
|
35353
35300
|
if (!apiKey || !countryCode) {
|
|
@@ -35435,8 +35382,8 @@ var useMeldLimitError = (amount, fiatCurrency) => {
|
|
|
35435
35382
|
// src/modals/CheckoutModal/InputAmount/InputAmountLoaded.tsx
|
|
35436
35383
|
import { defaultDynamicConfigs as fallbackDynamicConfigs } from "@funkit/connect-core";
|
|
35437
35384
|
import {
|
|
35438
|
-
formatCryptoAndStringify as
|
|
35439
|
-
isTokenEquivalent as
|
|
35385
|
+
formatCryptoAndStringify as formatCryptoAndStringify5,
|
|
35386
|
+
isTokenEquivalent as isTokenEquivalent12,
|
|
35440
35387
|
round as round2
|
|
35441
35388
|
} from "@funkit/utils";
|
|
35442
35389
|
import * as dnum11 from "dnum";
|
|
@@ -36788,11 +36735,7 @@ function useTextMeasurer(inputRef) {
|
|
|
36788
36735
|
}
|
|
36789
36736
|
|
|
36790
36737
|
// src/modals/CheckoutModal/InputAmount/state.ts
|
|
36791
|
-
import {
|
|
36792
|
-
isTokenAddressEquivalent as isTokenAddressEquivalent3,
|
|
36793
|
-
isTokenEquivalent as isTokenEquivalent10,
|
|
36794
|
-
round
|
|
36795
|
-
} from "@funkit/utils";
|
|
36738
|
+
import { isEVMAddressEquivalent as isEVMAddressEquivalent4, isTokenEquivalent as isTokenEquivalent11, round } from "@funkit/utils";
|
|
36796
36739
|
import * as dnum10 from "dnum";
|
|
36797
36740
|
import { mainnet as mainnet11 } from "viem/chains";
|
|
36798
36741
|
function resolveUnitPrice(isExactIn, sourceHolding, targetUnitPrice) {
|
|
@@ -36965,7 +36908,7 @@ function isEffectivelySameAsset(checkoutConfig, sourceToken, apiKey) {
|
|
|
36965
36908
|
if (!sourceToken) {
|
|
36966
36909
|
return false;
|
|
36967
36910
|
}
|
|
36968
|
-
if (
|
|
36911
|
+
if (isTokenEquivalent11({
|
|
36969
36912
|
firstTokenChainId: sourceToken.chainId,
|
|
36970
36913
|
firstTokenAddress: sourceToken.address,
|
|
36971
36914
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -36974,9 +36917,9 @@ function isEffectivelySameAsset(checkoutConfig, sourceToken, apiKey) {
|
|
|
36974
36917
|
return true;
|
|
36975
36918
|
}
|
|
36976
36919
|
const mainnetChainId = mainnet11.id.toString();
|
|
36977
|
-
return isLighterxyzCustomer(apiKey) && sourceToken.chainId === mainnetChainId && isNativeTokenAddress(sourceToken.address) && checkoutConfig.targetChain === mainnetChainId &&
|
|
36978
|
-
|
|
36979
|
-
|
|
36920
|
+
return isLighterxyzCustomer(apiKey) && sourceToken.chainId === mainnetChainId && isNativeTokenAddress(sourceToken.address) && checkoutConfig.targetChain === mainnetChainId && isEVMAddressEquivalent4({
|
|
36921
|
+
firstAddress: checkoutConfig.targetAsset,
|
|
36922
|
+
secondAddress: WETH_MAINNET_ADDRESS
|
|
36980
36923
|
});
|
|
36981
36924
|
}
|
|
36982
36925
|
function resolveDefaultIsInputInFiat({
|
|
@@ -36991,7 +36934,7 @@ function resolveDefaultIsInputInFiat({
|
|
|
36991
36934
|
if (isLighterSpot(apiKey, checkoutConfig) && isEffectivelySameAsset(checkoutConfig, sourceToken, apiKey)) {
|
|
36992
36935
|
return false;
|
|
36993
36936
|
}
|
|
36994
|
-
return
|
|
36937
|
+
return true;
|
|
36995
36938
|
}
|
|
36996
36939
|
function initializeState({
|
|
36997
36940
|
checkoutConfig,
|
|
@@ -37015,7 +36958,6 @@ function initializeState({
|
|
|
37015
36958
|
}) {
|
|
37016
36959
|
const isExactIn = quoteBuilder.isExactIn();
|
|
37017
36960
|
const { targetAssetAmount, targetChain } = checkoutConfig;
|
|
37018
|
-
const hasFinalizedToken = !!checkoutConfig.finalizedToken;
|
|
37019
36961
|
const isInputInFiat = defaultIsInputInFiat ?? resolveDefaultIsInputInFiat({
|
|
37020
36962
|
checkoutConfig,
|
|
37021
36963
|
paymentMethodInfo,
|
|
@@ -37028,7 +36970,6 @@ function initializeState({
|
|
|
37028
36970
|
logger.info("initializeState:isInputInFiat", {
|
|
37029
36971
|
input: {
|
|
37030
36972
|
dynamicRoutingId: checkoutConfig.dynamicRoutingId,
|
|
37031
|
-
hasFinalizedToken,
|
|
37032
36973
|
hasPreservedValue: defaultIsInputInFiat !== void 0,
|
|
37033
36974
|
paymentMethod: paymentMethodInfo.paymentMethod
|
|
37034
36975
|
},
|
|
@@ -37158,8 +37099,7 @@ function initializeState({
|
|
|
37158
37099
|
usdAvailableAmount,
|
|
37159
37100
|
usdMaxAmount,
|
|
37160
37101
|
usdMinAmount,
|
|
37161
|
-
meldEnabled
|
|
37162
|
-
isVaultDeposit: !!hasFinalizedToken
|
|
37102
|
+
meldEnabled
|
|
37163
37103
|
};
|
|
37164
37104
|
logger.info("initializeState:result", { output: initialState2 });
|
|
37165
37105
|
return initialState2;
|
|
@@ -37329,13 +37269,11 @@ function getAmountInputError(state) {
|
|
|
37329
37269
|
};
|
|
37330
37270
|
}
|
|
37331
37271
|
}
|
|
37332
|
-
function getDerivedState(state,
|
|
37272
|
+
function getDerivedState(state, _targetAssetTicker) {
|
|
37333
37273
|
const { fiatCurrency, isInputInFiat, locale } = state;
|
|
37334
37274
|
const inputError = getAmountInputError(state);
|
|
37335
37275
|
const { decimalSeparator } = getNumberSeparators(locale);
|
|
37336
|
-
const currencyOptions = isInputInFiat ? getCurrencyFormattingOptions(fiatCurrency, locale) : {
|
|
37337
|
-
currencySymbolWithSpacing: state.isVaultDeposit ? ` ${targetAssetTicker}` : ""
|
|
37338
|
-
};
|
|
37276
|
+
const currencyOptions = isInputInFiat ? getCurrencyFormattingOptions(fiatCurrency, locale) : { currencySymbolWithSpacing: "" };
|
|
37339
37277
|
return {
|
|
37340
37278
|
...state,
|
|
37341
37279
|
// Latest request is to NOT limit the input to the currency's decimals - rather we reuse the maximum from assets
|
|
@@ -37344,8 +37282,8 @@ function getDerivedState(state, targetAssetTicker) {
|
|
|
37344
37282
|
inputError: inputError ?? null,
|
|
37345
37283
|
inputAffix: {
|
|
37346
37284
|
content: currencyOptions.currencySymbolWithSpacing,
|
|
37347
|
-
//
|
|
37348
|
-
type:
|
|
37285
|
+
// Fiat mode renders the currency symbol as a prefix.
|
|
37286
|
+
type: "prefix"
|
|
37349
37287
|
},
|
|
37350
37288
|
isValid: !inputError,
|
|
37351
37289
|
placeholder: "0",
|
|
@@ -37704,7 +37642,7 @@ import React214, { useCallback as useCallback45 } from "react";
|
|
|
37704
37642
|
import React213 from "react";
|
|
37705
37643
|
|
|
37706
37644
|
// src/components/MeldQuoteItem/MeldQuoteItem.tsx
|
|
37707
|
-
import { formatCryptoAndStringify as
|
|
37645
|
+
import { formatCryptoAndStringify as formatCryptoAndStringify4 } from "@funkit/utils";
|
|
37708
37646
|
import React212 from "react";
|
|
37709
37647
|
var providerLabelMap = {
|
|
37710
37648
|
COINBASEPAY: "Coinbase Pay",
|
|
@@ -37756,7 +37694,7 @@ var MeldQuoteItem = ({
|
|
|
37756
37694
|
}
|
|
37757
37695
|
const destinationCurrencyCode = quote.destinationCurrencyCode.split("_")[0] ?? quote.destinationCurrencyCode;
|
|
37758
37696
|
const cryptoDecimals = isStablecoin(destinationCurrencyCode) ? 2 : 5;
|
|
37759
|
-
const cryptoAmount =
|
|
37697
|
+
const cryptoAmount = formatCryptoAndStringify4(
|
|
37760
37698
|
quote.destinationAmount,
|
|
37761
37699
|
destinationCurrencyCode,
|
|
37762
37700
|
true,
|
|
@@ -37954,7 +37892,7 @@ var useMeldLink = (sourceAmount, sourceCurrencyCode = "USD") => {
|
|
|
37954
37892
|
|
|
37955
37893
|
// src/modals/CheckoutModal/MeldQuotes/useMeldQuotes.tsx
|
|
37956
37894
|
import { getMeldQuotes } from "@funkit/api-base";
|
|
37957
|
-
import { useQuery as
|
|
37895
|
+
import { useQuery as useQuery26 } from "@tanstack/react-query";
|
|
37958
37896
|
import { useDebounce as useDebounce2 } from "use-debounce";
|
|
37959
37897
|
var DEBOUNCE_DELAY = 500;
|
|
37960
37898
|
var COUNTDOWN_INTERVAL_SEC = 60;
|
|
@@ -37966,7 +37904,7 @@ var useMeldQuotes = (sourceAmount, fiatCurrency, meldEnabled = true) => {
|
|
|
37966
37904
|
const { isAway } = useUserPresence();
|
|
37967
37905
|
const destinationCurrencyCode = useMeldCryptoCurrencyCode();
|
|
37968
37906
|
const sourceCurrencyCode = fiatCurrency || "USD";
|
|
37969
|
-
const query =
|
|
37907
|
+
const query = useQuery26({
|
|
37970
37908
|
queryKey: [
|
|
37971
37909
|
"meld",
|
|
37972
37910
|
"quotes",
|
|
@@ -38423,8 +38361,7 @@ function useAmountInputUI({
|
|
|
38423
38361
|
onChange,
|
|
38424
38362
|
placeholder,
|
|
38425
38363
|
ref,
|
|
38426
|
-
toggleInputInFiat
|
|
38427
|
-
isVaultDeposit
|
|
38364
|
+
toggleInputInFiat
|
|
38428
38365
|
}, {
|
|
38429
38366
|
checkoutConfig,
|
|
38430
38367
|
meldEnabled,
|
|
@@ -38446,15 +38383,13 @@ function useAmountInputUI({
|
|
|
38446
38383
|
});
|
|
38447
38384
|
return () => cancelAnimationFrame(id);
|
|
38448
38385
|
}, []);
|
|
38449
|
-
const { targetAssetTicker
|
|
38386
|
+
const { targetAssetTicker } = checkoutConfig;
|
|
38450
38387
|
const handleIsAmountInAbsoluteToggle = () => {
|
|
38451
38388
|
if (isInputDisabled) {
|
|
38452
38389
|
return;
|
|
38453
38390
|
}
|
|
38454
38391
|
setIsLayoutAnimating(true);
|
|
38455
|
-
|
|
38456
|
-
toggleInputInFiat();
|
|
38457
|
-
}
|
|
38392
|
+
toggleInputInFiat();
|
|
38458
38393
|
};
|
|
38459
38394
|
const handleKeyDown = (event) => {
|
|
38460
38395
|
if (isInputDisabled) {
|
|
@@ -38631,18 +38566,7 @@ function useAmountInputUI({
|
|
|
38631
38566
|
fiatCurrency: fiatCurrency ?? "USD",
|
|
38632
38567
|
locale
|
|
38633
38568
|
});
|
|
38634
|
-
const
|
|
38635
|
-
let innerText = "";
|
|
38636
|
-
if (finalizedToken) {
|
|
38637
|
-
innerText = `${formatCryptoAndStringify7(switchAmount, switchSymbol)} \u2022 ${fiatDisplay}`;
|
|
38638
|
-
} else if (isInputInFiat) {
|
|
38639
|
-
innerText = formatCryptoAndStringify7(switchAmount, switchSymbol);
|
|
38640
|
-
} else {
|
|
38641
|
-
innerText = fiatDisplay;
|
|
38642
|
-
}
|
|
38643
|
-
return /* @__PURE__ */ React215.createElement(Text, { color: "secondaryText", size: "14" }, innerText);
|
|
38644
|
-
})();
|
|
38645
|
-
const amountInputSwitch = (isVaultDeposit || isConvertedAmountShown) && /* @__PURE__ */ React215.createElement(
|
|
38569
|
+
const amountInputSwitch = isConvertedAmountShown && /* @__PURE__ */ React215.createElement(
|
|
38646
38570
|
Box,
|
|
38647
38571
|
{
|
|
38648
38572
|
display: "flex",
|
|
@@ -38650,7 +38574,7 @@ function useAmountInputUI({
|
|
|
38650
38574
|
alignItems: "center",
|
|
38651
38575
|
paddingX: "8"
|
|
38652
38576
|
},
|
|
38653
|
-
|
|
38577
|
+
/* @__PURE__ */ React215.createElement(
|
|
38654
38578
|
FunIconButton,
|
|
38655
38579
|
{
|
|
38656
38580
|
icon: !meldEnabled && /* @__PURE__ */ React215.createElement(
|
|
@@ -38673,16 +38597,7 @@ function useAmountInputUI({
|
|
|
38673
38597
|
borderRadius: "inputAmountSwitcher",
|
|
38674
38598
|
isDisabled: meldEnabled || isInputDisabled
|
|
38675
38599
|
},
|
|
38676
|
-
/* @__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(
|
|
38677
|
-
motion13.div,
|
|
38678
|
-
{
|
|
38679
|
-
key: "asset",
|
|
38680
|
-
layoutId: "asset",
|
|
38681
|
-
...motionProps.switch
|
|
38682
|
-
},
|
|
38683
|
-
formatCryptoAndStringify7(switchAmount),
|
|
38684
|
-
/* @__PURE__ */ React215.createElement(Backdrop, null)
|
|
38685
|
-
), isInputInFiat && /* @__PURE__ */ React215.createElement(motion13.div, { key: "symbol", ...motionProps.symbol }, "\xA0", switchSymbol)))
|
|
38600
|
+
/* @__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)))
|
|
38686
38601
|
)
|
|
38687
38602
|
);
|
|
38688
38603
|
return {
|
|
@@ -38701,8 +38616,7 @@ function YouPayYouReceiveWrapper({
|
|
|
38701
38616
|
const {
|
|
38702
38617
|
targetAssetTicker,
|
|
38703
38618
|
targetAsset: targetAssetAddress,
|
|
38704
|
-
iconSrc: targetIconSrc
|
|
38705
|
-
finalizedToken
|
|
38619
|
+
iconSrc: targetIconSrc
|
|
38706
38620
|
} = checkoutConfig;
|
|
38707
38621
|
const { checkoutItem } = useCheckoutContext();
|
|
38708
38622
|
const sourceAssetInfo = checkoutItem?.selectedSourceAssetInfo;
|
|
@@ -38714,7 +38628,7 @@ function YouPayYouReceiveWrapper({
|
|
|
38714
38628
|
const showYouPayYouReceive = Boolean(
|
|
38715
38629
|
sourceAssetSymbol && sourceAssetIconSrc && targetAssetTicker && targetIconSrc
|
|
38716
38630
|
);
|
|
38717
|
-
const youPayYouReceiveShowYouPaySection = forceShowYouPaySection || !
|
|
38631
|
+
const youPayYouReceiveShowYouPaySection = forceShowYouPaySection || !isTokenEquivalent12({
|
|
38718
38632
|
firstTokenChainId: sourceAssetChainId?.toString() || "",
|
|
38719
38633
|
firstTokenAddress: sourceAssetAddress?.toString() || "",
|
|
38720
38634
|
secondTokenChainId: targetChainId,
|
|
@@ -38729,9 +38643,9 @@ function YouPayYouReceiveWrapper({
|
|
|
38729
38643
|
payTokenSymbol: sourceAssetSymbol ?? "",
|
|
38730
38644
|
payTokenIconSrc: sourceAssetIconSrc ?? "",
|
|
38731
38645
|
payTokenChainId: sourceAssetChainId,
|
|
38732
|
-
receiveTokenSymbol:
|
|
38733
|
-
receiveTokenIconSrc:
|
|
38734
|
-
receiveTokenChainId:
|
|
38646
|
+
receiveTokenSymbol: targetAssetTicker,
|
|
38647
|
+
receiveTokenIconSrc: targetIconSrc ?? "",
|
|
38648
|
+
receiveTokenChainId: targetChainId,
|
|
38735
38649
|
prioritizeDefaults: false,
|
|
38736
38650
|
isYouPayChainIconHidden: isChainIconHidden
|
|
38737
38651
|
}
|
|
@@ -38739,7 +38653,7 @@ function YouPayYouReceiveWrapper({
|
|
|
38739
38653
|
}
|
|
38740
38654
|
|
|
38741
38655
|
// src/modals/CheckoutModal/InputAmount/InputAmountLoading.tsx
|
|
38742
|
-
import { formatCryptoAndStringify as
|
|
38656
|
+
import { formatCryptoAndStringify as formatCryptoAndStringify6 } from "@funkit/utils";
|
|
38743
38657
|
import React216, { useMemo as useMemo54 } from "react";
|
|
38744
38658
|
function InputAmountLoading({
|
|
38745
38659
|
modalState,
|
|
@@ -38826,7 +38740,7 @@ function InputAmountLoading({
|
|
|
38826
38740
|
paddingX: "6",
|
|
38827
38741
|
color: { base: "secondaryText" }
|
|
38828
38742
|
},
|
|
38829
|
-
!isExactIn && targetAssetAmount !== void 0 ? /* @__PURE__ */ React216.createElement(Text, { color: "secondaryText", size: "14" },
|
|
38743
|
+
!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))
|
|
38830
38744
|
)
|
|
38831
38745
|
)
|
|
38832
38746
|
),
|
|
@@ -39180,7 +39094,7 @@ import {
|
|
|
39180
39094
|
getLightningQuote
|
|
39181
39095
|
} from "@funkit/api-base";
|
|
39182
39096
|
import { LIGHTNING_MAINNET_CHAIN_ID, bitcoinChain as bitcoinChain5 } from "@funkit/chains";
|
|
39183
|
-
import { keepPreviousData as keepPreviousData3, useQuery as
|
|
39097
|
+
import { keepPreviousData as keepPreviousData3, useQuery as useQuery27 } from "@tanstack/react-query";
|
|
39184
39098
|
import { useEffect as useEffect62, useRef as useRef31, useState as useState69 } from "react";
|
|
39185
39099
|
import { parseUnits as parseUnits3 } from "viem";
|
|
39186
39100
|
var QUOTE_REFRESH_LEAD_MS = 3e3;
|
|
@@ -39224,7 +39138,7 @@ var useLightningQuote = ({
|
|
|
39224
39138
|
}) => {
|
|
39225
39139
|
const { apiKey } = useFunkitConfig();
|
|
39226
39140
|
const enabled = !!depositAddr && !!targetChain && !!targetAsset && !!walletAddress && !!fiatAmount;
|
|
39227
|
-
const query =
|
|
39141
|
+
const query = useQuery27({
|
|
39228
39142
|
queryKey: [
|
|
39229
39143
|
"lightning-quote",
|
|
39230
39144
|
depositAddr,
|
|
@@ -39634,14 +39548,14 @@ function LightningInvoice(_props) {
|
|
|
39634
39548
|
}
|
|
39635
39549
|
|
|
39636
39550
|
// src/modals/CheckoutModal/LoadingAccount.tsx
|
|
39637
|
-
import
|
|
39551
|
+
import React231, { useEffect as useEffect64 } from "react";
|
|
39638
39552
|
|
|
39639
39553
|
// src/components/FunAsset/FunAssetLoading.tsx
|
|
39640
39554
|
import React224 from "react";
|
|
39641
39555
|
|
|
39642
39556
|
// src/components/FunAsset/FunAssetItem.tsx
|
|
39643
39557
|
import {
|
|
39644
|
-
formatCryptoAndStringify as
|
|
39558
|
+
formatCryptoAndStringify as formatCryptoAndStringify7,
|
|
39645
39559
|
formatCurrencyAndStringify as formatCurrencyAndStringify10,
|
|
39646
39560
|
isNotNullish as isNotNullish6
|
|
39647
39561
|
} from "@funkit/utils";
|
|
@@ -39738,7 +39652,7 @@ var FunAssetItem = ({
|
|
|
39738
39652
|
size: "selectAssetItemSubtitle",
|
|
39739
39653
|
weight: "selectAssetItemSubtitle"
|
|
39740
39654
|
},
|
|
39741
|
-
isNotNullish6(asset.amount) ? /* @__PURE__ */ React223.createElement("div", null,
|
|
39655
|
+
isNotNullish6(asset.amount) ? /* @__PURE__ */ React223.createElement("div", null, formatCryptoAndStringify7(asset.amount), isSecondaryTokenSymbolVisible && ` ${asset.symbol}`) : null
|
|
39742
39656
|
)
|
|
39743
39657
|
)
|
|
39744
39658
|
),
|
|
@@ -39824,7 +39738,7 @@ function FunAssetLoading({ count = 3 }) {
|
|
|
39824
39738
|
}
|
|
39825
39739
|
|
|
39826
39740
|
// src/modals/CheckoutModal/SourceChange/SourceChangeLoading.tsx
|
|
39827
|
-
import
|
|
39741
|
+
import React230 from "react";
|
|
39828
39742
|
import { createPortal as createPortal17 } from "react-dom";
|
|
39829
39743
|
|
|
39830
39744
|
// src/components/CheckoutTopAnnouncementBanner/CheckoutTopAnnouncementBanner.tsx
|
|
@@ -39898,7 +39812,7 @@ function usePaymentMethodTabs() {
|
|
|
39898
39812
|
}
|
|
39899
39813
|
|
|
39900
39814
|
// src/modals/CheckoutModal/SourceChange/CryptoCashToggle.tsx
|
|
39901
|
-
import
|
|
39815
|
+
import React229 from "react";
|
|
39902
39816
|
|
|
39903
39817
|
// src/components/Icons/New/ArrowCircleUpRightIcon.tsx
|
|
39904
39818
|
import React226 from "react";
|
|
@@ -39924,48 +39838,10 @@ var ArrowCircleUpRightIcon = ({ size = 16 }) => {
|
|
|
39924
39838
|
);
|
|
39925
39839
|
};
|
|
39926
39840
|
|
|
39927
|
-
// src/components/Icons/New/CircleBitcoinIcon.tsx
|
|
39928
|
-
import React227 from "react";
|
|
39929
|
-
var CircleBitcoinIcon = ({ size = 12 }) => {
|
|
39930
|
-
return /* @__PURE__ */ React227.createElement(
|
|
39931
|
-
"svg",
|
|
39932
|
-
{
|
|
39933
|
-
width: size,
|
|
39934
|
-
height: size,
|
|
39935
|
-
viewBox: "0 0 20 20",
|
|
39936
|
-
fill: "none",
|
|
39937
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
39938
|
-
},
|
|
39939
|
-
/* @__PURE__ */ React227.createElement(
|
|
39940
|
-
"path",
|
|
39941
|
-
{
|
|
39942
|
-
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",
|
|
39943
|
-
fill: "currentColor"
|
|
39944
|
-
}
|
|
39945
|
-
),
|
|
39946
|
-
/* @__PURE__ */ React227.createElement(
|
|
39947
|
-
"path",
|
|
39948
|
-
{
|
|
39949
|
-
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",
|
|
39950
|
-
fill: "currentColor"
|
|
39951
|
-
}
|
|
39952
|
-
),
|
|
39953
|
-
/* @__PURE__ */ React227.createElement(
|
|
39954
|
-
"path",
|
|
39955
|
-
{
|
|
39956
|
-
fillRule: "evenodd",
|
|
39957
|
-
clipRule: "evenodd",
|
|
39958
|
-
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",
|
|
39959
|
-
fill: "currentColor"
|
|
39960
|
-
}
|
|
39961
|
-
)
|
|
39962
|
-
);
|
|
39963
|
-
};
|
|
39964
|
-
|
|
39965
39841
|
// src/components/Icons/New/DollarIcon.tsx
|
|
39966
|
-
import
|
|
39842
|
+
import React227 from "react";
|
|
39967
39843
|
var DollarIcon = ({ size = 12 }) => {
|
|
39968
|
-
return /* @__PURE__ */
|
|
39844
|
+
return /* @__PURE__ */ React227.createElement(
|
|
39969
39845
|
"svg",
|
|
39970
39846
|
{
|
|
39971
39847
|
width: size,
|
|
@@ -39974,7 +39850,7 @@ var DollarIcon = ({ size = 12 }) => {
|
|
|
39974
39850
|
fill: "none",
|
|
39975
39851
|
xmlns: "http://www.w3.org/2000/svg"
|
|
39976
39852
|
},
|
|
39977
|
-
/* @__PURE__ */
|
|
39853
|
+
/* @__PURE__ */ React227.createElement(
|
|
39978
39854
|
"path",
|
|
39979
39855
|
{
|
|
39980
39856
|
fillRule: "evenodd",
|
|
@@ -39988,7 +39864,7 @@ var DollarIcon = ({ size = 12 }) => {
|
|
|
39988
39864
|
|
|
39989
39865
|
// src/components/Tabs/Tabs.tsx
|
|
39990
39866
|
import { motion as motion15 } from "motion/react";
|
|
39991
|
-
import
|
|
39867
|
+
import React228 from "react";
|
|
39992
39868
|
|
|
39993
39869
|
// src/components/Tabs/tabs.css.ts
|
|
39994
39870
|
var baseTabStyle = "eghi2t9 _1rsrm2f11a _1rsrm2ft";
|
|
@@ -40011,7 +39887,7 @@ var Tabs = ({
|
|
|
40011
39887
|
inactiveTabProps,
|
|
40012
39888
|
containerStyles
|
|
40013
39889
|
}) => {
|
|
40014
|
-
return /* @__PURE__ */
|
|
39890
|
+
return /* @__PURE__ */ React228.createElement(
|
|
40015
39891
|
Box,
|
|
40016
39892
|
{
|
|
40017
39893
|
display: "flex",
|
|
@@ -40023,7 +39899,7 @@ var Tabs = ({
|
|
|
40023
39899
|
},
|
|
40024
39900
|
tabs2.map((tab, index) => {
|
|
40025
39901
|
const isSelected = index === activeTab;
|
|
40026
|
-
return /* @__PURE__ */
|
|
39902
|
+
return /* @__PURE__ */ React228.createElement(
|
|
40027
39903
|
Box,
|
|
40028
39904
|
{
|
|
40029
39905
|
key: tab.value,
|
|
@@ -40045,7 +39921,7 @@ var Tabs = ({
|
|
|
40045
39921
|
focusedVisible: "inactiveTabHover"
|
|
40046
39922
|
}
|
|
40047
39923
|
},
|
|
40048
|
-
isSelected ? /* @__PURE__ */
|
|
39924
|
+
isSelected ? /* @__PURE__ */ React228.createElement(
|
|
40049
39925
|
motion15.div,
|
|
40050
39926
|
{
|
|
40051
39927
|
layoutId: disabled ? void 0 : "highlight",
|
|
@@ -40053,7 +39929,7 @@ var Tabs = ({
|
|
|
40053
39929
|
style: { ...activeTabStyles, zIndex: 1 },
|
|
40054
39930
|
transition: { duration: 0.15, ease: [0.25, 0.1, 0.25, 1] }
|
|
40055
39931
|
}
|
|
40056
|
-
) : /* @__PURE__ */
|
|
39932
|
+
) : /* @__PURE__ */ React228.createElement(
|
|
40057
39933
|
Box,
|
|
40058
39934
|
{
|
|
40059
39935
|
className: baseTabStyle,
|
|
@@ -40064,7 +39940,7 @@ var Tabs = ({
|
|
|
40064
39940
|
...inactiveTabProps
|
|
40065
39941
|
}
|
|
40066
39942
|
),
|
|
40067
|
-
/* @__PURE__ */
|
|
39943
|
+
/* @__PURE__ */ React228.createElement(
|
|
40068
39944
|
Box,
|
|
40069
39945
|
{
|
|
40070
39946
|
display: "flex",
|
|
@@ -40075,7 +39951,7 @@ var Tabs = ({
|
|
|
40075
39951
|
style: { zIndex: 1, pointerEvents: "none" }
|
|
40076
39952
|
},
|
|
40077
39953
|
tab.icon,
|
|
40078
|
-
/* @__PURE__ */
|
|
39954
|
+
/* @__PURE__ */ React228.createElement(Text, { color: "inherit", weight: fontWeight, size: fontSize }, tab.label)
|
|
40079
39955
|
)
|
|
40080
39956
|
);
|
|
40081
39957
|
})
|
|
@@ -40102,17 +39978,17 @@ var CryptoCashToggle = ({
|
|
|
40102
39978
|
crypto: {
|
|
40103
39979
|
label: t("sourceChange.useCrypto"),
|
|
40104
39980
|
value: "crypto",
|
|
40105
|
-
icon: /* @__PURE__ */
|
|
39981
|
+
icon: /* @__PURE__ */ React229.createElement(CryptoTabIcon, { size: tabIconSize })
|
|
40106
39982
|
},
|
|
40107
39983
|
fiat: {
|
|
40108
39984
|
label: t("sourceChange.useCash"),
|
|
40109
39985
|
value: "fiat",
|
|
40110
|
-
icon: /* @__PURE__ */
|
|
39986
|
+
icon: /* @__PURE__ */ React229.createElement(FiatTabIcon, { size: tabIconSize })
|
|
40111
39987
|
},
|
|
40112
39988
|
withdraw: {
|
|
40113
39989
|
label: t("withdrawal.withdraw"),
|
|
40114
39990
|
value: "withdraw",
|
|
40115
|
-
icon: /* @__PURE__ */
|
|
39991
|
+
icon: /* @__PURE__ */ React229.createElement(ArrowCircleUpRightIcon, { size: tabIconSize })
|
|
40116
39992
|
}
|
|
40117
39993
|
};
|
|
40118
39994
|
const tabs2 = tabTypes?.map((type) => tabDefinitions[type]);
|
|
@@ -40123,7 +39999,7 @@ var CryptoCashToggle = ({
|
|
|
40123
39999
|
onTabChange(tab.value);
|
|
40124
40000
|
}
|
|
40125
40001
|
};
|
|
40126
|
-
return /* @__PURE__ */
|
|
40002
|
+
return /* @__PURE__ */ React229.createElement(Box, { marginTop, marginBottom, style }, /* @__PURE__ */ React229.createElement(
|
|
40127
40003
|
Tabs,
|
|
40128
40004
|
{
|
|
40129
40005
|
tabs: tabs2,
|
|
@@ -40203,16 +40079,16 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40203
40079
|
const bottomSectionRef = useBottomSectionRef();
|
|
40204
40080
|
const showTagline = useDynamicConfig("showpoweredtagline");
|
|
40205
40081
|
const hasBottomBar = bottomBarCloseButtonConfig.enabled || showTagline;
|
|
40206
|
-
return /* @__PURE__ */
|
|
40082
|
+
return /* @__PURE__ */ React230.createElement(Box, { id: "source-change-page" }, /* @__PURE__ */ React230.createElement(
|
|
40207
40083
|
Box,
|
|
40208
40084
|
{
|
|
40209
40085
|
className: paymentMethodStaticArea,
|
|
40210
40086
|
display: "flex",
|
|
40211
40087
|
flexDirection: "column"
|
|
40212
40088
|
},
|
|
40213
|
-
/* @__PURE__ */
|
|
40089
|
+
/* @__PURE__ */ React230.createElement(CheckoutTopAnnouncementBanner, null),
|
|
40214
40090
|
customTopComponent?.(),
|
|
40215
|
-
isTargetAssetSelectable && /* @__PURE__ */
|
|
40091
|
+
isTargetAssetSelectable && /* @__PURE__ */ React230.createElement(
|
|
40216
40092
|
Box,
|
|
40217
40093
|
{
|
|
40218
40094
|
paddingY: "dropdownActiveItemRegularSizePaddingY",
|
|
@@ -40225,10 +40101,10 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40225
40101
|
borderColor: "dropdownActiveItemBorderBase",
|
|
40226
40102
|
borderRadius: "dropdown"
|
|
40227
40103
|
},
|
|
40228
|
-
/* @__PURE__ */
|
|
40229
|
-
/* @__PURE__ */
|
|
40104
|
+
/* @__PURE__ */ React230.createElement(FunSkeletonBlock, { fontSize: "14", width: "96" }),
|
|
40105
|
+
/* @__PURE__ */ React230.createElement(FunSkeletonBlock, { fontSize: "14", width: "72" })
|
|
40230
40106
|
)
|
|
40231
|
-
), showContentDivider && /* @__PURE__ */
|
|
40107
|
+
), showContentDivider && /* @__PURE__ */ React230.createElement(
|
|
40232
40108
|
FunDivider,
|
|
40233
40109
|
{
|
|
40234
40110
|
marginTop: "16",
|
|
@@ -40236,7 +40112,7 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40236
40112
|
borderColor: "lightStroke",
|
|
40237
40113
|
className: fullWidthContentDivider
|
|
40238
40114
|
}
|
|
40239
|
-
), isSwappedEnabled ? /* @__PURE__ */
|
|
40115
|
+
), isSwappedEnabled ? /* @__PURE__ */ React230.createElement(
|
|
40240
40116
|
Box,
|
|
40241
40117
|
{
|
|
40242
40118
|
display: "flex",
|
|
@@ -40244,7 +40120,7 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40244
40120
|
className: paymentMethodStaticArea,
|
|
40245
40121
|
paddingBottom: hasBottomBar ? void 0 : "modalPaddingBottomLower"
|
|
40246
40122
|
},
|
|
40247
|
-
/* @__PURE__ */
|
|
40123
|
+
/* @__PURE__ */ React230.createElement(
|
|
40248
40124
|
CryptoCashToggle,
|
|
40249
40125
|
{
|
|
40250
40126
|
disabled: true,
|
|
@@ -40255,8 +40131,8 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40255
40131
|
tabs: tabOrder
|
|
40256
40132
|
}
|
|
40257
40133
|
),
|
|
40258
|
-
enableSourceGroupLabels ? /* @__PURE__ */
|
|
40259
|
-
) : /* @__PURE__ */
|
|
40134
|
+
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 }))
|
|
40135
|
+
) : /* @__PURE__ */ React230.createElement(
|
|
40260
40136
|
Box,
|
|
40261
40137
|
{
|
|
40262
40138
|
display: "flex",
|
|
@@ -40265,8 +40141,8 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40265
40141
|
paddingBottom: hasBottomBar ? void 0 : "modalPaddingBottomLower",
|
|
40266
40142
|
gap: "4"
|
|
40267
40143
|
},
|
|
40268
|
-
/* @__PURE__ */
|
|
40269
|
-
/* @__PURE__ */
|
|
40144
|
+
/* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItems, { count: 1 }),
|
|
40145
|
+
/* @__PURE__ */ React230.createElement(
|
|
40270
40146
|
FunDivider,
|
|
40271
40147
|
{
|
|
40272
40148
|
marginTop: "8",
|
|
@@ -40274,9 +40150,9 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40274
40150
|
borderColor: "selectedOptionBorder"
|
|
40275
40151
|
}
|
|
40276
40152
|
),
|
|
40277
|
-
/* @__PURE__ */
|
|
40153
|
+
/* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItems, { count: numPaymentMethods - 1 })
|
|
40278
40154
|
), bottomSectionRef && createPortal17(
|
|
40279
|
-
/* @__PURE__ */
|
|
40155
|
+
/* @__PURE__ */ React230.createElement(
|
|
40280
40156
|
Dialog.BottomBar,
|
|
40281
40157
|
{
|
|
40282
40158
|
onCloseLabel: t(bottomBarCloseButtonConfig.labelKey),
|
|
@@ -40287,7 +40163,7 @@ function SourceChangeLoading({ onClose }) {
|
|
|
40287
40163
|
));
|
|
40288
40164
|
}
|
|
40289
40165
|
function LoadingFunPaymentMethodItems({ count }) {
|
|
40290
|
-
return /* @__PURE__ */
|
|
40166
|
+
return /* @__PURE__ */ React230.createElement(React230.Fragment, null, Array.from({ length: count }).map((_, index) => /* @__PURE__ */ React230.createElement(LoadingFunPaymentMethodItem, { key: index })));
|
|
40291
40167
|
}
|
|
40292
40168
|
|
|
40293
40169
|
// src/modals/CheckoutModal/LoadingAccount.tsx
|
|
@@ -40468,12 +40344,12 @@ function LoadingAccount({
|
|
|
40468
40344
|
checkoutConfig,
|
|
40469
40345
|
userInfo.isConnected
|
|
40470
40346
|
]);
|
|
40471
|
-
return startsOnConfirmationStep ? /* @__PURE__ */
|
|
40347
|
+
return startsOnConfirmationStep ? /* @__PURE__ */ React231.createElement(ConfirmationStepLoading, null) : startsOnSelectAssetStep ? /* @__PURE__ */ React231.createElement(FunAssetLoading, { count: 5 }) : /* @__PURE__ */ React231.createElement(SourceChangeLoading, { onClose });
|
|
40472
40348
|
}
|
|
40473
40349
|
|
|
40474
40350
|
// src/modals/CheckoutModal/MeldCurrencySelect/MeldCurrencySelect.tsx
|
|
40475
40351
|
import clsx21 from "clsx";
|
|
40476
|
-
import
|
|
40352
|
+
import React232, { useMemo as useMemo58, useState as useState70 } from "react";
|
|
40477
40353
|
|
|
40478
40354
|
// src/modals/CheckoutModal/MeldCurrencySelect/currenciesWithMultipleCountries.ts
|
|
40479
40355
|
var currenciesWithMultipleCountries = {
|
|
@@ -40553,7 +40429,7 @@ function MeldCurrencySelect({
|
|
|
40553
40429
|
navigateToHistoryStep: true
|
|
40554
40430
|
});
|
|
40555
40431
|
};
|
|
40556
|
-
return /* @__PURE__ */
|
|
40432
|
+
return /* @__PURE__ */ React232.createElement(Box, { display: "flex", flexDirection: "column", gap: "8" }, /* @__PURE__ */ React232.createElement(
|
|
40557
40433
|
FunInput,
|
|
40558
40434
|
{
|
|
40559
40435
|
placeholder: t("meldCurrencySelect.searchCurrency"),
|
|
@@ -40561,7 +40437,7 @@ function MeldCurrencySelect({
|
|
|
40561
40437
|
onChange: handleSearch,
|
|
40562
40438
|
prefixIcon: "SearchIcon"
|
|
40563
40439
|
}
|
|
40564
|
-
), /* @__PURE__ */
|
|
40440
|
+
), /* @__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(
|
|
40565
40441
|
Box,
|
|
40566
40442
|
{
|
|
40567
40443
|
className: clsx21(hideScrollBar, selectWrapperStyle),
|
|
@@ -40573,7 +40449,7 @@ function MeldCurrencySelect({
|
|
|
40573
40449
|
},
|
|
40574
40450
|
filteredOptions.map((optionItem) => {
|
|
40575
40451
|
const isActive = selectedCurrency === optionItem.currencyCode;
|
|
40576
|
-
return /* @__PURE__ */
|
|
40452
|
+
return /* @__PURE__ */ React232.createElement(
|
|
40577
40453
|
FunOptionBox,
|
|
40578
40454
|
{
|
|
40579
40455
|
key: optionItem.currencyCode,
|
|
@@ -40582,15 +40458,15 @@ function MeldCurrencySelect({
|
|
|
40582
40458
|
paddingY: "10",
|
|
40583
40459
|
boxShadow: isActive ? "selectedDropdownItem" : void 0
|
|
40584
40460
|
},
|
|
40585
|
-
/* @__PURE__ */
|
|
40586
|
-
isActive && /* @__PURE__ */
|
|
40461
|
+
/* @__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)})`)),
|
|
40462
|
+
isActive && /* @__PURE__ */ React232.createElement(CheckIcon, null)
|
|
40587
40463
|
);
|
|
40588
40464
|
})
|
|
40589
40465
|
)));
|
|
40590
40466
|
}
|
|
40591
40467
|
|
|
40592
40468
|
// src/modals/CheckoutModal/MeldQuotes/MeldQuotes.tsx
|
|
40593
|
-
import
|
|
40469
|
+
import React233 from "react";
|
|
40594
40470
|
import { createPortal as createPortal18 } from "react-dom";
|
|
40595
40471
|
var MeldQuotesInfo = {
|
|
40596
40472
|
Component: MeldQuotes,
|
|
@@ -40625,10 +40501,10 @@ function MeldQuotes({
|
|
|
40625
40501
|
const { query, countdown } = useMeldQuotes(fiatAmount, fiatCurrency, true);
|
|
40626
40502
|
const titleCountdownRef = useTitleCountdownRef();
|
|
40627
40503
|
if (query.isPending) {
|
|
40628
|
-
return /* @__PURE__ */
|
|
40504
|
+
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 })));
|
|
40629
40505
|
}
|
|
40630
|
-
return /* @__PURE__ */
|
|
40631
|
-
return /* @__PURE__ */
|
|
40506
|
+
return /* @__PURE__ */ React233.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, query.data?.map((quote) => {
|
|
40507
|
+
return /* @__PURE__ */ React233.createElement(
|
|
40632
40508
|
MeldQuoteItem,
|
|
40633
40509
|
{
|
|
40634
40510
|
key: quote.serviceProvider,
|
|
@@ -40643,7 +40519,7 @@ function MeldQuotes({
|
|
|
40643
40519
|
|
|
40644
40520
|
// src/modals/CheckoutModal/MeldRedirect/MeldRedirect.tsx
|
|
40645
40521
|
import { FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO as FUNKIT_CONNECT_SUPPORTED_CHAINS_INFO10 } from "@funkit/chains";
|
|
40646
|
-
import
|
|
40522
|
+
import React234 from "react";
|
|
40647
40523
|
var MeldRedirectInfo = {
|
|
40648
40524
|
Component: MeldRedirect,
|
|
40649
40525
|
onNext: () => {
|
|
@@ -40677,7 +40553,7 @@ function MeldRedirect({
|
|
|
40677
40553
|
);
|
|
40678
40554
|
return entry?.[0];
|
|
40679
40555
|
};
|
|
40680
|
-
return /* @__PURE__ */
|
|
40556
|
+
return /* @__PURE__ */ React234.createElement(
|
|
40681
40557
|
Box,
|
|
40682
40558
|
{
|
|
40683
40559
|
display: "flex",
|
|
@@ -40686,7 +40562,7 @@ function MeldRedirect({
|
|
|
40686
40562
|
gap: "24",
|
|
40687
40563
|
marginTop: "8"
|
|
40688
40564
|
},
|
|
40689
|
-
quote?.serviceProvider && /* @__PURE__ */
|
|
40565
|
+
quote?.serviceProvider && /* @__PURE__ */ React234.createElement(
|
|
40690
40566
|
AsyncImage,
|
|
40691
40567
|
{
|
|
40692
40568
|
width: "48",
|
|
@@ -40697,7 +40573,7 @@ function MeldRedirect({
|
|
|
40697
40573
|
borderRadius: "full"
|
|
40698
40574
|
}
|
|
40699
40575
|
),
|
|
40700
|
-
/* @__PURE__ */
|
|
40576
|
+
/* @__PURE__ */ React234.createElement(
|
|
40701
40577
|
Box,
|
|
40702
40578
|
{
|
|
40703
40579
|
display: "flex",
|
|
@@ -40706,10 +40582,10 @@ function MeldRedirect({
|
|
|
40706
40582
|
textAlign: "center",
|
|
40707
40583
|
gap: "8"
|
|
40708
40584
|
},
|
|
40709
|
-
/* @__PURE__ */
|
|
40710
|
-
/* @__PURE__ */
|
|
40585
|
+
/* @__PURE__ */ React234.createElement(Text, { size: "16" }, t("meldRedirect.completeTransactionWith", { providerLabel })),
|
|
40586
|
+
/* @__PURE__ */ React234.createElement(Text, { size: "12" }, t("meldRedirect.canCloseModal"))
|
|
40711
40587
|
),
|
|
40712
|
-
/* @__PURE__ */
|
|
40588
|
+
/* @__PURE__ */ React234.createElement(
|
|
40713
40589
|
YouPayYouReceive,
|
|
40714
40590
|
{
|
|
40715
40591
|
payLabel: t("meldRedirect.youBuy"),
|
|
@@ -40723,14 +40599,14 @@ function MeldRedirect({
|
|
|
40723
40599
|
showFiatCurrencySection: true
|
|
40724
40600
|
}
|
|
40725
40601
|
),
|
|
40726
|
-
/* @__PURE__ */
|
|
40602
|
+
/* @__PURE__ */ React234.createElement(FunAlert, { description: t("meldRedirect.intentAddressWarning") })
|
|
40727
40603
|
);
|
|
40728
40604
|
}
|
|
40729
40605
|
|
|
40730
40606
|
// src/modals/CheckoutModal/SelectAsset/SelectAsset.tsx
|
|
40731
40607
|
import { etherealChain, hyperEvmChain as hyperEvmChain3 } from "@funkit/chains";
|
|
40732
|
-
import { isTokenEquivalent as
|
|
40733
|
-
import
|
|
40608
|
+
import { isTokenEquivalent as isTokenEquivalent13 } from "@funkit/utils";
|
|
40609
|
+
import React238, {
|
|
40734
40610
|
useEffect as useEffect65,
|
|
40735
40611
|
useLayoutEffect as useLayoutEffect2,
|
|
40736
40612
|
useMemo as useMemo60,
|
|
@@ -40767,17 +40643,17 @@ var useDynamicRoutes = (_dynamicRoutingId) => {
|
|
|
40767
40643
|
|
|
40768
40644
|
// src/modals/CheckoutModal/SelectAsset/SelectAssetInfoSection.tsx
|
|
40769
40645
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify11 } from "@funkit/utils";
|
|
40770
|
-
import
|
|
40646
|
+
import React236 from "react";
|
|
40771
40647
|
|
|
40772
40648
|
// src/components/NewTokenDepositAlert/NewTokenDepositAlert.tsx
|
|
40773
|
-
import
|
|
40649
|
+
import React235 from "react";
|
|
40774
40650
|
import { Trans as Trans17 } from "react-i18next";
|
|
40775
40651
|
var FunLinkButtonComponent2 = ({
|
|
40776
40652
|
children,
|
|
40777
40653
|
onClick,
|
|
40778
40654
|
weight
|
|
40779
40655
|
}) => {
|
|
40780
|
-
return /* @__PURE__ */
|
|
40656
|
+
return /* @__PURE__ */ React235.createElement(
|
|
40781
40657
|
FunLinkButton,
|
|
40782
40658
|
{
|
|
40783
40659
|
inline: true,
|
|
@@ -40796,19 +40672,19 @@ var NewTokenDepositAlert = ({
|
|
|
40796
40672
|
if (!alertData || !isTokenTransferEnabled) {
|
|
40797
40673
|
return null;
|
|
40798
40674
|
}
|
|
40799
|
-
return /* @__PURE__ */
|
|
40675
|
+
return /* @__PURE__ */ React235.createElement(
|
|
40800
40676
|
FunAlert,
|
|
40801
40677
|
{
|
|
40802
|
-
icon: /* @__PURE__ */
|
|
40678
|
+
icon: /* @__PURE__ */ React235.createElement(NewTokenBadge, { iconSymbol: alertData.symbol }),
|
|
40803
40679
|
paddingX: "8",
|
|
40804
|
-
description: /* @__PURE__ */
|
|
40680
|
+
description: /* @__PURE__ */ React235.createElement(
|
|
40805
40681
|
Trans17,
|
|
40806
40682
|
{
|
|
40807
40683
|
t,
|
|
40808
40684
|
i18nKey: "common.depositsLiveTryNow",
|
|
40809
40685
|
values: { tokenName: alertData.name },
|
|
40810
40686
|
components: {
|
|
40811
|
-
TryNowLink: /* @__PURE__ */
|
|
40687
|
+
TryNowLink: /* @__PURE__ */ React235.createElement(
|
|
40812
40688
|
FunLinkButtonComponent2,
|
|
40813
40689
|
{
|
|
40814
40690
|
weight: "regular",
|
|
@@ -40835,9 +40711,9 @@ var SelectAssetInfoSection = ({
|
|
|
40835
40711
|
}) => {
|
|
40836
40712
|
const label = usePaymentMethodInfoLabel(paymentMethodInfo, 16);
|
|
40837
40713
|
if (!isSourceNavWidgetEnabled) {
|
|
40838
|
-
return /* @__PURE__ */
|
|
40714
|
+
return /* @__PURE__ */ React236.createElement(NewTokenDepositAlert, { onClick: onTokenTransfer });
|
|
40839
40715
|
}
|
|
40840
|
-
return /* @__PURE__ */
|
|
40716
|
+
return /* @__PURE__ */ React236.createElement(Box, { display: "flex", gap: "8", flexDirection: "column" }, /* @__PURE__ */ React236.createElement(
|
|
40841
40717
|
SourcePaymentMethodItem,
|
|
40842
40718
|
{
|
|
40843
40719
|
type: paymentMethodInfo.paymentMethod,
|
|
@@ -40847,12 +40723,12 @@ var SelectAssetInfoSection = ({
|
|
|
40847
40723
|
onClick: onSelectSource,
|
|
40848
40724
|
testId: "checkout-source-wallet-button"
|
|
40849
40725
|
}
|
|
40850
|
-
), /* @__PURE__ */
|
|
40726
|
+
), /* @__PURE__ */ React236.createElement(NewTokenDepositAlert, { onClick: onTokenTransfer }));
|
|
40851
40727
|
};
|
|
40852
40728
|
|
|
40853
40729
|
// src/modals/CheckoutModal/SelectAsset/SelectAssetList.tsx
|
|
40854
40730
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify12 } from "@funkit/utils";
|
|
40855
|
-
import
|
|
40731
|
+
import React237 from "react";
|
|
40856
40732
|
import { flushSync } from "react-dom";
|
|
40857
40733
|
var SelectAssetList = ({
|
|
40858
40734
|
isLoading,
|
|
@@ -40884,16 +40760,16 @@ var SelectAssetList = ({
|
|
|
40884
40760
|
return void 0;
|
|
40885
40761
|
}
|
|
40886
40762
|
if (isLoading) {
|
|
40887
|
-
return /* @__PURE__ */
|
|
40763
|
+
return /* @__PURE__ */ React237.createElement(FunAssetLoading, { count: 5 });
|
|
40888
40764
|
}
|
|
40889
40765
|
if (isAssetsEmpty) {
|
|
40890
|
-
return /* @__PURE__ */
|
|
40766
|
+
return /* @__PURE__ */ React237.createElement(
|
|
40891
40767
|
FunNoResults,
|
|
40892
40768
|
{
|
|
40893
40769
|
title: t("checkout.noAvailableTokens"),
|
|
40894
40770
|
text: t("checkout.noAvailableTokensMessage"),
|
|
40895
40771
|
variant: "actionable",
|
|
40896
|
-
actionButton: onBalanceTopUpSwitch ? /* @__PURE__ */
|
|
40772
|
+
actionButton: onBalanceTopUpSwitch ? /* @__PURE__ */ React237.createElement(
|
|
40897
40773
|
FunButton,
|
|
40898
40774
|
{
|
|
40899
40775
|
type: "tertiary",
|
|
@@ -40907,7 +40783,7 @@ var SelectAssetList = ({
|
|
|
40907
40783
|
}
|
|
40908
40784
|
);
|
|
40909
40785
|
}
|
|
40910
|
-
return /* @__PURE__ */
|
|
40786
|
+
return /* @__PURE__ */ React237.createElement(
|
|
40911
40787
|
Box,
|
|
40912
40788
|
{
|
|
40913
40789
|
display: "flex",
|
|
@@ -40916,7 +40792,7 @@ var SelectAssetList = ({
|
|
|
40916
40792
|
},
|
|
40917
40793
|
assetOptions.map(({ asset, isDisabled, badgeText, minUsdWithFees }) => {
|
|
40918
40794
|
const isAssetItemActive = !navigateOnAssetClick && selectedChainTokenSymbol === asset.chainSymbolKey;
|
|
40919
|
-
return /* @__PURE__ */
|
|
40795
|
+
return /* @__PURE__ */ React237.createElement(
|
|
40920
40796
|
FunAssetItem,
|
|
40921
40797
|
{
|
|
40922
40798
|
key: asset.chainSymbolKey,
|
|
@@ -41063,7 +40939,7 @@ function useAssetOptions({
|
|
|
41063
40939
|
const { isUsable, reason } = usableForCheckout;
|
|
41064
40940
|
const isKnown = isKnownAsset(asset);
|
|
41065
40941
|
const isDisabled = !isUsable || !isKnown;
|
|
41066
|
-
const isUserSelected =
|
|
40942
|
+
const isUserSelected = isTokenEquivalent13({
|
|
41067
40943
|
firstTokenChainId: asset.pickedChainId,
|
|
41068
40944
|
firstTokenAddress: asset.tokenAddress,
|
|
41069
40945
|
secondTokenChainId: userSelectedTargetAsset?.tokenChainId || "",
|
|
@@ -41224,7 +41100,7 @@ function AccountSelectAsset({
|
|
|
41224
41100
|
return;
|
|
41225
41101
|
}
|
|
41226
41102
|
const currentSourceAsset = checkoutItem?.selectedSourceAssetInfo;
|
|
41227
|
-
const sourceAssetChanged = !
|
|
41103
|
+
const sourceAssetChanged = !isTokenEquivalent13({
|
|
41228
41104
|
firstTokenChainId: currentSourceAsset?.chainId || "",
|
|
41229
41105
|
firstTokenAddress: currentSourceAsset?.address || "",
|
|
41230
41106
|
secondTokenChainId: tokenItem.pickedChainId,
|
|
@@ -41298,7 +41174,7 @@ function AccountSelectAsset({
|
|
|
41298
41174
|
});
|
|
41299
41175
|
}
|
|
41300
41176
|
}, [checkoutId, isLoading, logMeasuredEvent]);
|
|
41301
|
-
const assetList = /* @__PURE__ */
|
|
41177
|
+
const assetList = /* @__PURE__ */ React238.createElement(
|
|
41302
41178
|
SelectAssetList,
|
|
41303
41179
|
{
|
|
41304
41180
|
isLoading,
|
|
@@ -41312,7 +41188,7 @@ function AccountSelectAsset({
|
|
|
41312
41188
|
onContinueWithToken
|
|
41313
41189
|
}
|
|
41314
41190
|
);
|
|
41315
|
-
return /* @__PURE__ */
|
|
41191
|
+
return /* @__PURE__ */ React238.createElement(React238.Fragment, null, uiCustomizations.selectAssetScreen.customTopComponent?.(), /* @__PURE__ */ React238.createElement(
|
|
41316
41192
|
Box,
|
|
41317
41193
|
{
|
|
41318
41194
|
width: "full",
|
|
@@ -41325,11 +41201,11 @@ function AccountSelectAsset({
|
|
|
41325
41201
|
},
|
|
41326
41202
|
assetList
|
|
41327
41203
|
), bottomSectionRef && createPortal19(
|
|
41328
|
-
/* @__PURE__ */
|
|
41204
|
+
/* @__PURE__ */ React238.createElement(
|
|
41329
41205
|
Dialog.BottomBar,
|
|
41330
41206
|
{
|
|
41331
41207
|
topSectionVisible: !!fetchHoldingsError,
|
|
41332
|
-
topSection: navigateOnAssetClick && !fetchHoldingsError ? null : /* @__PURE__ */
|
|
41208
|
+
topSection: navigateOnAssetClick && !fetchHoldingsError ? null : /* @__PURE__ */ React238.createElement(
|
|
41333
41209
|
FunNotification,
|
|
41334
41210
|
{
|
|
41335
41211
|
isVisible: !!fetchHoldingsError,
|
|
@@ -41368,7 +41244,7 @@ function SelectAsset({
|
|
|
41368
41244
|
const handleFinish = useEffectEvent(() => {
|
|
41369
41245
|
onNext({});
|
|
41370
41246
|
});
|
|
41371
|
-
return /* @__PURE__ */
|
|
41247
|
+
return /* @__PURE__ */ React238.createElement(Box, { display: "flex", flexDirection: "column", gap: "12", style: { flex: 1 } }, moreSources.length > 0 && /* @__PURE__ */ React238.createElement(
|
|
41372
41248
|
SelectAssetInfoSection,
|
|
41373
41249
|
{
|
|
41374
41250
|
paymentMethodInfo,
|
|
@@ -41377,7 +41253,7 @@ function SelectAsset({
|
|
|
41377
41253
|
onSelectSource: handleSelectSource,
|
|
41378
41254
|
isSourceNavWidgetEnabled: modalState.startingStep === "select_asset" /* SELECT_ASSET */
|
|
41379
41255
|
}
|
|
41380
|
-
), /* @__PURE__ */
|
|
41256
|
+
), /* @__PURE__ */ React238.createElement(
|
|
41381
41257
|
AccountSelectAsset,
|
|
41382
41258
|
{
|
|
41383
41259
|
paymentMethodInfo,
|
|
@@ -41401,7 +41277,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41401
41277
|
return dynamicPath.badge === "NATIVE";
|
|
41402
41278
|
}
|
|
41403
41279
|
if (isEtherealCustomer(apiKey)) {
|
|
41404
|
-
if (
|
|
41280
|
+
if (isTokenEquivalent13({
|
|
41405
41281
|
firstTokenChainId: mainnet12.id.toString(),
|
|
41406
41282
|
firstTokenAddress: "0x90d2af7d622ca3141efa4d8f1f24d86e5974cc8f",
|
|
41407
41283
|
// eUSDe (Ethereum)
|
|
@@ -41410,7 +41286,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41410
41286
|
})) {
|
|
41411
41287
|
return true;
|
|
41412
41288
|
}
|
|
41413
|
-
if (
|
|
41289
|
+
if (isTokenEquivalent13({
|
|
41414
41290
|
firstTokenChainId: etherealChain.id.toString(),
|
|
41415
41291
|
firstTokenAddress: NATIVE_TOKEN,
|
|
41416
41292
|
// USDe (Ethereal) uses 0xeeee... address
|
|
@@ -41421,7 +41297,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41421
41297
|
}
|
|
41422
41298
|
}
|
|
41423
41299
|
if (isHyenaCustomer(apiKey)) {
|
|
41424
|
-
if (
|
|
41300
|
+
if (isTokenEquivalent13({
|
|
41425
41301
|
firstTokenChainId: hyperEvmChain3.id.toString(),
|
|
41426
41302
|
firstTokenAddress: "0x5d3a1ff2b6bab83b63cd9ad0787074081a52ef34",
|
|
41427
41303
|
secondTokenChainId: asset.pickedChainId,
|
|
@@ -41431,7 +41307,7 @@ function isTreatedAsNativeToken(apiKey, asset, dynamicTargetAssetCandidates, fin
|
|
|
41431
41307
|
}
|
|
41432
41308
|
}
|
|
41433
41309
|
return dynamicTargetAssetCandidates.some(
|
|
41434
|
-
(token) =>
|
|
41310
|
+
(token) => isTokenEquivalent13({
|
|
41435
41311
|
firstTokenChainId: token.tokenChainId,
|
|
41436
41312
|
firstTokenAddress: token.tokenAddress,
|
|
41437
41313
|
secondTokenChainId: asset.pickedChainId,
|
|
@@ -41447,15 +41323,15 @@ function showsNativeTokensOnTop(apiKey) {
|
|
|
41447
41323
|
import {
|
|
41448
41324
|
BridgeCustomerStatus as BridgeCustomerStatus6
|
|
41449
41325
|
} from "@funkit/api-base";
|
|
41450
|
-
import { LIGHTER_CHAIN_ID as LIGHTER_CHAIN_ID3
|
|
41451
|
-
import { isTokenEquivalent as
|
|
41452
|
-
import
|
|
41326
|
+
import { LIGHTER_CHAIN_ID as LIGHTER_CHAIN_ID3 } from "@funkit/chains";
|
|
41327
|
+
import { isTokenEquivalent as isTokenEquivalent14, noop as noop6 } from "@funkit/utils";
|
|
41328
|
+
import React247, { useEffect as useEffect67, useMemo as useMemo61, useRef as useRef32, useState as useState72 } from "react";
|
|
41453
41329
|
import { createPortal as createPortal20 } from "react-dom";
|
|
41454
41330
|
|
|
41455
41331
|
// src/components/Dropdown/ReceiveTokenDropdown.tsx
|
|
41456
|
-
import
|
|
41332
|
+
import React239 from "react";
|
|
41457
41333
|
var TOKEN_ICON_SIZE2 = "16";
|
|
41458
|
-
var aprTag = (badgeText) => /* @__PURE__ */
|
|
41334
|
+
var aprTag = (badgeText) => /* @__PURE__ */ React239.createElement(
|
|
41459
41335
|
FunBadge,
|
|
41460
41336
|
{
|
|
41461
41337
|
background: "badgeBackgroundSuccess",
|
|
@@ -41487,7 +41363,7 @@ var ReceiveTokenDropdown = ({
|
|
|
41487
41363
|
onTokenSelected(matchingToken);
|
|
41488
41364
|
}
|
|
41489
41365
|
};
|
|
41490
|
-
return /* @__PURE__ */
|
|
41366
|
+
return /* @__PURE__ */ React239.createElement(
|
|
41491
41367
|
BaseDropdown_default,
|
|
41492
41368
|
{
|
|
41493
41369
|
maxDropdownHeight,
|
|
@@ -41496,7 +41372,7 @@ var ReceiveTokenDropdown = ({
|
|
|
41496
41372
|
size,
|
|
41497
41373
|
openToTopOnMobile: false,
|
|
41498
41374
|
activeItemProps: {
|
|
41499
|
-
iconComponent: selectedToken && /* @__PURE__ */
|
|
41375
|
+
iconComponent: selectedToken && /* @__PURE__ */ React239.createElement(
|
|
41500
41376
|
FunAssetAvatar,
|
|
41501
41377
|
{
|
|
41502
41378
|
assetIconSize: TOKEN_ICON_SIZE2,
|
|
@@ -41522,11 +41398,11 @@ var ReceiveTokenDropdown = ({
|
|
|
41522
41398
|
(token) => token.tokenSymbol === symbol
|
|
41523
41399
|
)?.badgeText;
|
|
41524
41400
|
const tagComponent = tokenBadgeText2 ? aprTag(tokenBadgeText2) : void 0;
|
|
41525
|
-
return /* @__PURE__ */
|
|
41401
|
+
return /* @__PURE__ */ React239.createElement(
|
|
41526
41402
|
BaseDropdownItem_default,
|
|
41527
41403
|
{
|
|
41528
41404
|
horizontalIconGap: "8",
|
|
41529
|
-
iconComponent: /* @__PURE__ */
|
|
41405
|
+
iconComponent: /* @__PURE__ */ React239.createElement(
|
|
41530
41406
|
FunAssetAvatar,
|
|
41531
41407
|
{
|
|
41532
41408
|
assetIconSize: TOKEN_ICON_SIZE2,
|
|
@@ -41557,7 +41433,7 @@ function useIsUserUnderComplianceReview() {
|
|
|
41557
41433
|
}
|
|
41558
41434
|
|
|
41559
41435
|
// src/modals/CheckoutModal/SourceChange/ComplianceReviewBanner.tsx
|
|
41560
|
-
import
|
|
41436
|
+
import React240, { useEffect as useEffect66 } from "react";
|
|
41561
41437
|
import { Trans as Trans18 } from "react-i18next";
|
|
41562
41438
|
function ComplianceReviewBanner({
|
|
41563
41439
|
checkoutId
|
|
@@ -41576,17 +41452,17 @@ function ComplianceReviewBanner({
|
|
|
41576
41452
|
metadata: { checkoutId }
|
|
41577
41453
|
});
|
|
41578
41454
|
};
|
|
41579
|
-
return /* @__PURE__ */
|
|
41455
|
+
return /* @__PURE__ */ React240.createElement(Box, { marginBottom: "8" }, /* @__PURE__ */ React240.createElement(
|
|
41580
41456
|
InfoBanner,
|
|
41581
41457
|
{
|
|
41582
41458
|
type: "warning",
|
|
41583
|
-
message: /* @__PURE__ */
|
|
41459
|
+
message: /* @__PURE__ */ React240.createElement(
|
|
41584
41460
|
Trans18,
|
|
41585
41461
|
{
|
|
41586
41462
|
t,
|
|
41587
41463
|
i18nKey: "sourceChange.complianceReviewMessage",
|
|
41588
41464
|
components: {
|
|
41589
|
-
GetHelpLink: /* @__PURE__ */
|
|
41465
|
+
GetHelpLink: /* @__PURE__ */ React240.createElement(ContactSupportLink, { size: "10", onClick: trackGetHelpClick })
|
|
41590
41466
|
}
|
|
41591
41467
|
}
|
|
41592
41468
|
)
|
|
@@ -41595,7 +41471,7 @@ function ComplianceReviewBanner({
|
|
|
41595
41471
|
}
|
|
41596
41472
|
|
|
41597
41473
|
// src/modals/CheckoutModal/SourceChange/ConnectedSource.tsx
|
|
41598
|
-
import
|
|
41474
|
+
import React241 from "react";
|
|
41599
41475
|
var ConnectedSource = ({
|
|
41600
41476
|
paymentInfo,
|
|
41601
41477
|
targetChainId,
|
|
@@ -41607,7 +41483,7 @@ var ConnectedSource = ({
|
|
|
41607
41483
|
const isSelected = selectedPaymentInfo?.paymentMethod === paymentInfo.paymentMethod;
|
|
41608
41484
|
switch (paymentInfo.paymentMethod) {
|
|
41609
41485
|
case PaymentMethod.ACCOUNT_BALANCE:
|
|
41610
|
-
return /* @__PURE__ */
|
|
41486
|
+
return /* @__PURE__ */ React241.createElement(
|
|
41611
41487
|
AccountBalancePaymentMethodItem,
|
|
41612
41488
|
{
|
|
41613
41489
|
showSelectedCheckmark,
|
|
@@ -41619,7 +41495,7 @@ var ConnectedSource = ({
|
|
|
41619
41495
|
}
|
|
41620
41496
|
);
|
|
41621
41497
|
case PaymentMethod.BROKERAGE:
|
|
41622
|
-
return /* @__PURE__ */
|
|
41498
|
+
return /* @__PURE__ */ React241.createElement(
|
|
41623
41499
|
ConnectedBluvoPaymentMethodItem,
|
|
41624
41500
|
{
|
|
41625
41501
|
paymentMethodInfo: paymentInfo,
|
|
@@ -41630,7 +41506,7 @@ var ConnectedSource = ({
|
|
|
41630
41506
|
}
|
|
41631
41507
|
);
|
|
41632
41508
|
case PaymentMethod.VIRTUAL_BANK:
|
|
41633
|
-
return /* @__PURE__ */
|
|
41509
|
+
return /* @__PURE__ */ React241.createElement(
|
|
41634
41510
|
ActiveFiatAccountPaymentMethodItem,
|
|
41635
41511
|
{
|
|
41636
41512
|
isActive: isSelected,
|
|
@@ -41646,10 +41522,10 @@ var ConnectedSource = ({
|
|
|
41646
41522
|
};
|
|
41647
41523
|
|
|
41648
41524
|
// src/modals/CheckoutModal/SourceChange/SourceList.tsx
|
|
41649
|
-
import
|
|
41525
|
+
import React246 from "react";
|
|
41650
41526
|
|
|
41651
41527
|
// src/modals/CheckoutModal/SourceChange/FlatList.tsx
|
|
41652
|
-
import
|
|
41528
|
+
import React242, { Fragment as Fragment2 } from "react";
|
|
41653
41529
|
function FlatList({
|
|
41654
41530
|
groups,
|
|
41655
41531
|
boxClassName,
|
|
@@ -41657,7 +41533,7 @@ function FlatList({
|
|
|
41657
41533
|
footer,
|
|
41658
41534
|
testId
|
|
41659
41535
|
}) {
|
|
41660
|
-
return /* @__PURE__ */
|
|
41536
|
+
return /* @__PURE__ */ React242.createElement(
|
|
41661
41537
|
Box,
|
|
41662
41538
|
{
|
|
41663
41539
|
display: "flex",
|
|
@@ -41666,7 +41542,7 @@ function FlatList({
|
|
|
41666
41542
|
testId,
|
|
41667
41543
|
...{ [WITH_EMPTY_STATE_DATA_ATTRIBUTE]: true }
|
|
41668
41544
|
},
|
|
41669
|
-
groups.map((group, index) => /* @__PURE__ */
|
|
41545
|
+
groups.map((group, index) => /* @__PURE__ */ React242.createElement(Fragment2, { key: index }, index > 0 && /* @__PURE__ */ React242.createElement(
|
|
41670
41546
|
FunDivider,
|
|
41671
41547
|
{
|
|
41672
41548
|
label: dividerLabel,
|
|
@@ -41680,7 +41556,7 @@ function FlatList({
|
|
|
41680
41556
|
}
|
|
41681
41557
|
|
|
41682
41558
|
// src/modals/CheckoutModal/SourceChange/GroupedList.tsx
|
|
41683
|
-
import
|
|
41559
|
+
import React243 from "react";
|
|
41684
41560
|
function GroupedList({
|
|
41685
41561
|
groups,
|
|
41686
41562
|
showLabels,
|
|
@@ -41688,7 +41564,7 @@ function GroupedList({
|
|
|
41688
41564
|
testId
|
|
41689
41565
|
}) {
|
|
41690
41566
|
const containerClass = showLabels ? sourceListGroupContainerStyles : sourceListGroupContainerNoLabelsStyles;
|
|
41691
|
-
return /* @__PURE__ */
|
|
41567
|
+
return /* @__PURE__ */ React243.createElement(
|
|
41692
41568
|
Box,
|
|
41693
41569
|
{
|
|
41694
41570
|
display: "flex",
|
|
@@ -41696,7 +41572,7 @@ function GroupedList({
|
|
|
41696
41572
|
testId,
|
|
41697
41573
|
...{ [WITH_EMPTY_STATE_DATA_ATTRIBUTE]: true }
|
|
41698
41574
|
},
|
|
41699
|
-
/* @__PURE__ */
|
|
41575
|
+
/* @__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(
|
|
41700
41576
|
Text,
|
|
41701
41577
|
{
|
|
41702
41578
|
color: "secondaryText",
|
|
@@ -41704,7 +41580,7 @@ function GroupedList({
|
|
|
41704
41580
|
weight: "sourceListSectionLabelFontWeight"
|
|
41705
41581
|
},
|
|
41706
41582
|
group.label
|
|
41707
|
-
), /* @__PURE__ */
|
|
41583
|
+
), /* @__PURE__ */ React243.createElement(FunTooltip, { content: group.labelTooltip }, /* @__PURE__ */ React243.createElement(
|
|
41708
41584
|
Box,
|
|
41709
41585
|
{
|
|
41710
41586
|
color: { base: "tertiaryText", hover: "primaryText" },
|
|
@@ -41712,8 +41588,8 @@ function GroupedList({
|
|
|
41712
41588
|
alignItems: "center",
|
|
41713
41589
|
justifyContent: "center"
|
|
41714
41590
|
},
|
|
41715
|
-
/* @__PURE__ */
|
|
41716
|
-
))) : /* @__PURE__ */
|
|
41591
|
+
/* @__PURE__ */ React243.createElement(FunInfoIcon, { size: 12 })
|
|
41592
|
+
))) : /* @__PURE__ */ React243.createElement(
|
|
41717
41593
|
Text,
|
|
41718
41594
|
{
|
|
41719
41595
|
color: "secondaryText",
|
|
@@ -41721,13 +41597,13 @@ function GroupedList({
|
|
|
41721
41597
|
weight: "sourceListSectionLabelFontWeight"
|
|
41722
41598
|
},
|
|
41723
41599
|
group.label
|
|
41724
|
-
)), /* @__PURE__ */
|
|
41600
|
+
)), /* @__PURE__ */ React243.createElement(Box, { className: boxClassName }, group.children))))
|
|
41725
41601
|
);
|
|
41726
41602
|
}
|
|
41727
41603
|
|
|
41728
41604
|
// src/modals/CheckoutModal/SourceChange/PayPal.tsx
|
|
41729
41605
|
import { MeldServiceProvider as MeldServiceProvider2 } from "@funkit/api-base";
|
|
41730
|
-
import
|
|
41606
|
+
import React244, { useCallback as useCallback48 } from "react";
|
|
41731
41607
|
function PayPal() {
|
|
41732
41608
|
const { apiKey } = useFunkitConfig();
|
|
41733
41609
|
const { data: defaultCurrency } = useMeldDefaultCurrency(PaymentMethod.CARD);
|
|
@@ -41754,7 +41630,7 @@ function PayPal() {
|
|
|
41754
41630
|
return null;
|
|
41755
41631
|
}
|
|
41756
41632
|
const isLoading = isPaypalReady && (!defaultCurrency || !amounts[1] || isPending);
|
|
41757
|
-
return /* @__PURE__ */
|
|
41633
|
+
return /* @__PURE__ */ React244.createElement(
|
|
41758
41634
|
PayPalPaymentMethodItem,
|
|
41759
41635
|
{
|
|
41760
41636
|
isClickable: !isLoading,
|
|
@@ -41766,7 +41642,7 @@ function PayPal() {
|
|
|
41766
41642
|
}
|
|
41767
41643
|
|
|
41768
41644
|
// src/modals/CheckoutModal/SourceChange/buildSourceGroups.tsx
|
|
41769
|
-
import
|
|
41645
|
+
import React245 from "react";
|
|
41770
41646
|
function buildSourceGroups(args) {
|
|
41771
41647
|
if (isAaveCustomer(args.apiKey)) {
|
|
41772
41648
|
return buildAaveSourceGroups(args);
|
|
@@ -41786,7 +41662,7 @@ function buildDefaultSourceGroups({
|
|
|
41786
41662
|
if (preferred.length > 0) {
|
|
41787
41663
|
groups.push({
|
|
41788
41664
|
label: isFallback ? t("sourceChange.mostPopular") : t("sourceChange.connected"),
|
|
41789
|
-
children: /* @__PURE__ */
|
|
41665
|
+
children: /* @__PURE__ */ React245.createElement(React245.Fragment, null, preferred)
|
|
41790
41666
|
});
|
|
41791
41667
|
}
|
|
41792
41668
|
const moreChildren = [...moreSources, ...unavailable];
|
|
@@ -41796,7 +41672,7 @@ function buildDefaultSourceGroups({
|
|
|
41796
41672
|
// when there's no preceding preferred group. Labeled mode skips
|
|
41797
41673
|
// groups with no label.
|
|
41798
41674
|
label: preferred.length > 0 ? t("sourceChange.moreOptions") : void 0,
|
|
41799
|
-
children: /* @__PURE__ */
|
|
41675
|
+
children: /* @__PURE__ */ React245.createElement(React245.Fragment, null, moreChildren)
|
|
41800
41676
|
});
|
|
41801
41677
|
}
|
|
41802
41678
|
if (!isSwappedEnabled) {
|
|
@@ -41827,7 +41703,7 @@ function buildAaveSourceGroups({
|
|
|
41827
41703
|
groups.push({
|
|
41828
41704
|
label: nativeRow ? t("sourceChange.useOtherAssets") : t("sourceChange.useAnyAsset"),
|
|
41829
41705
|
labelTooltip: nativeRow ? t("sourceChange.useOtherAssetsTooltip") : void 0,
|
|
41830
|
-
children: /* @__PURE__ */
|
|
41706
|
+
children: /* @__PURE__ */ React245.createElement(React245.Fragment, null, otherAssetsChildren)
|
|
41831
41707
|
});
|
|
41832
41708
|
}
|
|
41833
41709
|
return { layout: "grouped", groups, showLabels: true };
|
|
@@ -41859,18 +41735,18 @@ function SourceList({
|
|
|
41859
41735
|
nativeRow
|
|
41860
41736
|
});
|
|
41861
41737
|
if (result.layout === "flat") {
|
|
41862
|
-
return /* @__PURE__ */
|
|
41738
|
+
return /* @__PURE__ */ React246.createElement(
|
|
41863
41739
|
FlatList,
|
|
41864
41740
|
{
|
|
41865
41741
|
groups: result.groups,
|
|
41866
41742
|
boxClassName,
|
|
41867
41743
|
dividerLabel: t("sourceChange.more"),
|
|
41868
|
-
footer: /* @__PURE__ */
|
|
41744
|
+
footer: /* @__PURE__ */ React246.createElement(PayPal, null),
|
|
41869
41745
|
testId
|
|
41870
41746
|
}
|
|
41871
41747
|
);
|
|
41872
41748
|
}
|
|
41873
|
-
return /* @__PURE__ */
|
|
41749
|
+
return /* @__PURE__ */ React246.createElement(
|
|
41874
41750
|
GroupedList,
|
|
41875
41751
|
{
|
|
41876
41752
|
groups: result.groups,
|
|
@@ -41881,6 +41757,26 @@ function SourceList({
|
|
|
41881
41757
|
);
|
|
41882
41758
|
}
|
|
41883
41759
|
|
|
41760
|
+
// src/hooks/useStartBitcoinLightning.ts
|
|
41761
|
+
import { lightningChain as lightningChain3 } from "@funkit/chains";
|
|
41762
|
+
import { useCallback as useCallback49 } from "react";
|
|
41763
|
+
function useStartBitcoinLightning() {
|
|
41764
|
+
const { updateSelectedPaymentMethodInfo, updateSourceAsset } = useCheckoutContext();
|
|
41765
|
+
return useCallback49(() => {
|
|
41766
|
+
const paymentMethodInfo = createPaymentMethodInfo({
|
|
41767
|
+
paymentMethod: PaymentMethod.BITCOIN_LIGHTNING
|
|
41768
|
+
});
|
|
41769
|
+
updateSelectedPaymentMethodInfo(paymentMethodInfo);
|
|
41770
|
+
updateSourceAsset({
|
|
41771
|
+
iconSrc: chainMetadataById[String(lightningChain3.id)]?.iconUrl ?? "",
|
|
41772
|
+
symbol: "BTC",
|
|
41773
|
+
tokenAddress: NATIVE_TOKEN,
|
|
41774
|
+
pickedChainId: String(lightningChain3.id)
|
|
41775
|
+
});
|
|
41776
|
+
return paymentMethodInfo;
|
|
41777
|
+
}, [updateSelectedPaymentMethodInfo, updateSourceAsset]);
|
|
41778
|
+
}
|
|
41779
|
+
|
|
41884
41780
|
// src/modals/CheckoutModal/SourceChange/SourceChange.tsx
|
|
41885
41781
|
var SourceChangeInfo = {
|
|
41886
41782
|
Component: SourceChange,
|
|
@@ -41990,6 +41886,7 @@ function SourceChange({
|
|
|
41990
41886
|
const { logEvent } = useTrack();
|
|
41991
41887
|
const bottomSectionRef = useBottomSectionRef();
|
|
41992
41888
|
const { t } = useFunkitTranslation();
|
|
41889
|
+
const startBitcoinLightning = useStartBitcoinLightning();
|
|
41993
41890
|
const {
|
|
41994
41891
|
checkoutItem,
|
|
41995
41892
|
updateSelectedPaymentMethodInfo,
|
|
@@ -42046,7 +41943,7 @@ function SourceChange({
|
|
|
42046
41943
|
return void 0;
|
|
42047
41944
|
}
|
|
42048
41945
|
const holding = Object.values(walletHoldings).find(
|
|
42049
|
-
(h) =>
|
|
41946
|
+
(h) => isTokenEquivalent14({
|
|
42050
41947
|
firstTokenChainId: h.pickedChainId,
|
|
42051
41948
|
firstTokenAddress: h.tokenAddress,
|
|
42052
41949
|
secondTokenChainId: checkoutConfig.targetChain,
|
|
@@ -42164,16 +42061,7 @@ function SourceChange({
|
|
|
42164
42061
|
brokerageFailed: false
|
|
42165
42062
|
});
|
|
42166
42063
|
} else if (newSource2 === PaymentMethod.BITCOIN_LIGHTNING) {
|
|
42167
|
-
const paymentMethodInfo2 =
|
|
42168
|
-
paymentMethod: PaymentMethod.BITCOIN_LIGHTNING
|
|
42169
|
-
});
|
|
42170
|
-
updateSelectedPaymentMethodInfo(paymentMethodInfo2);
|
|
42171
|
-
updateSourceAsset({
|
|
42172
|
-
iconSrc: chainMetadataById[String(lightningChain3.id)]?.iconUrl ?? "",
|
|
42173
|
-
symbol: "BTC",
|
|
42174
|
-
tokenAddress: NATIVE_TOKEN,
|
|
42175
|
-
pickedChainId: String(lightningChain3.id)
|
|
42176
|
-
});
|
|
42064
|
+
const paymentMethodInfo2 = startBitcoinLightning();
|
|
42177
42065
|
onNext({
|
|
42178
42066
|
connectNew: true,
|
|
42179
42067
|
reverseAnimation: true,
|
|
@@ -42252,7 +42140,7 @@ function SourceChange({
|
|
|
42252
42140
|
};
|
|
42253
42141
|
function renderSource(source) {
|
|
42254
42142
|
if (isConnectablePaymentMethodInfo(source)) {
|
|
42255
|
-
return /* @__PURE__ */
|
|
42143
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42256
42144
|
ConnectedSource,
|
|
42257
42145
|
{
|
|
42258
42146
|
key: source.title,
|
|
@@ -42265,7 +42153,7 @@ function SourceChange({
|
|
|
42265
42153
|
}
|
|
42266
42154
|
);
|
|
42267
42155
|
}
|
|
42268
|
-
return /* @__PURE__ */
|
|
42156
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42269
42157
|
AddPaymentMethodItem,
|
|
42270
42158
|
{
|
|
42271
42159
|
key: source,
|
|
@@ -42277,7 +42165,7 @@ function SourceChange({
|
|
|
42277
42165
|
);
|
|
42278
42166
|
}
|
|
42279
42167
|
function renderUnavailable({ method, reason }) {
|
|
42280
|
-
return /* @__PURE__ */
|
|
42168
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42281
42169
|
AddPaymentMethodItem,
|
|
42282
42170
|
{
|
|
42283
42171
|
key: method,
|
|
@@ -42285,7 +42173,7 @@ function SourceChange({
|
|
|
42285
42173
|
isActive: false,
|
|
42286
42174
|
isClickable: false,
|
|
42287
42175
|
onClick: noop6,
|
|
42288
|
-
customValueIcon: /* @__PURE__ */
|
|
42176
|
+
customValueIcon: /* @__PURE__ */ React247.createElement(PaymentMethodDisabledBadge, { reason })
|
|
42289
42177
|
}
|
|
42290
42178
|
);
|
|
42291
42179
|
}
|
|
@@ -42293,7 +42181,7 @@ function SourceChange({
|
|
|
42293
42181
|
if (tab === "withdraw") {
|
|
42294
42182
|
return (
|
|
42295
42183
|
// TODO: Integrate the full withdrawal flow
|
|
42296
|
-
/* @__PURE__ */
|
|
42184
|
+
/* @__PURE__ */ React247.createElement(
|
|
42297
42185
|
WithdrawalMethodSelect,
|
|
42298
42186
|
{
|
|
42299
42187
|
sourceChainId: targetChainId,
|
|
@@ -42305,7 +42193,7 @@ function SourceChange({
|
|
|
42305
42193
|
);
|
|
42306
42194
|
}
|
|
42307
42195
|
if (isSwappedEnabled && tab === "fiat") {
|
|
42308
|
-
return /* @__PURE__ */
|
|
42196
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42309
42197
|
FormOfPaymentsList,
|
|
42310
42198
|
{
|
|
42311
42199
|
fopsData: fopsData.data,
|
|
@@ -42318,7 +42206,7 @@ function SourceChange({
|
|
|
42318
42206
|
}
|
|
42319
42207
|
);
|
|
42320
42208
|
}
|
|
42321
|
-
const nativeRow = nativeHolding && connectedWallet ? /* @__PURE__ */
|
|
42209
|
+
const nativeRow = nativeHolding && connectedWallet ? /* @__PURE__ */ React247.createElement(
|
|
42322
42210
|
NativeAssetItem,
|
|
42323
42211
|
{
|
|
42324
42212
|
asset: nativeHolding,
|
|
@@ -42328,7 +42216,7 @@ function SourceChange({
|
|
|
42328
42216
|
onClick: handleNativeAssetClick
|
|
42329
42217
|
}
|
|
42330
42218
|
) : void 0;
|
|
42331
|
-
return /* @__PURE__ */
|
|
42219
|
+
return /* @__PURE__ */ React247.createElement(
|
|
42332
42220
|
SourceList,
|
|
42333
42221
|
{
|
|
42334
42222
|
preferred: preferred.map(renderSource),
|
|
@@ -42340,21 +42228,21 @@ function SourceChange({
|
|
|
42340
42228
|
}
|
|
42341
42229
|
);
|
|
42342
42230
|
}
|
|
42343
|
-
return /* @__PURE__ */
|
|
42231
|
+
return /* @__PURE__ */ React247.createElement(Box, { id: "source-change-page", style: { display: "contents" } }, /* @__PURE__ */ React247.createElement(
|
|
42344
42232
|
Box,
|
|
42345
42233
|
{
|
|
42346
42234
|
className: paymentMethodStaticArea,
|
|
42347
42235
|
display: "flex",
|
|
42348
42236
|
flexDirection: "column"
|
|
42349
42237
|
},
|
|
42350
|
-
/* @__PURE__ */
|
|
42238
|
+
/* @__PURE__ */ React247.createElement(CheckoutTopAnnouncementBanner, null),
|
|
42351
42239
|
customTopComponent?.({
|
|
42352
42240
|
onStepChange,
|
|
42353
42241
|
modalState,
|
|
42354
42242
|
dynamicRoutingId: checkoutConfig?.dynamicRoutingId,
|
|
42355
42243
|
applyDynamicTargetAssetCandidate
|
|
42356
42244
|
}),
|
|
42357
|
-
isTargetAssetSelectable && dynamicTargetAssets && /* @__PURE__ */
|
|
42245
|
+
isTargetAssetSelectable && dynamicTargetAssets && /* @__PURE__ */ React247.createElement(Box, { marginBottom: "8" }, /* @__PURE__ */ React247.createElement(
|
|
42358
42246
|
ReceiveTokenDropdown,
|
|
42359
42247
|
{
|
|
42360
42248
|
activeItemLabel: t("sourceChange.selectDestinationTokenLabel"),
|
|
@@ -42367,7 +42255,7 @@ function SourceChange({
|
|
|
42367
42255
|
tokens: dynamicTargetAssets
|
|
42368
42256
|
}
|
|
42369
42257
|
))
|
|
42370
|
-
), showContentDivider && /* @__PURE__ */
|
|
42258
|
+
), showContentDivider && /* @__PURE__ */ React247.createElement(
|
|
42371
42259
|
FunDivider,
|
|
42372
42260
|
{
|
|
42373
42261
|
marginTop: "16",
|
|
@@ -42375,14 +42263,14 @@ function SourceChange({
|
|
|
42375
42263
|
borderColor: "lightStroke",
|
|
42376
42264
|
className: fullWidthContentDivider
|
|
42377
42265
|
}
|
|
42378
|
-
), /* @__PURE__ */
|
|
42266
|
+
), /* @__PURE__ */ React247.createElement(
|
|
42379
42267
|
Box,
|
|
42380
42268
|
{
|
|
42381
42269
|
className: paymentMethodStaticArea,
|
|
42382
42270
|
display: "flex",
|
|
42383
42271
|
flexDirection: "column"
|
|
42384
42272
|
},
|
|
42385
|
-
isSwappedEnabled && /* @__PURE__ */
|
|
42273
|
+
isSwappedEnabled && /* @__PURE__ */ React247.createElement(
|
|
42386
42274
|
CryptoCashToggle,
|
|
42387
42275
|
{
|
|
42388
42276
|
marginTop: cryptoCashToggleMarginTop,
|
|
@@ -42391,16 +42279,16 @@ function SourceChange({
|
|
|
42391
42279
|
tabs: tabOrder
|
|
42392
42280
|
}
|
|
42393
42281
|
),
|
|
42394
|
-
isFreeUsdcBannerEnabled && (paymentMethodTab === "crypto" || !isSwappedEnabled) && /* @__PURE__ */
|
|
42395
|
-
isUnderComplianceReview && /* @__PURE__ */
|
|
42396
|
-
), isSwappedEnabled && paymentMethodTab === "fiat" && /* @__PURE__ */
|
|
42282
|
+
isFreeUsdcBannerEnabled && (paymentMethodTab === "crypto" || !isSwappedEnabled) && /* @__PURE__ */ React247.createElement(FreeUsdcBanner, { type: "deposit" }),
|
|
42283
|
+
isUnderComplianceReview && /* @__PURE__ */ React247.createElement(ComplianceReviewBanner, { checkoutId: modalState.checkoutId })
|
|
42284
|
+
), isSwappedEnabled && paymentMethodTab === "fiat" && /* @__PURE__ */ React247.createElement(
|
|
42397
42285
|
FunDivider,
|
|
42398
42286
|
{
|
|
42399
42287
|
borderColor: "lightStroke",
|
|
42400
42288
|
className: fullWidthContentDivider,
|
|
42401
42289
|
visible: paymentListScroll.hasTopDivider
|
|
42402
42290
|
}
|
|
42403
|
-
), /* @__PURE__ */
|
|
42291
|
+
), /* @__PURE__ */ React247.createElement(
|
|
42404
42292
|
PaddedScrollableArea,
|
|
42405
42293
|
{
|
|
42406
42294
|
ref: paymentListScroll.ref,
|
|
@@ -42408,7 +42296,7 @@ function SourceChange({
|
|
|
42408
42296
|
isScrolling: paymentListScroll.isScrolling,
|
|
42409
42297
|
paddingBottom: hasBottomBar ? void 0 : "modalPaddingBottomLower"
|
|
42410
42298
|
},
|
|
42411
|
-
leavingTab !== null && /* @__PURE__ */
|
|
42299
|
+
leavingTab !== null && /* @__PURE__ */ React247.createElement(
|
|
42412
42300
|
Box,
|
|
42413
42301
|
{
|
|
42414
42302
|
key: leavingTab,
|
|
@@ -42422,15 +42310,15 @@ function SourceChange({
|
|
|
42422
42310
|
},
|
|
42423
42311
|
renderPaymentMethodContent(leavingTab)
|
|
42424
42312
|
),
|
|
42425
|
-
/* @__PURE__ */
|
|
42426
|
-
), /* @__PURE__ */
|
|
42313
|
+
/* @__PURE__ */ React247.createElement(Box, { className: leavingTab !== null ? enteringClass : void 0 }, renderPaymentMethodContent(paymentMethodTab))
|
|
42314
|
+
), /* @__PURE__ */ React247.createElement(Box, { className: emptyStateStyles }, /* @__PURE__ */ React247.createElement(
|
|
42427
42315
|
FunNoResults,
|
|
42428
42316
|
{
|
|
42429
42317
|
text: t("checkout.noAvailableTokensMessage"),
|
|
42430
42318
|
title: t("checkout.noAvailableTokens"),
|
|
42431
42319
|
variant: "actionable"
|
|
42432
42320
|
}
|
|
42433
|
-
)), isSwappedEnabled && paymentMethodTab === "fiat" && hasBottomBar && /* @__PURE__ */
|
|
42321
|
+
)), isSwappedEnabled && paymentMethodTab === "fiat" && hasBottomBar && /* @__PURE__ */ React247.createElement(
|
|
42434
42322
|
FunDivider,
|
|
42435
42323
|
{
|
|
42436
42324
|
borderColor: "lightStroke",
|
|
@@ -42438,7 +42326,7 @@ function SourceChange({
|
|
|
42438
42326
|
visible: paymentListScroll.isScrollable && !paymentListScroll.isAtBottom
|
|
42439
42327
|
}
|
|
42440
42328
|
), bottomSectionRef && createPortal20(
|
|
42441
|
-
/* @__PURE__ */
|
|
42329
|
+
/* @__PURE__ */ React247.createElement(
|
|
42442
42330
|
Dialog.BottomBar,
|
|
42443
42331
|
{
|
|
42444
42332
|
actionButtonProps: isAutoContinue ? void 0 : {
|
|
@@ -42467,7 +42355,7 @@ function trackEventForTabChange(checkoutItem, tab) {
|
|
|
42467
42355
|
|
|
42468
42356
|
// src/modals/CheckoutModal/SwappedIframe/SwappedIframeController.tsx
|
|
42469
42357
|
import { useQueryClient as useQueryClient7 } from "@tanstack/react-query";
|
|
42470
|
-
import
|
|
42358
|
+
import React248, { useEffect as useEffect68, useRef as useRef33 } from "react";
|
|
42471
42359
|
import { createPortal as createPortal21 } from "react-dom";
|
|
42472
42360
|
import { Trans as Trans19 } from "react-i18next";
|
|
42473
42361
|
var SwappedIframeInfo = {
|
|
@@ -42698,16 +42586,16 @@ function SwappedIframeController({
|
|
|
42698
42586
|
onTimeout: () => setModalState((s) => ({ ...s, error: true }))
|
|
42699
42587
|
});
|
|
42700
42588
|
if (modalState.error) {
|
|
42701
|
-
return /* @__PURE__ */
|
|
42589
|
+
return /* @__PURE__ */ React248.createElement(React248.Fragment, null, /* @__PURE__ */ React248.createElement(ModalErrorState, { minHeight: 268 }, /* @__PURE__ */ React248.createElement(
|
|
42702
42590
|
Trans19,
|
|
42703
42591
|
{
|
|
42704
42592
|
i18nKey: "sourceChange.noFormsOfPayments",
|
|
42705
42593
|
components: {
|
|
42706
|
-
ContactSupportLink: /* @__PURE__ */
|
|
42594
|
+
ContactSupportLink: /* @__PURE__ */ React248.createElement(ContactSupportLink, { size: "inherit" })
|
|
42707
42595
|
}
|
|
42708
42596
|
}
|
|
42709
42597
|
)), bottomSectionRef && createPortal21(
|
|
42710
|
-
/* @__PURE__ */
|
|
42598
|
+
/* @__PURE__ */ React248.createElement(
|
|
42711
42599
|
Dialog.BottomBar,
|
|
42712
42600
|
{
|
|
42713
42601
|
actionButtonProps: {
|
|
@@ -42724,9 +42612,9 @@ function SwappedIframeController({
|
|
|
42724
42612
|
));
|
|
42725
42613
|
}
|
|
42726
42614
|
if (!isSwappedReady) {
|
|
42727
|
-
return /* @__PURE__ */
|
|
42615
|
+
return /* @__PURE__ */ React248.createElement(SwappedIframeSkeleton, { id: "swapped-iframe-loading", onBack });
|
|
42728
42616
|
}
|
|
42729
|
-
return /* @__PURE__ */
|
|
42617
|
+
return /* @__PURE__ */ React248.createElement(Box, { id: "swapped-iframe" });
|
|
42730
42618
|
}
|
|
42731
42619
|
function trackEventForFormOfPayment(fop, checkoutItem, eventName, extras) {
|
|
42732
42620
|
return {
|
|
@@ -42750,6 +42638,52 @@ import { motion as motion17, useAnimationControls as useAnimationControls4 } fro
|
|
|
42750
42638
|
import React257, { useRef as useRef35, useState as useState74 } from "react";
|
|
42751
42639
|
import { createPortal as createPortal22 } from "react-dom";
|
|
42752
42640
|
|
|
42641
|
+
// src/components/BitcoinLightningBanner/BitcoinLightningBanner.tsx
|
|
42642
|
+
import { lightningChain as lightningChain5 } from "@funkit/chains";
|
|
42643
|
+
import React249 from "react";
|
|
42644
|
+
var BitcoinLightningBanner = ({
|
|
42645
|
+
onClick
|
|
42646
|
+
}) => {
|
|
42647
|
+
const { t } = useFunkitTranslation();
|
|
42648
|
+
return /* @__PURE__ */ React249.createElement(
|
|
42649
|
+
Box,
|
|
42650
|
+
{
|
|
42651
|
+
testId: "bitcoin-lightning-banner",
|
|
42652
|
+
width: "full",
|
|
42653
|
+
borderRadius: "connectButton",
|
|
42654
|
+
background: "offBackground",
|
|
42655
|
+
display: "flex",
|
|
42656
|
+
flexDirection: "row",
|
|
42657
|
+
alignItems: "center",
|
|
42658
|
+
gap: "8",
|
|
42659
|
+
paddingX: "10",
|
|
42660
|
+
paddingY: "8"
|
|
42661
|
+
},
|
|
42662
|
+
/* @__PURE__ */ React249.createElement(Box, { display: "flex", alignItems: "center", style: { flexShrink: 0 } }, /* @__PURE__ */ React249.createElement(
|
|
42663
|
+
AsyncImage,
|
|
42664
|
+
{
|
|
42665
|
+
alt: "Lightning",
|
|
42666
|
+
src: chainMetadataById[String(lightningChain5.id)]?.iconUrl ?? "",
|
|
42667
|
+
width: 16,
|
|
42668
|
+
height: 16,
|
|
42669
|
+
borderRadius: "full",
|
|
42670
|
+
borderColor: { custom: "rgba(0, 0, 0, 0.1)" }
|
|
42671
|
+
}
|
|
42672
|
+
)),
|
|
42673
|
+
/* @__PURE__ */ React249.createElement(Text, { as: "div", size: "12", color: "primaryText" }, t("transferToken.depositBitcoinLightning"), " ", /* @__PURE__ */ React249.createElement(
|
|
42674
|
+
FunLinkButton,
|
|
42675
|
+
{
|
|
42676
|
+
text: t("transferToken.lightningTryItNow"),
|
|
42677
|
+
onClick,
|
|
42678
|
+
variant: "accent",
|
|
42679
|
+
size: "12",
|
|
42680
|
+
weight: "medium",
|
|
42681
|
+
inline: true
|
|
42682
|
+
}
|
|
42683
|
+
))
|
|
42684
|
+
);
|
|
42685
|
+
};
|
|
42686
|
+
|
|
42753
42687
|
// src/components/BottomLinks/BottomLinks.tsx
|
|
42754
42688
|
import React250 from "react";
|
|
42755
42689
|
|
|
@@ -43182,7 +43116,7 @@ var TransferTokenDetails = ({
|
|
|
43182
43116
|
};
|
|
43183
43117
|
|
|
43184
43118
|
// src/modals/CheckoutModal/TransferToken/useTransferTokenTracking.ts
|
|
43185
|
-
import { useCallback as
|
|
43119
|
+
import { useCallback as useCallback50, useEffect as useEffect69, useRef as useRef34 } from "react";
|
|
43186
43120
|
|
|
43187
43121
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotifications.track.ts
|
|
43188
43122
|
function getNotificationId(item) {
|
|
@@ -43288,7 +43222,7 @@ function useTransferTokenTracking({
|
|
|
43288
43222
|
});
|
|
43289
43223
|
}
|
|
43290
43224
|
}, [depositAddress, fromChainId, toChainId, toTokenAddress]);
|
|
43291
|
-
const trackAddressCopied =
|
|
43225
|
+
const trackAddressCopied = useCallback50(() => {
|
|
43292
43226
|
logEvent({
|
|
43293
43227
|
eventName: "fc::deposit::transfer::address::copied" /* DEPOSIT_TRANSFER_ADDRESS_COPIED */,
|
|
43294
43228
|
metadata: {
|
|
@@ -43297,7 +43231,7 @@ function useTransferTokenTracking({
|
|
|
43297
43231
|
}
|
|
43298
43232
|
});
|
|
43299
43233
|
}, [fromChainId, fromTokenSymbol, logEvent]);
|
|
43300
|
-
const trackImpactExpanded =
|
|
43234
|
+
const trackImpactExpanded = useCallback50(
|
|
43301
43235
|
(estPriceImpactPct) => {
|
|
43302
43236
|
logEvent({
|
|
43303
43237
|
eventName: "fc::deposit::transfer::impact::viewed" /* DEPOSIT_TRANSFER_IMPACT_VIEWED */,
|
|
@@ -43310,7 +43244,7 @@ function useTransferTokenTracking({
|
|
|
43310
43244
|
},
|
|
43311
43245
|
[fromChainId, fromTokenSymbol, logEvent]
|
|
43312
43246
|
);
|
|
43313
|
-
const trackSourceChainChange =
|
|
43247
|
+
const trackSourceChainChange = useCallback50(
|
|
43314
43248
|
(newChainId) => {
|
|
43315
43249
|
if (newChainId === fromChainId) {
|
|
43316
43250
|
return;
|
|
@@ -43326,7 +43260,7 @@ function useTransferTokenTracking({
|
|
|
43326
43260
|
},
|
|
43327
43261
|
[fromChainId, fromTokenSymbol, logEvent]
|
|
43328
43262
|
);
|
|
43329
|
-
const trackSourceTokenChange =
|
|
43263
|
+
const trackSourceTokenChange = useCallback50(
|
|
43330
43264
|
(newTokenSymbol) => {
|
|
43331
43265
|
if (newTokenSymbol === fromTokenSymbol) {
|
|
43332
43266
|
return;
|
|
@@ -43418,7 +43352,7 @@ function useNotificationTracking({
|
|
|
43418
43352
|
}
|
|
43419
43353
|
}
|
|
43420
43354
|
}, [logEvent, status]);
|
|
43421
|
-
const trackDismissal =
|
|
43355
|
+
const trackDismissal = useCallback50(() => {
|
|
43422
43356
|
if (!itemRef.current || !notificationDisplayedAtRef.current) {
|
|
43423
43357
|
return;
|
|
43424
43358
|
}
|
|
@@ -43431,7 +43365,7 @@ function useNotificationTracking({
|
|
|
43431
43365
|
);
|
|
43432
43366
|
reasonRef.current = "dismissed";
|
|
43433
43367
|
}, [logEvent]);
|
|
43434
|
-
const trackShowMore =
|
|
43368
|
+
const trackShowMore = useCallback50(() => {
|
|
43435
43369
|
if (!itemRef.current || !notificationDisplayedAtRef.current) {
|
|
43436
43370
|
return;
|
|
43437
43371
|
}
|
|
@@ -43510,6 +43444,7 @@ function getDepositCreditedEventData(item, addressDisplayedAtMs, notificationDis
|
|
|
43510
43444
|
}
|
|
43511
43445
|
|
|
43512
43446
|
// src/modals/CheckoutModal/TransferToken/TransferToken.tsx
|
|
43447
|
+
import { lightningChain as lightningChain6 } from "@funkit/chains";
|
|
43513
43448
|
var TransferTokenInfo = {
|
|
43514
43449
|
Component: TransferToken,
|
|
43515
43450
|
disableBack: ({ isSourceNavWidgetEnabled }) => isSourceNavWidgetEnabled,
|
|
@@ -43526,11 +43461,28 @@ var TransferTokenInfo = {
|
|
|
43526
43461
|
var TRANSFER_TOKEN_LOG_PREFIX = "transferToken";
|
|
43527
43462
|
function TransferToken({
|
|
43528
43463
|
onNext,
|
|
43464
|
+
onStepChange,
|
|
43529
43465
|
modalState
|
|
43530
43466
|
}) {
|
|
43531
43467
|
const { t } = useFunkitTranslation();
|
|
43532
43468
|
const controls = useAnimationControls4();
|
|
43533
43469
|
const udaParams = useUDAParams();
|
|
43470
|
+
const startBitcoinLightning = useStartBitcoinLightning();
|
|
43471
|
+
const { isLightningEnabled } = usePaymentMethodEnablement();
|
|
43472
|
+
const isBtcLightningBannerEnabled = useFeatureGate(
|
|
43473
|
+
"enable-btc-lightning-banner"
|
|
43474
|
+
);
|
|
43475
|
+
const handleBitcoinLightningClick = () => {
|
|
43476
|
+
logger.info("transferToken_startBitcoinLightning", {
|
|
43477
|
+
chainId: lightningChain6.id
|
|
43478
|
+
});
|
|
43479
|
+
const paymentMethodInfo = startBitcoinLightning();
|
|
43480
|
+
onStepChange({
|
|
43481
|
+
...extractCommonState(modalState),
|
|
43482
|
+
step: "input_amount" /* INPUT_AMOUNT */,
|
|
43483
|
+
paymentMethodInfo
|
|
43484
|
+
});
|
|
43485
|
+
};
|
|
43534
43486
|
const [qrCodeHover, setQrCodeHover] = useState74(false);
|
|
43535
43487
|
const isSourceNavWidgetEnabled = modalState.startingStep === "select_asset" /* SELECT_ASSET */;
|
|
43536
43488
|
const { textCustomizations, uiCustomizations } = useFunkitConfig();
|
|
@@ -43554,6 +43506,7 @@ function TransferToken({
|
|
|
43554
43506
|
transferInit
|
|
43555
43507
|
});
|
|
43556
43508
|
const chainIds = Object.keys(assets).map(Number);
|
|
43509
|
+
const showBitcoinLightningBanner = isBtcLightningBannerEnabled && isLightningEnabled && selectedToken === "BTC";
|
|
43557
43510
|
const {
|
|
43558
43511
|
depositAddress,
|
|
43559
43512
|
depositAddressTooltip,
|
|
@@ -43717,6 +43670,7 @@ function TransferToken({
|
|
|
43717
43670
|
chainIdSortOrder
|
|
43718
43671
|
}
|
|
43719
43672
|
),
|
|
43673
|
+
showBitcoinLightningBanner && /* @__PURE__ */ React257.createElement(BitcoinLightningBanner, { onClick: handleBitcoinLightningClick }),
|
|
43720
43674
|
/* @__PURE__ */ React257.createElement(
|
|
43721
43675
|
Box,
|
|
43722
43676
|
{
|
|
@@ -44177,9 +44131,9 @@ var FiatAccountDetail = {
|
|
|
44177
44131
|
|
|
44178
44132
|
// src/modals/CheckoutModal/VirtualFiatAccount/KycIframe.tsx
|
|
44179
44133
|
import { BridgeCustomerStatus as BridgeCustomerStatus7 } from "@funkit/api-base";
|
|
44180
|
-
import React263, { useCallback as
|
|
44134
|
+
import React263, { useCallback as useCallback51, useEffect as useEffect70, useMemo as useMemo62, useState as useState76 } from "react";
|
|
44181
44135
|
function useIframeListener(listeners, expectedOrigin) {
|
|
44182
|
-
const handleMessage =
|
|
44136
|
+
const handleMessage = useCallback51(
|
|
44183
44137
|
(event) => {
|
|
44184
44138
|
if (!expectedOrigin || event.origin !== expectedOrigin) {
|
|
44185
44139
|
return;
|
|
@@ -44446,7 +44400,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44446
44400
|
useEffect71(() => {
|
|
44447
44401
|
ensureLoadingAccountScreen();
|
|
44448
44402
|
}, [ensureLoadingAccountScreen]);
|
|
44449
|
-
const trackNextState =
|
|
44403
|
+
const trackNextState = useCallback52(
|
|
44450
44404
|
(nextState) => {
|
|
44451
44405
|
const trackEvent = trackEventFromNextState(nextState);
|
|
44452
44406
|
if (trackEvent) {
|
|
@@ -44462,7 +44416,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44462
44416
|
const { clearCheckoutQuoteMessages } = useCheckoutQuoteNotification();
|
|
44463
44417
|
const { getCheckoutProgress } = useCheckoutContext();
|
|
44464
44418
|
const { softHide } = useSoftHiddenCheckout();
|
|
44465
|
-
const onCloseWrapper =
|
|
44419
|
+
const onCloseWrapper = useCallback52(
|
|
44466
44420
|
(options) => {
|
|
44467
44421
|
const normalizedIsNewDeposit = !!options?.isNewDeposit;
|
|
44468
44422
|
const metadata = {
|
|
@@ -44506,7 +44460,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44506
44460
|
const [stateHistory, setHistory] = useState77([]);
|
|
44507
44461
|
const prevStep = useRef36(null);
|
|
44508
44462
|
const hasHistoryEntry = stateHistory.length > 1;
|
|
44509
|
-
const onNext =
|
|
44463
|
+
const onNext = useCallback52(
|
|
44510
44464
|
(payload) => {
|
|
44511
44465
|
if (prevStep.current === modalState.step) {
|
|
44512
44466
|
return;
|
|
@@ -44550,7 +44504,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44550
44504
|
ensureStepQueries
|
|
44551
44505
|
]
|
|
44552
44506
|
);
|
|
44553
|
-
const onStepChange =
|
|
44507
|
+
const onStepChange = useCallback52(
|
|
44554
44508
|
(nextState) => {
|
|
44555
44509
|
if (prevStep.current === modalState.step) {
|
|
44556
44510
|
return;
|
|
@@ -44565,7 +44519,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
44565
44519
|
},
|
|
44566
44520
|
[modalState, animate, trackNextState, ensureStepQueries]
|
|
44567
44521
|
);
|
|
44568
|
-
const onBack =
|
|
44522
|
+
const onBack = useCallback52(() => {
|
|
44569
44523
|
clearCheckoutQuoteMessages();
|
|
44570
44524
|
const backStepOverride = checkoutBackMap[modalState.step];
|
|
44571
44525
|
const prevState = [...stateHistory].reverse().find((s) => s.step === backStepOverride) ?? stateHistory[stateHistory.length - 1];
|
|
@@ -44928,7 +44882,7 @@ var HomeCheckoutDisplayRowSkeleton = () => {
|
|
|
44928
44882
|
|
|
44929
44883
|
// src/modals/ProfileDetails/FunProfileViews/Home/HomeTokenDisplayRow.tsx
|
|
44930
44884
|
import {
|
|
44931
|
-
formatCryptoAndStringify as
|
|
44885
|
+
formatCryptoAndStringify as formatCryptoAndStringify8,
|
|
44932
44886
|
formatCurrencyAndStringify as formatCurrencyAndStringify15,
|
|
44933
44887
|
isMobile as isMobile9
|
|
44934
44888
|
} from "@funkit/utils";
|
|
@@ -44988,7 +44942,7 @@ var HomeTokenBalanceDisplayRow = ({
|
|
|
44988
44942
|
justifyContent: "space-between"
|
|
44989
44943
|
},
|
|
44990
44944
|
/* @__PURE__ */ React268.createElement(Text, { color: "primaryText", size: TEXT_SIZE, weight: "regular" }, asset.name),
|
|
44991
|
-
/* @__PURE__ */ React268.createElement(Text, { color: "secondaryText", size: TEXT_SIZE, weight: "regular" },
|
|
44945
|
+
/* @__PURE__ */ React268.createElement(Text, { color: "secondaryText", size: TEXT_SIZE, weight: "regular" }, formatCryptoAndStringify8(normalizedAmount, asset.symbol))
|
|
44992
44946
|
)
|
|
44993
44947
|
),
|
|
44994
44948
|
/* @__PURE__ */ React268.createElement(Text, { color: "primaryText", size: TEXT_SIZE, weight: "regular" }, formatCurrencyAndStringify15(asset.totalUsdValue || 0))
|
|
@@ -45037,7 +44991,7 @@ var HomeTokenBalanceDisplayRowSkeleton = () => {
|
|
|
45037
44991
|
|
|
45038
44992
|
// src/modals/ProfileDetails/FunProfileViews/Home/ProfileTitleSection.tsx
|
|
45039
44993
|
import React272 from "react";
|
|
45040
|
-
import { useCallback as
|
|
44994
|
+
import { useCallback as useCallback53, useState as useState78 } from "react";
|
|
45041
44995
|
|
|
45042
44996
|
// src/components/FunSelect/FunClickOutside.tsx
|
|
45043
44997
|
import React269 from "react";
|
|
@@ -45130,7 +45084,7 @@ var ProfileTitleSection = ({
|
|
|
45130
45084
|
}) => {
|
|
45131
45085
|
const { t } = useFunkitTranslation();
|
|
45132
45086
|
const [isDisconnectExpanded, setIsDisconnectExpanded] = useState78(false);
|
|
45133
|
-
const collapseDisconnect =
|
|
45087
|
+
const collapseDisconnect = useCallback53(
|
|
45134
45088
|
() => setIsDisconnectExpanded(false),
|
|
45135
45089
|
[]
|
|
45136
45090
|
);
|
|
@@ -45524,13 +45478,13 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
45524
45478
|
DEFAULT_CHECKOUT_HISTORY_DETAIL_TITLE
|
|
45525
45479
|
);
|
|
45526
45480
|
const singleActivityPage = "detail" /* DETAIL */;
|
|
45527
|
-
const resetView =
|
|
45481
|
+
const resetView = useCallback54(() => {
|
|
45528
45482
|
setView(returnView ?? 0 /* HOME */);
|
|
45529
45483
|
setSelectedHomeTab("checkouts" /* CHECKOUTS */);
|
|
45530
45484
|
resetActivityTraversal();
|
|
45531
45485
|
}, [resetActivityTraversal, returnView]);
|
|
45532
45486
|
const { animation, animate } = useAnimatedNavigation(void 0);
|
|
45533
|
-
const onSelectActivityWrapper =
|
|
45487
|
+
const onSelectActivityWrapper = useCallback54(
|
|
45534
45488
|
(activity) => {
|
|
45535
45489
|
onSelectActivity({
|
|
45536
45490
|
...activity,
|
|
@@ -45560,7 +45514,7 @@ function ProfileDetails({ onClose, defaultTab }) {
|
|
|
45560
45514
|
const isSingleActivityView = view === 3 /* SINGLE_ACTIVITY */;
|
|
45561
45515
|
const isCheckoutDetailView = isSingleActivityView && singleActivityPage === "detail" /* DETAIL */;
|
|
45562
45516
|
const withDivider = isSingleActivityView ? "always" : void 0;
|
|
45563
|
-
const handleHelp =
|
|
45517
|
+
const handleHelp = useCallback54(() => {
|
|
45564
45518
|
window.open(CONTACT_US_LINK, "_blank", "noopener");
|
|
45565
45519
|
}, []);
|
|
45566
45520
|
const { onScroll, topbar, withTopDivider } = useCustomStatusAnimationAboveTopbar({
|
|
@@ -45967,7 +45921,7 @@ function ChainModal({ onClose, open }) {
|
|
|
45967
45921
|
import React297, { useEffect as useEffect81, useRef as useRef41 } from "react";
|
|
45968
45922
|
|
|
45969
45923
|
// src/components/FunConnectOptions/FunConnectOptions.tsx
|
|
45970
|
-
import React289, { useCallback as
|
|
45924
|
+
import React289, { useCallback as useCallback55, useMemo as useMemo64, useState as useState83 } from "react";
|
|
45971
45925
|
|
|
45972
45926
|
// src/components/FunConnectOptions/FunConnectResultStep.tsx
|
|
45973
45927
|
import React284, { useEffect as useEffect74 } from "react";
|
|
@@ -46335,7 +46289,7 @@ function FunConnectOptions({
|
|
|
46335
46289
|
const [step, setStep] = useState83(INITIAL_STEP);
|
|
46336
46290
|
const [selectedWallet, setSelectedWallet] = useState83();
|
|
46337
46291
|
const [qrCodeUri, setQrCodeUri] = useState83("");
|
|
46338
|
-
const changeStep =
|
|
46292
|
+
const changeStep = useCallback55((newStep) => {
|
|
46339
46293
|
setStep(newStep);
|
|
46340
46294
|
if (isSignIn(newStep)) {
|
|
46341
46295
|
setSelectedWallet(void 0);
|
|
@@ -46346,7 +46300,7 @@ function FunConnectOptions({
|
|
|
46346
46300
|
navigateTo(0 /* SIGNIN_PRIMARY */, { reverse: true });
|
|
46347
46301
|
};
|
|
46348
46302
|
const walletConnectors = usePreparedWalletConnectors();
|
|
46349
|
-
const onRegenerateQrCode =
|
|
46303
|
+
const onRegenerateQrCode = useCallback55(
|
|
46350
46304
|
async (wallet) => {
|
|
46351
46305
|
const sWallet = walletConnectors.find((w) => wallet.id === w.id);
|
|
46352
46306
|
const uri = await sWallet?.getQrCodeUri?.();
|
|
@@ -46354,7 +46308,7 @@ function FunConnectOptions({
|
|
|
46354
46308
|
},
|
|
46355
46309
|
[walletConnectors]
|
|
46356
46310
|
);
|
|
46357
|
-
const connectToWallet =
|
|
46311
|
+
const connectToWallet = useCallback55(
|
|
46358
46312
|
async (wallet) => {
|
|
46359
46313
|
if (!wallet.ready) {
|
|
46360
46314
|
return;
|
|
@@ -46373,7 +46327,7 @@ function FunConnectOptions({
|
|
|
46373
46327
|
},
|
|
46374
46328
|
[changeStep, onRegenerateQrCode]
|
|
46375
46329
|
);
|
|
46376
|
-
const handleRetry =
|
|
46330
|
+
const handleRetry = useCallback55(() => {
|
|
46377
46331
|
if (selectedWallet) {
|
|
46378
46332
|
changeStep(1 /* PENDING_WALLET */);
|
|
46379
46333
|
connectToWallet(selectedWallet);
|
|
@@ -46546,7 +46500,7 @@ function CheckoutModalPrefetchedHooks() {
|
|
|
46546
46500
|
|
|
46547
46501
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotifications.tsx
|
|
46548
46502
|
import clsx26 from "clsx";
|
|
46549
|
-
import React296, { useCallback as
|
|
46503
|
+
import React296, { useCallback as useCallback57, useEffect as useEffect79, useMemo as useMemo65, useState as useState85 } from "react";
|
|
46550
46504
|
|
|
46551
46505
|
// src/components/FunNotificationBanner/FunNotificationShowMoreButton.tsx
|
|
46552
46506
|
import React291 from "react";
|
|
@@ -46675,7 +46629,7 @@ var showMoreButtonStyle = "_4yitd93 _1rsrm2f1r4 _1rsrm2f1i _1rsrm2f1f _1rsrm2f11
|
|
|
46675
46629
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.tsx
|
|
46676
46630
|
import clsx24 from "clsx";
|
|
46677
46631
|
import { motion as motion18, useAnimate as useAnimate3 } from "motion/react";
|
|
46678
|
-
import React292, { useCallback as
|
|
46632
|
+
import React292, { useCallback as useCallback56, useEffect as useEffect77, useRef as useRef39 } from "react";
|
|
46679
46633
|
|
|
46680
46634
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.css.ts
|
|
46681
46635
|
var STATUS_SPINNER_BOTTOM_POSITION = -5;
|
|
@@ -46924,7 +46878,7 @@ var FunNotificationBannerIcon = ({
|
|
|
46924
46878
|
fallbackIconUrl = FALLBACK_ASSET
|
|
46925
46879
|
}) => {
|
|
46926
46880
|
const [animationScope, animate] = useAnimate3();
|
|
46927
|
-
const triggerAnimationProcessingToCompleted =
|
|
46881
|
+
const triggerAnimationProcessingToCompleted = useCallback56(async () => {
|
|
46928
46882
|
const completedIconPath = document.querySelector(
|
|
46929
46883
|
`.${generateAnimationPrefixClassName("icon-wrapper-completed")} path`
|
|
46930
46884
|
);
|
|
@@ -47031,7 +46985,7 @@ var FunNotificationBannerIcon = ({
|
|
|
47031
46985
|
)
|
|
47032
46986
|
]);
|
|
47033
46987
|
}, [animate]);
|
|
47034
|
-
const triggerAnimationDelayedToFailed =
|
|
46988
|
+
const triggerAnimationDelayedToFailed = useCallback56(async () => {
|
|
47035
46989
|
await Promise.all([
|
|
47036
46990
|
animate(
|
|
47037
46991
|
`.${generateAnimationPrefixClassName("icon-wrapper")}`,
|
|
@@ -47413,13 +47367,13 @@ var FunNotificationBanner = ({
|
|
|
47413
47367
|
import {
|
|
47414
47368
|
getCheckoutByDepositAddress as getCheckoutByDepositAddress2
|
|
47415
47369
|
} from "@funkit/api-base";
|
|
47416
|
-
import { useQuery as
|
|
47370
|
+
import { useQuery as useQuery28 } from "@tanstack/react-query";
|
|
47417
47371
|
var useCheckout = (depositAddress, initial) => {
|
|
47418
47372
|
const { apiKey } = useFunkitConfig();
|
|
47419
47373
|
const { itemRefresh } = useDynamicConfig(
|
|
47420
47374
|
"checkoutnotificationsrefreshinterval"
|
|
47421
47375
|
);
|
|
47422
|
-
const query =
|
|
47376
|
+
const query = useQuery28({
|
|
47423
47377
|
queryKey: ["checkouts", "checkout", depositAddress],
|
|
47424
47378
|
queryFn: () => getCheckoutByDepositAddress2({
|
|
47425
47379
|
// biome-ignore lint/style/noNonNullAssertion: already checked for null
|
|
@@ -47612,8 +47566,6 @@ function getNotificationContent(message, status, defaultMessage) {
|
|
|
47612
47566
|
}
|
|
47613
47567
|
var getNotificationProcessingConfig = ({
|
|
47614
47568
|
t,
|
|
47615
|
-
isFasterNotificationsEnabled,
|
|
47616
|
-
isLighter,
|
|
47617
47569
|
isSyntheticDE
|
|
47618
47570
|
}) => {
|
|
47619
47571
|
if (isSyntheticDE) {
|
|
@@ -47622,21 +47574,9 @@ var getNotificationProcessingConfig = ({
|
|
|
47622
47574
|
description: t("transaction.depositWillBeginProcessing")
|
|
47623
47575
|
};
|
|
47624
47576
|
}
|
|
47625
|
-
if (isFasterNotificationsEnabled) {
|
|
47626
|
-
return {
|
|
47627
|
-
title: t("transaction.depositProcessing"),
|
|
47628
|
-
description: t("transaction.depositWillBeCompletedSoon")
|
|
47629
|
-
};
|
|
47630
|
-
}
|
|
47631
|
-
if (isLighter) {
|
|
47632
|
-
return {
|
|
47633
|
-
title: t("transaction.depositReceivedProcessing"),
|
|
47634
|
-
description: t("transaction.depositWillBeCreditedLighterNative")
|
|
47635
|
-
};
|
|
47636
|
-
}
|
|
47637
47577
|
return {
|
|
47638
|
-
title: t("transaction.
|
|
47639
|
-
description: t("transaction.
|
|
47578
|
+
title: t("transaction.depositProcessing"),
|
|
47579
|
+
description: t("transaction.depositWillBeCompletedSoon")
|
|
47640
47580
|
};
|
|
47641
47581
|
};
|
|
47642
47582
|
var DirectExecutionNotification = ({
|
|
@@ -47647,15 +47587,8 @@ var DirectExecutionNotification = ({
|
|
|
47647
47587
|
const { t } = useFunkitTranslation();
|
|
47648
47588
|
const { initSettings } = directExecution.clientMetadata;
|
|
47649
47589
|
const { isCompleted, isDelayed: isDelayed2, isFailed, isProcessing, isRefunded } = useMultiStepDirectExecutionStatus(directExecution);
|
|
47650
|
-
const { apiKey } = useFunkitConfig();
|
|
47651
|
-
const isFasterNotificationsEnabled = useFeatureGate("faster-notifications");
|
|
47652
|
-
const isLighter = isLighterSlowDeposit(apiKey, {
|
|
47653
|
-
targetChain: directExecution.toChainId
|
|
47654
|
-
});
|
|
47655
47590
|
const notificationProcessingConfig = getNotificationProcessingConfig({
|
|
47656
47591
|
t,
|
|
47657
|
-
isFasterNotificationsEnabled,
|
|
47658
|
-
isLighter,
|
|
47659
47592
|
isSyntheticDE: !!directExecution.isDepositDetectionDE
|
|
47660
47593
|
});
|
|
47661
47594
|
const titleConfig = {
|
|
@@ -47839,7 +47772,7 @@ var CheckoutNotifications = ({
|
|
|
47839
47772
|
}, [isExpanded, combinedNotifications]);
|
|
47840
47773
|
const handleNotificationClose = (id) => setClosedNotifications((prev) => [...prev, id]);
|
|
47841
47774
|
const { logEvent } = useTrack();
|
|
47842
|
-
const handleNewNotification =
|
|
47775
|
+
const handleNewNotification = useCallback57(
|
|
47843
47776
|
(item) => {
|
|
47844
47777
|
const trackEvent = trackEventFromNotification(item);
|
|
47845
47778
|
logEvent(trackEvent);
|
|
@@ -48227,16 +48160,16 @@ function ConnectModal({ onClose, open }) {
|
|
|
48227
48160
|
function useModalStateValue() {
|
|
48228
48161
|
const [isModalOpen, setModalOpen] = useState86(false);
|
|
48229
48162
|
return {
|
|
48230
|
-
closeModal:
|
|
48163
|
+
closeModal: useCallback58(() => setModalOpen(false), []),
|
|
48231
48164
|
isModalOpen,
|
|
48232
|
-
openModal:
|
|
48165
|
+
openModal: useCallback58(() => setModalOpen(true), [])
|
|
48233
48166
|
};
|
|
48234
48167
|
}
|
|
48235
48168
|
function useModalStateValueWithProp() {
|
|
48236
48169
|
const [isModalOpen, setModalOpen] = useState86(false);
|
|
48237
48170
|
const [prop, setProp] = useState86(null);
|
|
48238
48171
|
return {
|
|
48239
|
-
closeModal:
|
|
48172
|
+
closeModal: useCallback58(() => {
|
|
48240
48173
|
setTimeout(
|
|
48241
48174
|
() => {
|
|
48242
48175
|
setProp(null);
|
|
@@ -48247,7 +48180,7 @@ function useModalStateValueWithProp() {
|
|
|
48247
48180
|
}, []),
|
|
48248
48181
|
isModalOpen,
|
|
48249
48182
|
prop,
|
|
48250
|
-
openModal:
|
|
48183
|
+
openModal: useCallback58((prop2) => {
|
|
48251
48184
|
if (prop2 != null) {
|
|
48252
48185
|
setProp(prop2);
|
|
48253
48186
|
}
|
|
@@ -48292,19 +48225,19 @@ function ModalProvider({ children }) {
|
|
|
48292
48225
|
prop: funCheckoutModalId
|
|
48293
48226
|
} = useModalStateValueWithProp();
|
|
48294
48227
|
const [softHiddenCheckoutId, setSoftHiddenCheckoutId] = useState86(null);
|
|
48295
|
-
const softHideFunCheckoutModal =
|
|
48228
|
+
const softHideFunCheckoutModal = useCallback58(() => {
|
|
48296
48229
|
if (funCheckoutModalId) {
|
|
48297
48230
|
setSoftHiddenCheckoutId(funCheckoutModalId);
|
|
48298
48231
|
}
|
|
48299
48232
|
closeFunCheckoutModal();
|
|
48300
48233
|
}, [funCheckoutModalId, closeFunCheckoutModal]);
|
|
48301
|
-
const resumeSoftHiddenCheckout =
|
|
48234
|
+
const resumeSoftHiddenCheckout = useCallback58(() => {
|
|
48302
48235
|
if (softHiddenCheckoutId) {
|
|
48303
48236
|
openFunCheckoutModal(softHiddenCheckoutId);
|
|
48304
48237
|
setSoftHiddenCheckoutId(null);
|
|
48305
48238
|
}
|
|
48306
48239
|
}, [softHiddenCheckoutId, openFunCheckoutModal]);
|
|
48307
|
-
const discardSoftHiddenCheckout =
|
|
48240
|
+
const discardSoftHiddenCheckout = useCallback58(() => {
|
|
48308
48241
|
setSoftHiddenCheckoutId(null);
|
|
48309
48242
|
}, []);
|
|
48310
48243
|
const {
|
|
@@ -48522,13 +48455,13 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48522
48455
|
activeCheckout?.initSettings.config?.dynamicRoutingId
|
|
48523
48456
|
);
|
|
48524
48457
|
const [checkoutsProgress, setCheckoutsProgress] = useState87({});
|
|
48525
|
-
const getCheckoutProgress =
|
|
48458
|
+
const getCheckoutProgress = useCallback59(
|
|
48526
48459
|
(checkoutId) => {
|
|
48527
48460
|
return checkoutsProgress[checkoutId];
|
|
48528
48461
|
},
|
|
48529
48462
|
[checkoutsProgress]
|
|
48530
48463
|
);
|
|
48531
|
-
const setCheckoutProgress =
|
|
48464
|
+
const setCheckoutProgress = useCallback59(
|
|
48532
48465
|
(checkoutId, progress) => {
|
|
48533
48466
|
setCheckoutsProgress((data) => ({ ...data, [checkoutId]: progress }));
|
|
48534
48467
|
},
|
|
@@ -48550,7 +48483,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48550
48483
|
});
|
|
48551
48484
|
}
|
|
48552
48485
|
);
|
|
48553
|
-
const initNewWithdrawal =
|
|
48486
|
+
const initNewWithdrawal = useCallback59(
|
|
48554
48487
|
(props, checkoutConfig) => {
|
|
48555
48488
|
const { onWithdrawalConfirmation, onWithdrawalError, config } = props;
|
|
48556
48489
|
const newWithdrawalId = uuid2();
|
|
@@ -48600,7 +48533,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48600
48533
|
},
|
|
48601
48534
|
[logEvent, startMeasuredEvent]
|
|
48602
48535
|
);
|
|
48603
|
-
const initNewCheckout =
|
|
48536
|
+
const initNewCheckout = useCallback59(
|
|
48604
48537
|
({ config, ...initSettings }) => {
|
|
48605
48538
|
const newCheckoutId = uuid2();
|
|
48606
48539
|
const newActiveCheckoutItem = {
|
|
@@ -48622,9 +48555,9 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48622
48555
|
config: {
|
|
48623
48556
|
...config,
|
|
48624
48557
|
// Solana is case-sensitive for SPL token addresses, so we should not lowercase the target asset address here
|
|
48625
|
-
targetAsset: config.targetChain.toString() === SOLANA_MAINNET_CHAIN_ID2.toString() && !
|
|
48626
|
-
|
|
48627
|
-
|
|
48558
|
+
targetAsset: config.targetChain.toString() === SOLANA_MAINNET_CHAIN_ID2.toString() && !isEVMAddressEquivalent5({
|
|
48559
|
+
firstAddress: NATIVE_TOKEN,
|
|
48560
|
+
secondAddress: config.targetAsset
|
|
48628
48561
|
}) ? config.targetAsset : config.targetAsset.toLowerCase(),
|
|
48629
48562
|
targetChain: config.targetChain.toString(),
|
|
48630
48563
|
targetAssetAmount: config.targetAssetAmount === void 0 ? config.targetAssetAmount : Number.parseFloat(config.targetAssetAmount.toString()) || 0
|
|
@@ -48690,7 +48623,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48690
48623
|
});
|
|
48691
48624
|
}
|
|
48692
48625
|
);
|
|
48693
|
-
const startDirectExecutionCheckout =
|
|
48626
|
+
const startDirectExecutionCheckout = useCallback59(
|
|
48694
48627
|
async ({
|
|
48695
48628
|
stepMessageSetter,
|
|
48696
48629
|
latestQuote,
|
|
@@ -48841,7 +48774,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
48841
48774
|
udaParams
|
|
48842
48775
|
]
|
|
48843
48776
|
);
|
|
48844
|
-
const startRegularCheckout =
|
|
48777
|
+
const startRegularCheckout = useCallback59(
|
|
48845
48778
|
async ({
|
|
48846
48779
|
stepMessageSetter,
|
|
48847
48780
|
latestQuote,
|
|
@@ -49132,14 +49065,14 @@ function useFunkitCheckout(props) {
|
|
|
49132
49065
|
resume: resumeSoftHiddenCheckout,
|
|
49133
49066
|
discard: discardSoftHiddenCheckout
|
|
49134
49067
|
} = useSoftHiddenCheckout();
|
|
49135
|
-
const onErrorWrapper =
|
|
49068
|
+
const onErrorWrapper = useCallback59(
|
|
49136
49069
|
(payload) => {
|
|
49137
49070
|
logger.warn(payload.message, payload);
|
|
49138
49071
|
onError?.(payload);
|
|
49139
49072
|
},
|
|
49140
49073
|
[onError]
|
|
49141
49074
|
);
|
|
49142
|
-
const onOpenWrapper =
|
|
49075
|
+
const onOpenWrapper = useCallback59(
|
|
49143
49076
|
(newId) => {
|
|
49144
49077
|
props?.onOpen?.();
|
|
49145
49078
|
openFunCheckoutModal?.(newId);
|
|
@@ -49378,9 +49311,9 @@ async function validateCheckoutConfig(config, apiKey) {
|
|
|
49378
49311
|
};
|
|
49379
49312
|
}
|
|
49380
49313
|
var hasSufficientBalance = async (wagmiConfig, walletAddress, tokenAddress, tokenChainId, requiredAssetAmount) => {
|
|
49381
|
-
const finalTokenAddress =
|
|
49382
|
-
|
|
49383
|
-
|
|
49314
|
+
const finalTokenAddress = isEVMAddressEquivalent6({
|
|
49315
|
+
firstAddress: tokenAddress,
|
|
49316
|
+
secondAddress: FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS5
|
|
49384
49317
|
}) ? void 0 : tokenAddress;
|
|
49385
49318
|
const data = await getBalance(wagmiConfig, {
|
|
49386
49319
|
address: walletAddress,
|
|
@@ -49419,16 +49352,10 @@ function getCheckoutReceivedAmountFormatted({
|
|
|
49419
49352
|
quote
|
|
49420
49353
|
}) {
|
|
49421
49354
|
const targetTokenAmount = getCheckoutReceivedAmount({ config, quote });
|
|
49422
|
-
const { finalizedTokenAmount } = computeDisplayDestinationToken(
|
|
49423
|
-
config,
|
|
49424
|
-
targetTokenAmount
|
|
49425
|
-
);
|
|
49426
49355
|
const feeBreakdown = quote?.baseQuote.metadata?.feeBreakdown;
|
|
49427
49356
|
const isAcross = isAcrossRoute(quote?.baseQuote.metadata);
|
|
49428
|
-
const swapImpactPct =
|
|
49429
|
-
return
|
|
49430
|
-
finalizedTokenAmount * (1 + swapImpactPct / 100)
|
|
49431
|
-
);
|
|
49357
|
+
const swapImpactPct = config?.generateActionsParams && !isAcross ? feeBreakdown?.swapImpact || 0 : 0;
|
|
49358
|
+
return formatCryptoAndStringify9(targetTokenAmount * (1 + swapImpactPct / 100));
|
|
49432
49359
|
}
|
|
49433
49360
|
function getCheckoutSentAmount({
|
|
49434
49361
|
quote
|
|
@@ -49442,7 +49369,7 @@ function getCheckoutSentAmountFormatted({
|
|
|
49442
49369
|
quote
|
|
49443
49370
|
}) {
|
|
49444
49371
|
const sourceTokenAmount = getCheckoutSentAmount({ quote });
|
|
49445
|
-
return
|
|
49372
|
+
return formatCryptoAndStringify9(sourceTokenAmount);
|
|
49446
49373
|
}
|
|
49447
49374
|
function getCheckoutItemDisplay({
|
|
49448
49375
|
checkoutConfig,
|
|
@@ -49457,9 +49384,9 @@ function getCheckoutItemDisplay({
|
|
|
49457
49384
|
const displayAmount = overrideAmount ?? targetAssetAmount;
|
|
49458
49385
|
const itemName = targetAssetTicker || checkoutItemTitle;
|
|
49459
49386
|
if (isCheckoutPostActionRequired(checkoutConfig)) {
|
|
49460
|
-
return !hideAmount && displayAmount > 0 ?
|
|
49387
|
+
return !hideAmount && displayAmount > 0 ? formatCryptoAndStringify9(round3(displayAmount, 5), itemName) : itemName;
|
|
49461
49388
|
}
|
|
49462
|
-
return hideAmount ? itemName :
|
|
49389
|
+
return hideAmount ? itemName : formatCryptoAndStringify9(displayAmount, itemName);
|
|
49463
49390
|
}
|
|
49464
49391
|
function getBaseQuoteTotalFeesFromAmount(baseQuote) {
|
|
49465
49392
|
const sourceAssetBaseAmount = Number(baseQuote.estSubtotalFromAmount);
|
|
@@ -49498,8 +49425,8 @@ async function getTokenDecimals(wagmiConfig, chainId2, tokenAddress) {
|
|
|
49498
49425
|
if (chainId2 === tronChain4.id.toString()) {
|
|
49499
49426
|
return tronChain4.nativeCurrency.decimals;
|
|
49500
49427
|
}
|
|
49501
|
-
if (chainId2 ===
|
|
49502
|
-
return
|
|
49428
|
+
if (chainId2 === lightningChain7.id.toString()) {
|
|
49429
|
+
return lightningChain7.nativeCurrency.decimals;
|
|
49503
49430
|
}
|
|
49504
49431
|
const decimals = await readContract(wagmiConfig, {
|
|
49505
49432
|
address: tokenAddress,
|
|
@@ -49544,42 +49471,6 @@ function isCheckoutPostActionRequired(config) {
|
|
|
49544
49471
|
}
|
|
49545
49472
|
return typeof actionCallback === "function";
|
|
49546
49473
|
}
|
|
49547
|
-
function isVaultDepositCheckout(checkoutConfig, sourceHolding) {
|
|
49548
|
-
return Boolean(
|
|
49549
|
-
checkoutConfig.finalizedToken && sourceHolding && checkoutConfig.generateActionsParams && isTokenEquivalent14({
|
|
49550
|
-
firstTokenChainId: checkoutConfig.targetChain,
|
|
49551
|
-
firstTokenAddress: checkoutConfig.targetAsset,
|
|
49552
|
-
secondTokenChainId: sourceHolding.chainId,
|
|
49553
|
-
secondTokenAddress: sourceHolding.tokenAddress
|
|
49554
|
-
})
|
|
49555
|
-
);
|
|
49556
|
-
}
|
|
49557
|
-
function computeDisplayDestinationToken(checkoutConfig, displayAssetAmount) {
|
|
49558
|
-
if (!checkoutConfig) {
|
|
49559
|
-
return {
|
|
49560
|
-
finalizedTokenAmount: displayAssetAmount,
|
|
49561
|
-
finalizedTokenSymbol: "",
|
|
49562
|
-
finalizedTokenIcon: ""
|
|
49563
|
-
};
|
|
49564
|
-
}
|
|
49565
|
-
const { finalizedToken, targetAssetTicker } = checkoutConfig;
|
|
49566
|
-
const targetToken = checkoutConfig.dynamicTargetAssetCandidates?.find(
|
|
49567
|
-
(cand) => isTokenEquivalent14({
|
|
49568
|
-
firstTokenChainId: cand.tokenChainId,
|
|
49569
|
-
firstTokenAddress: cand.tokenAddress,
|
|
49570
|
-
secondTokenChainId: checkoutConfig.targetChain,
|
|
49571
|
-
secondTokenAddress: checkoutConfig.targetAsset
|
|
49572
|
-
})
|
|
49573
|
-
);
|
|
49574
|
-
const finalizedTokenAmount = (targetToken?.finalizedTokenRate ?? 1) * displayAssetAmount;
|
|
49575
|
-
const finalizedTokenSymbol = finalizedToken?.tokenSymbol ?? targetAssetTicker;
|
|
49576
|
-
const finalizedTokenIcon = finalizedToken?.iconSrc ?? targetToken?.iconSrc ?? checkoutConfig.iconSrc ?? "";
|
|
49577
|
-
return {
|
|
49578
|
-
finalizedTokenAmount,
|
|
49579
|
-
finalizedTokenSymbol,
|
|
49580
|
-
finalizedTokenIcon
|
|
49581
|
-
};
|
|
49582
|
-
}
|
|
49583
49474
|
function computeSwitcherDisplayToken({
|
|
49584
49475
|
checkoutConfig,
|
|
49585
49476
|
displayAssetAmount,
|
|
@@ -49589,8 +49480,10 @@ function computeSwitcherDisplayToken({
|
|
|
49589
49480
|
if (isExactIn) {
|
|
49590
49481
|
return { amount: displayAssetAmount, symbol: sourceTokenSymbol ?? "" };
|
|
49591
49482
|
}
|
|
49592
|
-
|
|
49593
|
-
|
|
49483
|
+
return {
|
|
49484
|
+
amount: displayAssetAmount,
|
|
49485
|
+
symbol: checkoutConfig?.targetAssetTicker ?? ""
|
|
49486
|
+
};
|
|
49594
49487
|
}
|
|
49595
49488
|
|
|
49596
49489
|
// src/domains/asset.ts
|
|
@@ -49622,9 +49515,9 @@ function isPreferredChain(chainId2, additionalChains = []) {
|
|
|
49622
49515
|
return chains.has(chainId2);
|
|
49623
49516
|
}
|
|
49624
49517
|
function isNativeTokenAddress(address) {
|
|
49625
|
-
return
|
|
49626
|
-
|
|
49627
|
-
|
|
49518
|
+
return isEVMAddressEquivalent7({
|
|
49519
|
+
firstAddress: address,
|
|
49520
|
+
secondAddress: NATIVE_TOKEN
|
|
49628
49521
|
});
|
|
49629
49522
|
}
|
|
49630
49523
|
var isPolygonEcosystemToken = (chainId2, tokenAddress) => chainId2 === polygon7.id.toString() && tokenAddress === "0x0000000000000000000000000000000000001010";
|
|
@@ -49651,13 +49544,7 @@ var isAssetUsableToPayForCheckout = ({
|
|
|
49651
49544
|
return false;
|
|
49652
49545
|
}
|
|
49653
49546
|
if (isCheckoutPostActionRequired(config)) {
|
|
49654
|
-
|
|
49655
|
-
return finalizedToken && isTokenEquivalent15({
|
|
49656
|
-
firstTokenChainId: targetChainId,
|
|
49657
|
-
firstTokenAddress: targetTokenAddress,
|
|
49658
|
-
secondTokenChainId: finalizedToken.tokenChainId,
|
|
49659
|
-
secondTokenAddress: finalizedToken.tokenAddress
|
|
49660
|
-
});
|
|
49547
|
+
return false;
|
|
49661
49548
|
}
|
|
49662
49549
|
return paymentMethod === PaymentMethod.ACCOUNT_BALANCE && finalCheckoutRecipient.toLowerCase() === payerAddress.toLowerCase() && isTokenEquivalent15({
|
|
49663
49550
|
firstTokenChainId: targetChainId,
|
|
@@ -49782,7 +49669,7 @@ var useWalletAssets = ({
|
|
|
49782
49669
|
} = {}) => {
|
|
49783
49670
|
const { address, isConnected } = useAccount();
|
|
49784
49671
|
const { apiKey } = useFunkitConfig();
|
|
49785
|
-
const { data, isLoading, isFetching } =
|
|
49672
|
+
const { data, isLoading, isFetching } = useQuery29({
|
|
49786
49673
|
queryKey: ["getWalletAssets", address, apiKey],
|
|
49787
49674
|
meta: stepQueryMeta({
|
|
49788
49675
|
name: "walletAssets",
|