@funkit/connect 6.14.20 → 6.14.22
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 +19 -0
- package/dist/components/FunPayments/FunPaymentMoonpayType.css.d.ts +2 -0
- package/dist/components/FunPayments/FunPaymentMoonpayType.d.ts +12 -0
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.experiment.d.ts +13 -0
- package/dist/components/Icons/ArrowTwoWayIcon.d.ts +6 -0
- package/dist/consts/moonpay.d.ts +10 -0
- package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -1
- package/dist/index.js +82 -92
- package/dist/modals/CheckoutModal/MoonpaySetup.d.ts +17 -0
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/moonpay.d.ts +10 -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 +72 -72
- 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 +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 6.14.22
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 62ea9d1: fix: fix versioning issue
|
|
8
|
+
- Updated dependencies [62ea9d1]
|
|
9
|
+
- @funkit/api-base@1.12.14
|
|
10
|
+
- @funkit/chains@0.4.3
|
|
11
|
+
- @funkit/core@2.3.59
|
|
12
|
+
- @funkit/fun-relay@2.1.9
|
|
13
|
+
- @funkit/utils@1.1.16
|
|
14
|
+
- @funkit/wagmi-tools@3.0.82
|
|
15
|
+
|
|
16
|
+
## 6.14.21
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 12607cd: chore(connect): fix bluvo tracking
|
|
21
|
+
|
|
3
22
|
## 6.14.20
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
export interface FunPaymentMoonpayProps {
|
|
4
|
+
paymentAddress: Address;
|
|
5
|
+
depositToken: string;
|
|
6
|
+
depositTokenChainId: string;
|
|
7
|
+
depositTokenAmount: number;
|
|
8
|
+
onUnsupportedRegion: () => void;
|
|
9
|
+
onTransactionCreated: () => void;
|
|
10
|
+
onTransactionCompleted: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function FunPaymentMoonpayType({ paymentAddress, depositToken, depositTokenChainId, depositTokenAmount, onTransactionCompleted, onUnsupportedRegion, onTransactionCreated, }: FunPaymentMoonpayProps): React.JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
3
|
+
import { type FeeLineItemProps, type PaymentFeesSummaryProps } from './PaymentFeesSummary';
|
|
4
|
+
export declare enum FEE_SECTION_VARIANT {
|
|
5
|
+
A = "A",
|
|
6
|
+
B = "B",
|
|
7
|
+
C = "C"
|
|
8
|
+
}
|
|
9
|
+
export declare const PaymentSummaryFeeLineItemExperiment: ({ isExpandable, isExpanded, isLoading, label, value, valueIcon, variant, checkoutItem, quote, }: FeeLineItemProps & {
|
|
10
|
+
variant: FEE_SECTION_VARIANT;
|
|
11
|
+
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
12
|
+
quote: PaymentFeesSummaryProps["quote"];
|
|
13
|
+
}) => React.JSX.Element;
|
|
@@ -14,6 +14,7 @@ export declare function useCheckoutAccountBalanceTransfer(): {
|
|
|
14
14
|
bypassInit: boolean;
|
|
15
15
|
apiKey?: string;
|
|
16
16
|
nonce?: bigint | undefined;
|
|
17
|
+
logger?: import("@funkit/api-base").Logger | undefined;
|
|
17
18
|
fee?: {
|
|
18
19
|
token?: string;
|
|
19
20
|
amount?: number;
|
|
@@ -21,7 +22,6 @@ export declare function useCheckoutAccountBalanceTransfer(): {
|
|
|
21
22
|
recipient: import("viem").Address;
|
|
22
23
|
} | undefined;
|
|
23
24
|
skipDBAction?: boolean | undefined;
|
|
24
|
-
logger?: import("@funkit/api-base").Logger | undefined;
|
|
25
25
|
};
|
|
26
26
|
} | {
|
|
27
27
|
rFunWallet: null;
|
|
@@ -9,7 +9,7 @@ export declare const PAYMENT_METHOD_ICONS: Record<Exclude<PaymentMethod, Payment
|
|
|
9
9
|
* if no SDK icons available, show icon from wagmi
|
|
10
10
|
* otherwise show fallback icon EVM
|
|
11
11
|
*/
|
|
12
|
-
export declare function usePaymentMethodIcon(paymentMethod: PaymentMethod, iconSize?: number): string | number | boolean |
|
|
12
|
+
export declare function usePaymentMethodIcon(paymentMethod: PaymentMethod, iconSize?: number): string | number | boolean | React.JSX.Element | Iterable<React.ReactNode> | null | undefined;
|
|
13
13
|
interface PaymentMethodInfoLabel {
|
|
14
14
|
text: string;
|
|
15
15
|
icon: ReactNode;
|
package/dist/index.js
CHANGED
|
@@ -416,7 +416,7 @@ function Avatar({ address, imageUrl, loading, size }) {
|
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
// src/components/ConnectButton/ConnectButton.tsx
|
|
419
|
-
import React245, { useEffect as
|
|
419
|
+
import React245, { useEffect as useEffect60, useState as useState76 } from "react";
|
|
420
420
|
|
|
421
421
|
// src/css/touchableStyles.css.ts
|
|
422
422
|
var active = { shrink: "_7rkubb8", shrinkSm: "_7rkubb9" };
|
|
@@ -524,7 +524,7 @@ import React242, {
|
|
|
524
524
|
createContext as createContext17,
|
|
525
525
|
useCallback as useCallback56,
|
|
526
526
|
useContext as useContext17,
|
|
527
|
-
useEffect as
|
|
527
|
+
useEffect as useEffect58,
|
|
528
528
|
useMemo as useMemo48,
|
|
529
529
|
useState as useState73
|
|
530
530
|
} from "react";
|
|
@@ -1092,7 +1092,7 @@ import React241, {
|
|
|
1092
1092
|
createContext as createContext16,
|
|
1093
1093
|
useCallback as useCallback55,
|
|
1094
1094
|
useContext as useContext16,
|
|
1095
|
-
useEffect as
|
|
1095
|
+
useEffect as useEffect57,
|
|
1096
1096
|
useMemo as useMemo47,
|
|
1097
1097
|
useState as useState72
|
|
1098
1098
|
} from "react";
|
|
@@ -1471,7 +1471,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
1471
1471
|
localStorage.setItem(storageKey, version);
|
|
1472
1472
|
}
|
|
1473
1473
|
function getCurrentSdkVersion() {
|
|
1474
|
-
return "6.14.
|
|
1474
|
+
return "6.14.22";
|
|
1475
1475
|
}
|
|
1476
1476
|
function useFingerprint() {
|
|
1477
1477
|
const fingerprint = useCallback2(() => {
|
|
@@ -16370,7 +16370,7 @@ function useAnimatedNavigation(callback) {
|
|
|
16370
16370
|
|
|
16371
16371
|
// src/components/FunCheckoutModalHeightAnimationWrapper/FunCheckoutModalHeightAnimationWrapper.tsx
|
|
16372
16372
|
import { motion as motion11 } from "motion/react";
|
|
16373
|
-
import React195, { useEffect as
|
|
16373
|
+
import React195, { useEffect as useEffect48, useRef as useRef26, useState as useState60 } from "react";
|
|
16374
16374
|
|
|
16375
16375
|
// src/modals/CheckoutModal/stepTransition.ts
|
|
16376
16376
|
import {
|
|
@@ -18710,7 +18710,6 @@ function BrokerageSuccessModal({
|
|
|
18710
18710
|
// src/modals/CheckoutModal/Brokerage/BrokerageTwoFA.tsx
|
|
18711
18711
|
import { ClientError as ClientError3, FlagKey as FlagKey19 } from "@funkit/utils";
|
|
18712
18712
|
import React118, {
|
|
18713
|
-
useEffect as useEffect33,
|
|
18714
18713
|
useState as useState34
|
|
18715
18714
|
} from "react";
|
|
18716
18715
|
import { createPortal as createPortal7 } from "react-dom";
|
|
@@ -18804,7 +18803,6 @@ function BrokerageTwoFA({
|
|
|
18804
18803
|
const [kycRequired, setKycRequired] = useState34(false);
|
|
18805
18804
|
const exchange = bluvoClient?.context?.exchange;
|
|
18806
18805
|
const brokerName = capitalize2(exchange || "Brokerage");
|
|
18807
|
-
const bluvoWithdrawalComplete = bluvoClient?.isWithdrawalComplete;
|
|
18808
18806
|
const executionStatus = /* @__PURE__ */ (() => {
|
|
18809
18807
|
return "mfaRequired" /* mfaRequired */;
|
|
18810
18808
|
})();
|
|
@@ -18851,29 +18849,6 @@ function BrokerageTwoFA({
|
|
|
18851
18849
|
kycRequired
|
|
18852
18850
|
]);
|
|
18853
18851
|
const { logEvent } = useTrack();
|
|
18854
|
-
const logToStatsigEffect = useEffectEvent((eoaAddress) => {
|
|
18855
|
-
logEvent({
|
|
18856
|
-
eventName: "fc::success::bluvo_withdrawal_completed" /* BLUVO_WITHDRAWAL_COMPLETED */,
|
|
18857
|
-
metadata: {
|
|
18858
|
-
eoaAddress,
|
|
18859
|
-
exchangeType,
|
|
18860
|
-
quote: bluvoClient.context?.quote
|
|
18861
|
-
}
|
|
18862
|
-
});
|
|
18863
|
-
});
|
|
18864
|
-
useEffect33(() => {
|
|
18865
|
-
if (bluvoWithdrawalComplete) {
|
|
18866
|
-
const payload = {
|
|
18867
|
-
depositAddress: checkoutItem?.depositAddress
|
|
18868
|
-
};
|
|
18869
|
-
logger.log(`${logPrefix2}withdrawalComplete`, {
|
|
18870
|
-
bluvoWithdrawalComplete,
|
|
18871
|
-
payload
|
|
18872
|
-
});
|
|
18873
|
-
logToStatsigEffect(payload.depositAddress);
|
|
18874
|
-
onNext(payload);
|
|
18875
|
-
}
|
|
18876
|
-
}, [bluvoWithdrawalComplete, onNext, logToStatsigEffect]);
|
|
18877
18852
|
const { checkoutItem } = useCheckoutContext();
|
|
18878
18853
|
const bottomSectionRef = useBottomSectionRef();
|
|
18879
18854
|
const enableFrogProxyServer = useFlag(FlagKey19.EnableFrogProxyServer);
|
|
@@ -18945,8 +18920,23 @@ function BrokerageTwoFA({
|
|
|
18945
18920
|
logger.info(`${logPrefix2}handleEnterTwoFactor:submit2FAResponseData`, {
|
|
18946
18921
|
data
|
|
18947
18922
|
});
|
|
18923
|
+
const depositAddress = checkoutItem?.depositAddress;
|
|
18924
|
+
const metadata = {
|
|
18925
|
+
data,
|
|
18926
|
+
exchangeType,
|
|
18927
|
+
quote: bluvoClient.context?.quote,
|
|
18928
|
+
quoteId,
|
|
18929
|
+
idempotencyKey,
|
|
18930
|
+
walletId,
|
|
18931
|
+
depositAddress
|
|
18932
|
+
};
|
|
18933
|
+
logger.log(`${logPrefix2}withdrawalComplete`, metadata);
|
|
18934
|
+
logEvent({
|
|
18935
|
+
eventName: "fc::success::bluvo_withdrawal_completed" /* BLUVO_WITHDRAWAL_COMPLETED */,
|
|
18936
|
+
metadata
|
|
18937
|
+
});
|
|
18948
18938
|
onNext({
|
|
18949
|
-
depositAddress
|
|
18939
|
+
depositAddress
|
|
18950
18940
|
});
|
|
18951
18941
|
} catch (error) {
|
|
18952
18942
|
if (isBluvoWithdrawalError(error)) {
|
|
@@ -19246,7 +19236,7 @@ var TwoFactorInput = ({
|
|
|
19246
19236
|
};
|
|
19247
19237
|
|
|
19248
19238
|
// src/modals/CheckoutModal/Brokerage/ConnectExchange.tsx
|
|
19249
|
-
import React122, { useCallback as useCallback24, useEffect as
|
|
19239
|
+
import React122, { useCallback as useCallback24, useEffect as useEffect33, useState as useState35 } from "react";
|
|
19250
19240
|
import { createPortal as createPortal8 } from "react-dom";
|
|
19251
19241
|
|
|
19252
19242
|
// src/components/FunMessage/FunMessage.tsx
|
|
@@ -19371,7 +19361,7 @@ function ConnectExchange({
|
|
|
19371
19361
|
setAuthError(errorMessage);
|
|
19372
19362
|
setIsLoadingMeshModal(false);
|
|
19373
19363
|
});
|
|
19374
|
-
|
|
19364
|
+
useEffect33(() => {
|
|
19375
19365
|
if (isConnected) {
|
|
19376
19366
|
navigateToBrokerage();
|
|
19377
19367
|
}
|
|
@@ -19611,11 +19601,11 @@ import React126, { useCallback as useCallback27, useMemo as useMemo25, useState
|
|
|
19611
19601
|
import { createPortal as createPortal10 } from "react-dom";
|
|
19612
19602
|
|
|
19613
19603
|
// src/hooks/useFunListeners.ts
|
|
19614
|
-
import { useCallback as useCallback26, useEffect as
|
|
19604
|
+
import { useCallback as useCallback26, useEffect as useEffect34, useRef as useRef18 } from "react";
|
|
19615
19605
|
function useCheckoutHistoryListener(activate = true, singleDepositAddr) {
|
|
19616
19606
|
const activeIntervalRef = useRef18();
|
|
19617
19607
|
const { startCheckoutHistoryListener, stopCheckoutHistoryListener } = useCheckoutHistoryContext();
|
|
19618
|
-
|
|
19608
|
+
useEffect34(() => {
|
|
19619
19609
|
if (activate) {
|
|
19620
19610
|
const createdIntervalId = startCheckoutHistoryListener(
|
|
19621
19611
|
/* singleDepositAddr */
|
|
@@ -19644,7 +19634,7 @@ function useSIWFarcasterListener(channelToken) {
|
|
|
19644
19634
|
const stopStatusListener = useCallback26(() => {
|
|
19645
19635
|
clearInterval(intervalRef.current);
|
|
19646
19636
|
}, []);
|
|
19647
|
-
|
|
19637
|
+
useEffect34(() => {
|
|
19648
19638
|
startStatusListener();
|
|
19649
19639
|
return () => stopStatusListener();
|
|
19650
19640
|
}, []);
|
|
@@ -19674,7 +19664,7 @@ function useSIWFarcasterListener(channelToken) {
|
|
|
19674
19664
|
initalChainid,
|
|
19675
19665
|
stopStatusListener
|
|
19676
19666
|
]);
|
|
19677
|
-
|
|
19667
|
+
useEffect34(() => {
|
|
19678
19668
|
check();
|
|
19679
19669
|
}, [refreshSymbol]);
|
|
19680
19670
|
}
|
|
@@ -19808,7 +19798,7 @@ var CheckoutAlert = ({ state, refundState, onHelp: onHelp2 }) => {
|
|
|
19808
19798
|
|
|
19809
19799
|
// src/components/FunCheckoutHistory/FunCheckoutHistoryHelp.tsx
|
|
19810
19800
|
import { sendSupportMessage } from "@funkit/api-base";
|
|
19811
|
-
import React129, { useEffect as
|
|
19801
|
+
import React129, { useEffect as useEffect35, useMemo as useMemo26, useRef as useRef19, useState as useState38 } from "react";
|
|
19812
19802
|
import { createPortal as createPortal11 } from "react-dom";
|
|
19813
19803
|
|
|
19814
19804
|
// src/components/FunInput/FunTextAreaInput.tsx
|
|
@@ -19968,7 +19958,7 @@ function FunCheckoutHistoryHelp({
|
|
|
19968
19958
|
0 /* INPUT */
|
|
19969
19959
|
);
|
|
19970
19960
|
const wrapperRef = useRef19(null);
|
|
19971
|
-
|
|
19961
|
+
useEffect35(() => wrapperRef.current?.scrollIntoView(), []);
|
|
19972
19962
|
const handleShowErrorMessage = (message, timeMs = FIVE_SECONDS_MS) => {
|
|
19973
19963
|
setErrorMessage(message);
|
|
19974
19964
|
if (timeMs !== void 0) {
|
|
@@ -20295,11 +20285,11 @@ function CheckoutHelp({
|
|
|
20295
20285
|
}
|
|
20296
20286
|
|
|
20297
20287
|
// src/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.tsx
|
|
20298
|
-
import React146, { useEffect as
|
|
20288
|
+
import React146, { useEffect as useEffect41, useMemo as useMemo32, useState as useState47 } from "react";
|
|
20299
20289
|
import { createPortal as createPortal13 } from "react-dom";
|
|
20300
20290
|
|
|
20301
20291
|
// src/providers/UserPresenceContext.tsx
|
|
20302
|
-
import React133, { useEffect as
|
|
20292
|
+
import React133, { useEffect as useEffect36 } from "react";
|
|
20303
20293
|
import {
|
|
20304
20294
|
createContext as createContext14,
|
|
20305
20295
|
useContext as useContext14,
|
|
@@ -20311,7 +20301,7 @@ var UserPresenceContext = createContext14({
|
|
|
20311
20301
|
});
|
|
20312
20302
|
var UserPresenceProvider = ({ children }) => {
|
|
20313
20303
|
const [isAway, setIsAway] = useState39(false);
|
|
20314
|
-
|
|
20304
|
+
useEffect36(() => {
|
|
20315
20305
|
let timeoutId;
|
|
20316
20306
|
const handleVisibilityChange = () => {
|
|
20317
20307
|
if (document.visibilityState === "visible") {
|
|
@@ -20342,13 +20332,13 @@ import { FlagKey as FlagKey20 } from "@funkit/utils";
|
|
|
20342
20332
|
import React134, { useState as useState40 } from "react";
|
|
20343
20333
|
|
|
20344
20334
|
// src/hooks/useInterval.ts
|
|
20345
|
-
import { useEffect as
|
|
20335
|
+
import { useEffect as useEffect37, useRef as useRef20 } from "react";
|
|
20346
20336
|
function useInterval(callback, delay) {
|
|
20347
20337
|
const savedCallback = useRef20(callback);
|
|
20348
20338
|
useIsomorphicLayoutEffect(() => {
|
|
20349
20339
|
savedCallback.current = callback;
|
|
20350
20340
|
}, [callback]);
|
|
20351
|
-
|
|
20341
|
+
useEffect37(() => {
|
|
20352
20342
|
const id = setInterval(() => {
|
|
20353
20343
|
savedCallback.current();
|
|
20354
20344
|
}, delay);
|
|
@@ -20921,7 +20911,7 @@ function KatanaBridgeAlert() {
|
|
|
20921
20911
|
import { useState as useState42 } from "react";
|
|
20922
20912
|
|
|
20923
20913
|
// src/modals/CheckoutModal/useSourceAssetConfirm.tsx
|
|
20924
|
-
import { useEffect as
|
|
20914
|
+
import { useEffect as useEffect38, useState as useState41 } from "react";
|
|
20925
20915
|
|
|
20926
20916
|
// src/hooks/useCheckoutAccountBalanceTransfer.ts
|
|
20927
20917
|
import { useCallback as useCallback29 } from "react";
|
|
@@ -21059,7 +21049,7 @@ function useHackyTriggerWorkaroundReactDevBrainExplode() {
|
|
|
21059
21049
|
function useTriggerQuoteAndOtherStuffsWithExtremeCaution(onResult, setPreloadedQuoteData) {
|
|
21060
21050
|
const [assetRefresh, triggerAssetConfirm] = useHackyTriggerWorkaroundReactDevBrainExplode();
|
|
21061
21051
|
const { isSourceAssetConfirming, onSourceAssetConfirmed } = useSourceAssetConfirm(setPreloadedQuoteData);
|
|
21062
|
-
|
|
21052
|
+
useEffect38(() => {
|
|
21063
21053
|
if (assetRefresh === 0) {
|
|
21064
21054
|
return;
|
|
21065
21055
|
}
|
|
@@ -21465,7 +21455,7 @@ function usePostCheckout({
|
|
|
21465
21455
|
}
|
|
21466
21456
|
|
|
21467
21457
|
// src/modals/CheckoutModal/ConfirmationStep/useQuoteRefresh.ts
|
|
21468
|
-
import { useCallback as useCallback33, useEffect as
|
|
21458
|
+
import { useCallback as useCallback33, useEffect as useEffect40, useMemo as useMemo31, useRef as useRef21, useState as useState46 } from "react";
|
|
21469
21459
|
|
|
21470
21460
|
// src/hooks/useCountdown.tsx
|
|
21471
21461
|
import React145 from "react";
|
|
@@ -21473,7 +21463,7 @@ import { useCallback as useCallback32, useState as useState45 } from "react";
|
|
|
21473
21463
|
|
|
21474
21464
|
// src/components/FunCountdown/FunCountdown.tsx
|
|
21475
21465
|
import { noop as noop7 } from "@funkit/utils";
|
|
21476
|
-
import React144, { useCallback as useCallback31, useEffect as
|
|
21466
|
+
import React144, { useCallback as useCallback31, useEffect as useEffect39, useState as useState44 } from "react";
|
|
21477
21467
|
|
|
21478
21468
|
// src/components/FunCountdown/FunCountdown.css.ts
|
|
21479
21469
|
var backgroundRing = "_1t0bc111 _1rsrm2f1mm";
|
|
@@ -21516,7 +21506,7 @@ var FunCountdown = ({
|
|
|
21516
21506
|
setRemainingSeconds((prev) => prev > 0 ? prev - 1 : prev);
|
|
21517
21507
|
}, [isPaused]);
|
|
21518
21508
|
useInterval(handleInterval, 1e3);
|
|
21519
|
-
|
|
21509
|
+
useEffect39(() => {
|
|
21520
21510
|
if (remainingSeconds === onBeforeCountdownEndsSeconds) {
|
|
21521
21511
|
onBeforeCountdownEndsOnce();
|
|
21522
21512
|
}
|
|
@@ -21737,7 +21727,7 @@ function useQuoteRefresh({
|
|
|
21737
21727
|
}
|
|
21738
21728
|
return null;
|
|
21739
21729
|
}, [isQuoting, quoteErrorMessage]);
|
|
21740
|
-
|
|
21730
|
+
useEffect40(() => {
|
|
21741
21731
|
if (isPendingRefresh && !isOnHold) {
|
|
21742
21732
|
setIsPendingRefresh(false);
|
|
21743
21733
|
refreshQuote();
|
|
@@ -21853,7 +21843,7 @@ function ConfirmationStep({
|
|
|
21853
21843
|
}
|
|
21854
21844
|
}
|
|
21855
21845
|
});
|
|
21856
|
-
|
|
21846
|
+
useEffect41(() => {
|
|
21857
21847
|
triggerNewQuote({ maxRetries: 1 });
|
|
21858
21848
|
}, []);
|
|
21859
21849
|
const isContinuing = isConfirming || isPostCheckoutLoading;
|
|
@@ -22147,7 +22137,7 @@ function DirectExecutionNotifCenter({
|
|
|
22147
22137
|
|
|
22148
22138
|
// src/modals/CheckoutModal/InputAmount/InputAmount.tsx
|
|
22149
22139
|
import { isMobile as isMobile7 } from "@funkit/utils";
|
|
22150
|
-
import React163, { useEffect as
|
|
22140
|
+
import React163, { useEffect as useEffect42 } from "react";
|
|
22151
22141
|
|
|
22152
22142
|
// src/hooks/queries/useMeldCurrencies.ts
|
|
22153
22143
|
import { getMeldSupportedFiat } from "@funkit/api-base";
|
|
@@ -25261,7 +25251,7 @@ function InputAmount(props) {
|
|
|
25261
25251
|
const skipExchangeRates = paymentMethodInfo.paymentMethod !== "card" /* CARD */ || !isDefiMode;
|
|
25262
25252
|
const exchangeRatesLoaded = !isCurrencyExchangeRatesLoading && !!currencyExchangeRates;
|
|
25263
25253
|
const isLoaded = !!(checkoutItem && unitPrice && !sourceHoldingError && !isLoadingSourceHolding && !isMeldDefaultCurrencyLoading && (skipExchangeRates || exchangeRatesLoaded));
|
|
25264
|
-
|
|
25254
|
+
useEffect42(() => setCheckoutQuote(null), []);
|
|
25265
25255
|
if (isLoaded) {
|
|
25266
25256
|
return /* @__PURE__ */ React163.createElement(
|
|
25267
25257
|
InputAmountLoaded,
|
|
@@ -25287,7 +25277,7 @@ function InputAmount(props) {
|
|
|
25287
25277
|
}
|
|
25288
25278
|
|
|
25289
25279
|
// src/modals/CheckoutModal/LoadingAccount.tsx
|
|
25290
|
-
import React166, { useEffect as
|
|
25280
|
+
import React166, { useEffect as useEffect43 } from "react";
|
|
25291
25281
|
|
|
25292
25282
|
// src/hooks/usePaymentSources.ts
|
|
25293
25283
|
import { FlagKey as FlagKey25, isNotNullish as isNotNullish7 } from "@funkit/utils";
|
|
@@ -25628,7 +25618,7 @@ function LoadingAccount({
|
|
|
25628
25618
|
const hasCustomStartingStep = !!checkoutConfig?.startingStep;
|
|
25629
25619
|
const startsOnConfirmationStep = checkoutConfig?.startingStep === "confirmation" /* CONFIRMATION */;
|
|
25630
25620
|
const startsOnSelectAssetStep = checkoutConfig?.startingStep === "select_asset" /* SELECT_ASSET */;
|
|
25631
|
-
|
|
25621
|
+
useEffect43(() => {
|
|
25632
25622
|
if (isLoadingFlags || isLoadingFiat || !checkoutConfig) {
|
|
25633
25623
|
return;
|
|
25634
25624
|
}
|
|
@@ -25963,7 +25953,7 @@ function MeldRedirect({
|
|
|
25963
25953
|
// src/modals/CheckoutModal/SelectAsset.tsx
|
|
25964
25954
|
import { FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST as FUNKIT_CONNECT_SUPPORTED_CHECKOUT_CHAINS_INFO_LIST2 } from "@funkit/chains";
|
|
25965
25955
|
import { formatCurrencyAndStringify as formatCurrencyAndStringify11, isTokenEquivalent as isTokenEquivalent8 } from "@funkit/utils";
|
|
25966
|
-
import React172, { useEffect as
|
|
25956
|
+
import React172, { useEffect as useEffect44, useMemo as useMemo39, useState as useState51 } from "react";
|
|
25967
25957
|
import { createPortal as createPortal17 } from "react-dom";
|
|
25968
25958
|
import { mainnet as mainnet11 } from "viem/chains";
|
|
25969
25959
|
|
|
@@ -26305,7 +26295,7 @@ function useAssetOptions({
|
|
|
26305
26295
|
return assetOptions;
|
|
26306
26296
|
}
|
|
26307
26297
|
function useScrollToSelectedAsset(selectedChainTokenSymbol) {
|
|
26308
|
-
|
|
26298
|
+
useEffect44(() => {
|
|
26309
26299
|
const optionEl = document.getElementById(
|
|
26310
26300
|
`option-${selectedChainTokenSymbol}`
|
|
26311
26301
|
);
|
|
@@ -26699,7 +26689,7 @@ function SelectAsset({
|
|
|
26699
26689
|
|
|
26700
26690
|
// src/modals/CheckoutModal/SourceChange/SourceChange.tsx
|
|
26701
26691
|
import { BridgeCustomerStatus as BridgeCustomerStatus6, MeldServiceProvider as MeldServiceProvider4 } from "@funkit/api-base";
|
|
26702
|
-
import React174, { useCallback as useCallback39, useEffect as
|
|
26692
|
+
import React174, { useCallback as useCallback39, useEffect as useEffect45, useState as useState52 } from "react";
|
|
26703
26693
|
import { createPortal as createPortal18 } from "react-dom";
|
|
26704
26694
|
|
|
26705
26695
|
// src/modals/CheckoutModal/SourceChange/DefiPurchaseSection.tsx
|
|
@@ -26896,7 +26886,7 @@ function SourceChange({
|
|
|
26896
26886
|
const userInfo = useFunkitUserInfo();
|
|
26897
26887
|
const isDefiMode = checkoutItem?.initSettings.config.isDefiMode;
|
|
26898
26888
|
const hasAutoContinue = !isOstiumCustomer(apiKey) && !isDefiMode;
|
|
26899
|
-
|
|
26889
|
+
useEffect45(() => {
|
|
26900
26890
|
if (!paymentMethodInfo) {
|
|
26901
26891
|
return;
|
|
26902
26892
|
}
|
|
@@ -27090,7 +27080,7 @@ import { truncateMiddleOfAddress } from "@funkit/utils";
|
|
|
27090
27080
|
import React175, { useCallback as useCallback41, useState as useState54 } from "react";
|
|
27091
27081
|
|
|
27092
27082
|
// src/hooks/useCopyToClipboard.ts
|
|
27093
|
-
import { useCallback as useCallback40, useEffect as
|
|
27083
|
+
import { useCallback as useCallback40, useEffect as useEffect46, useState as useState53 } from "react";
|
|
27094
27084
|
var useCopyToClipboard = (text, delay = 1500) => {
|
|
27095
27085
|
const [isCopied, setCopied] = useState53(false);
|
|
27096
27086
|
const handleCopy = useCallback40(() => {
|
|
@@ -27100,7 +27090,7 @@ var useCopyToClipboard = (text, delay = 1500) => {
|
|
|
27100
27090
|
navigator.clipboard.writeText(text);
|
|
27101
27091
|
setCopied(true);
|
|
27102
27092
|
}, [text]);
|
|
27103
|
-
|
|
27093
|
+
useEffect46(() => {
|
|
27104
27094
|
if (!isCopied) {
|
|
27105
27095
|
return;
|
|
27106
27096
|
}
|
|
@@ -28449,7 +28439,7 @@ var FiatAccountDetail = {
|
|
|
28449
28439
|
|
|
28450
28440
|
// src/modals/CheckoutModal/VirtualFiatAccount/KycIframe.tsx
|
|
28451
28441
|
import { BridgeCustomerStatus as BridgeCustomerStatus7 } from "@funkit/api-base";
|
|
28452
|
-
import React194, { useCallback as useCallback42, useEffect as
|
|
28442
|
+
import React194, { useCallback as useCallback42, useEffect as useEffect47, useMemo as useMemo41, useState as useState58 } from "react";
|
|
28453
28443
|
function useIframeListener(listeners) {
|
|
28454
28444
|
const handleMessage = useCallback42(
|
|
28455
28445
|
(event) => {
|
|
@@ -28473,7 +28463,7 @@ function useIframeListener(listeners) {
|
|
|
28473
28463
|
},
|
|
28474
28464
|
[listeners]
|
|
28475
28465
|
);
|
|
28476
|
-
|
|
28466
|
+
useEffect47(() => {
|
|
28477
28467
|
window.addEventListener("message", handleMessage);
|
|
28478
28468
|
return () => {
|
|
28479
28469
|
window.removeEventListener("message", handleMessage);
|
|
@@ -28853,7 +28843,7 @@ function FunCheckoutModalHeightAnimationWrapper({
|
|
|
28853
28843
|
const animationFrameRef = useRef26(null);
|
|
28854
28844
|
const resizeObserverRef = useRef26(null);
|
|
28855
28845
|
const [height, setHeight] = useState60("auto");
|
|
28856
|
-
|
|
28846
|
+
useEffect48(() => {
|
|
28857
28847
|
if (containerRef.current) {
|
|
28858
28848
|
resizeObserverRef.current = new ResizeObserver((entries) => {
|
|
28859
28849
|
animationFrameRef.current = requestAnimationFrame(() => {
|
|
@@ -28900,7 +28890,7 @@ function FunCheckoutModalHeightAnimationWrapper({
|
|
|
28900
28890
|
}
|
|
28901
28891
|
|
|
28902
28892
|
// src/components/FunConnectOptions/FunConnectResultStep.tsx
|
|
28903
|
-
import React196, { useEffect as
|
|
28893
|
+
import React196, { useEffect as useEffect49 } from "react";
|
|
28904
28894
|
var AUTO_CLOSE = 2e3;
|
|
28905
28895
|
var messageMap = (hasQrCode) => ({
|
|
28906
28896
|
error: {
|
|
@@ -28919,7 +28909,7 @@ var FunConnectResultStep = ({
|
|
|
28919
28909
|
qrCodeUri
|
|
28920
28910
|
}) => {
|
|
28921
28911
|
const hasAutoclose = type === "success";
|
|
28922
|
-
|
|
28912
|
+
useEffect49(() => {
|
|
28923
28913
|
if (!hasAutoclose) {
|
|
28924
28914
|
return;
|
|
28925
28915
|
}
|
|
@@ -28971,7 +28961,7 @@ var FunConnectResultStep = ({
|
|
|
28971
28961
|
|
|
28972
28962
|
// src/components/FunConnectOptions/FunFarcasterConnectingStep.tsx
|
|
28973
28963
|
import { isMobile as isMobile8, isSafari as isSafari2, redirectInMobile } from "@funkit/utils";
|
|
28974
|
-
import React199, { useCallback as useCallback44, useEffect as
|
|
28964
|
+
import React199, { useCallback as useCallback44, useEffect as useEffect50 } from "react";
|
|
28975
28965
|
|
|
28976
28966
|
// src/components/CopyAddress/OldCopyAddressButton.tsx
|
|
28977
28967
|
import React198 from "react";
|
|
@@ -29018,7 +29008,7 @@ function FunFarcasterConnectingStep({
|
|
|
29018
29008
|
}) {
|
|
29019
29009
|
const mobile = isMobile8();
|
|
29020
29010
|
const safari = isSafari2();
|
|
29021
|
-
|
|
29011
|
+
useEffect50(() => {
|
|
29022
29012
|
if (farcasterUri && mobile && !safari) {
|
|
29023
29013
|
redirectInMobile(farcasterUri);
|
|
29024
29014
|
}
|
|
@@ -29072,12 +29062,12 @@ function FunFarcasterConnectingStep({
|
|
|
29072
29062
|
|
|
29073
29063
|
// src/components/FunConnectOptions/FunWeb2ConnectingStep.tsx
|
|
29074
29064
|
import { isNotNullish as isNotNullish9 } from "@funkit/utils";
|
|
29075
|
-
import React202, { useCallback as useCallback46, useEffect as
|
|
29065
|
+
import React202, { useCallback as useCallback46, useEffect as useEffect52, useState as useState62 } from "react";
|
|
29076
29066
|
|
|
29077
29067
|
// src/components/FunInput/FunTwoFaInput.tsx
|
|
29078
29068
|
import React200, {
|
|
29079
29069
|
useCallback as useCallback45,
|
|
29080
|
-
useEffect as
|
|
29070
|
+
useEffect as useEffect51,
|
|
29081
29071
|
useRef as useRef27,
|
|
29082
29072
|
useState as useState61
|
|
29083
29073
|
} from "react";
|
|
@@ -29098,7 +29088,7 @@ var FunTwoFaInput = ({
|
|
|
29098
29088
|
const [currentLength, setCurrentLength] = useState61(initialInputLength);
|
|
29099
29089
|
const [focusIndex, setFocusIndex] = useState61(0);
|
|
29100
29090
|
const [isFocused, setIsFocused] = useState61(false);
|
|
29101
|
-
|
|
29091
|
+
useEffect51(() => {
|
|
29102
29092
|
if (!value) {
|
|
29103
29093
|
setFocusIndex(0);
|
|
29104
29094
|
}
|
|
@@ -29298,7 +29288,7 @@ var FunWeb2ConnectingStep = ({
|
|
|
29298
29288
|
loginErrorMessage,
|
|
29299
29289
|
clearLoginError
|
|
29300
29290
|
} = useFunkitWeb2Login();
|
|
29301
|
-
|
|
29291
|
+
useEffect52(() => {
|
|
29302
29292
|
clearLoginError();
|
|
29303
29293
|
}, []);
|
|
29304
29294
|
const handleOtpComplete = useCallback46(
|
|
@@ -30093,7 +30083,7 @@ function PaymentMethodSummary({
|
|
|
30093
30083
|
|
|
30094
30084
|
// src/modals/CheckoutModal/TransferToken/CheckoutNotifications.tsx
|
|
30095
30085
|
import clsx22 from "clsx";
|
|
30096
|
-
import React216, { useCallback as useCallback50, useEffect as
|
|
30086
|
+
import React216, { useCallback as useCallback50, useEffect as useEffect55, useMemo as useMemo44, useState as useState66 } from "react";
|
|
30097
30087
|
|
|
30098
30088
|
// src/components/FunNotificationBanner/FunNotificationShowMoreButton.tsx
|
|
30099
30089
|
import React211 from "react";
|
|
@@ -30139,10 +30129,10 @@ var FunNotificationShowMoreButton = ({
|
|
|
30139
30129
|
|
|
30140
30130
|
// src/hooks/useOnNewNotification.ts
|
|
30141
30131
|
import { safeParseJson as safeParseJson4 } from "@funkit/utils";
|
|
30142
|
-
import { useEffect as
|
|
30132
|
+
import { useEffect as useEffect53 } from "react";
|
|
30143
30133
|
var storageKey5 = "fkc-processed-notifications";
|
|
30144
30134
|
var useOnNewNotification = (combinedNotifications, cb) => {
|
|
30145
|
-
|
|
30135
|
+
useEffect53(() => {
|
|
30146
30136
|
const alreadyProcessed = safeParseJsonObject(
|
|
30147
30137
|
sessionStorage.getItem(storageKey5)
|
|
30148
30138
|
);
|
|
@@ -30199,7 +30189,7 @@ var showMoreButtonStyle = "_4yitd93 _1rsrm2f12a _1rsrm2f1f _1rsrm2f1c _1rsrm2fls
|
|
|
30199
30189
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.tsx
|
|
30200
30190
|
import clsx20 from "clsx";
|
|
30201
30191
|
import { motion as motion12, useAnimate as useAnimate3 } from "motion/react";
|
|
30202
|
-
import React212, { useCallback as useCallback49, useEffect as
|
|
30192
|
+
import React212, { useCallback as useCallback49, useEffect as useEffect54, useRef as useRef28 } from "react";
|
|
30203
30193
|
|
|
30204
30194
|
// src/components/FunNotificationBanner/FunNotificationBannerIcon.css.ts
|
|
30205
30195
|
var STATUS_SPINNER_BOTTOM_POSITION = -5;
|
|
@@ -30649,7 +30639,7 @@ var FunNotificationBannerIcon = ({
|
|
|
30649
30639
|
]);
|
|
30650
30640
|
}, [animate]);
|
|
30651
30641
|
const statusRef = useRef28(status);
|
|
30652
|
-
|
|
30642
|
+
useEffect54(() => {
|
|
30653
30643
|
if (statusRef.current !== status) {
|
|
30654
30644
|
if (statusRef.current === "processing" && status === "completed") {
|
|
30655
30645
|
triggerAnimationProcessingToCompleted();
|
|
@@ -31198,13 +31188,13 @@ var CheckoutNotifications = ({
|
|
|
31198
31188
|
isVisible,
|
|
31199
31189
|
memoizedFilterFunc: filterFunc
|
|
31200
31190
|
});
|
|
31201
|
-
|
|
31191
|
+
useEffect55(() => {
|
|
31202
31192
|
if (initialCheckouts || !checkouts) {
|
|
31203
31193
|
return;
|
|
31204
31194
|
}
|
|
31205
31195
|
setInitialCheckouts(checkouts);
|
|
31206
31196
|
}, [initialCheckouts, checkouts]);
|
|
31207
|
-
|
|
31197
|
+
useEffect55(() => {
|
|
31208
31198
|
if (initialDirectExecutions || !directExecutions) {
|
|
31209
31199
|
return;
|
|
31210
31200
|
}
|
|
@@ -31625,7 +31615,7 @@ function useCheckoutModalTitle(depositAddress, defaultTitle) {
|
|
|
31625
31615
|
import { IN_PROGRESS_CHECKOUT_STATES as IN_PROGRESS_CHECKOUT_STATES2 } from "@funkit/api-base";
|
|
31626
31616
|
import { formatTimestampToDate, fullMonthNames } from "@funkit/utils";
|
|
31627
31617
|
import clsx24 from "clsx";
|
|
31628
|
-
import React229, { useEffect as
|
|
31618
|
+
import React229, { useEffect as useEffect56, useMemo as useMemo46, useRef as useRef29, useState as useState70 } from "react";
|
|
31629
31619
|
import { Virtuoso } from "react-virtuoso";
|
|
31630
31620
|
import { useAccount as useAccount7 } from "wagmi";
|
|
31631
31621
|
|
|
@@ -32168,7 +32158,7 @@ function Home({
|
|
|
32168
32158
|
const { checkoutHistoryList, isCheckoutHistoryInited } = useCheckoutHistoryContext();
|
|
32169
32159
|
const { returnViewPresets } = useActivityTraversal();
|
|
32170
32160
|
const { animation: tabAnimation, navigateTo } = useAnimatedNavigation(setSelectedView);
|
|
32171
|
-
|
|
32161
|
+
useEffect56(() => {
|
|
32172
32162
|
const virtuosoDiv = virtuosoParentRef.current?.firstChild;
|
|
32173
32163
|
virtuosoDiv?.classList.add(animateVirtuosoInClass);
|
|
32174
32164
|
}, []);
|
|
@@ -33186,7 +33176,7 @@ function ModalProvider({ children }) {
|
|
|
33186
33176
|
onConnect: () => closeModals(isUnauthenticated),
|
|
33187
33177
|
onDisconnect: closeModals
|
|
33188
33178
|
});
|
|
33189
|
-
|
|
33179
|
+
useEffect57(() => {
|
|
33190
33180
|
if (isUnauthenticated) {
|
|
33191
33181
|
closeModals();
|
|
33192
33182
|
}
|
|
@@ -33291,7 +33281,7 @@ function useConnectModal(onClose) {
|
|
|
33291
33281
|
const { connectModalOpen, openConnectModal } = useContext16(ModalContext);
|
|
33292
33282
|
const { isWalletConnectModalOpen } = useWalletConnectOpenState();
|
|
33293
33283
|
const effectiveConnectModalOpen = connectModalOpen || isWalletConnectModalOpen;
|
|
33294
|
-
|
|
33284
|
+
useEffect57(() => {
|
|
33295
33285
|
if (!effectiveConnectModalOpen && onClose) {
|
|
33296
33286
|
onClose();
|
|
33297
33287
|
}
|
|
@@ -33626,7 +33616,7 @@ var FunkitWeb2Provider = ({
|
|
|
33626
33616
|
},
|
|
33627
33617
|
[]
|
|
33628
33618
|
);
|
|
33629
|
-
|
|
33619
|
+
useEffect58(() => {
|
|
33630
33620
|
const newPrivy = new PrivyJS({
|
|
33631
33621
|
appId: DEFAULT_PRIVY_APP_ID,
|
|
33632
33622
|
storage: new LocalStorage(),
|
|
@@ -33841,7 +33831,7 @@ var FunkitWeb2Provider = ({
|
|
|
33841
33831
|
}
|
|
33842
33832
|
}
|
|
33843
33833
|
}, [handleFunkitWeb2Login, initChainId, loginMethod]);
|
|
33844
|
-
|
|
33834
|
+
useEffect58(() => {
|
|
33845
33835
|
if (privy && privyIframeUrl && isNotNullish11(initChainId)) {
|
|
33846
33836
|
const iframe = document.getElementById(
|
|
33847
33837
|
PRIVY_IFRAME_ID
|
|
@@ -34090,10 +34080,10 @@ import React244 from "react";
|
|
|
34090
34080
|
import { useAccount as useAccount12, useBalance, useConfig as useConfig8 } from "wagmi";
|
|
34091
34081
|
|
|
34092
34082
|
// src/hooks/useIsMounted.ts
|
|
34093
|
-
import { useCallback as useCallback57, useEffect as
|
|
34083
|
+
import { useCallback as useCallback57, useEffect as useEffect59, useState as useState75 } from "react";
|
|
34094
34084
|
function useIsMounted() {
|
|
34095
34085
|
const [isMounted, setIsMounted] = useState75(false);
|
|
34096
|
-
|
|
34086
|
+
useEffect59(() => {
|
|
34097
34087
|
setIsMounted(true);
|
|
34098
34088
|
return () => {
|
|
34099
34089
|
setIsMounted(false);
|
|
@@ -34380,7 +34370,7 @@ function ConnectButton({
|
|
|
34380
34370
|
const connectionStatus = useConnectionStatus();
|
|
34381
34371
|
const { setShowBalance } = useShowBalance();
|
|
34382
34372
|
const [ready, setReady] = useState76(false);
|
|
34383
|
-
|
|
34373
|
+
useEffect60(() => {
|
|
34384
34374
|
setShowBalance(showBalance);
|
|
34385
34375
|
if (!ready) {
|
|
34386
34376
|
setReady(true);
|
|
@@ -34917,7 +34907,7 @@ import { QueryClientProvider } from "@tanstack/react-query";
|
|
|
34917
34907
|
import React248, {
|
|
34918
34908
|
createContext as createContext19,
|
|
34919
34909
|
useContext as useContext19,
|
|
34920
|
-
useEffect as
|
|
34910
|
+
useEffect as useEffect62,
|
|
34921
34911
|
useMemo as useMemo49
|
|
34922
34912
|
} from "react";
|
|
34923
34913
|
import { WagmiProvider, useAccountEffect as useAccountEffect3 } from "wagmi";
|
|
@@ -34960,7 +34950,7 @@ function FunkitStatsigProvider({
|
|
|
34960
34950
|
|
|
34961
34951
|
// src/providers/usePreloadImages.ts
|
|
34962
34952
|
import { isNotNullish as isNotNullish12 } from "@funkit/utils";
|
|
34963
|
-
import { useCallback as useCallback58, useEffect as
|
|
34953
|
+
import { useCallback as useCallback58, useEffect as useEffect61 } from "react";
|
|
34964
34954
|
function usePreloadImages() {
|
|
34965
34955
|
const funkitConnectChains = useFunkitConnectChains();
|
|
34966
34956
|
const walletConnectors = useWalletConnectors();
|
|
@@ -34970,7 +34960,7 @@ function usePreloadImages() {
|
|
|
34970
34960
|
...funkitConnectChains.map((chain) => chain.iconUrl).filter(isNotNullish12)
|
|
34971
34961
|
);
|
|
34972
34962
|
}, [walletConnectors, funkitConnectChains]);
|
|
34973
|
-
|
|
34963
|
+
useEffect61(() => {
|
|
34974
34964
|
preloadImages();
|
|
34975
34965
|
}, [preloadImages]);
|
|
34976
34966
|
}
|
|
@@ -34999,7 +34989,7 @@ function FunkitProvider(props) {
|
|
|
34999
34989
|
}, [initialChainId, props.wagmiConfig, props.funkitConfig.appName]);
|
|
35000
34990
|
const finalQueryClient = props.queryClient;
|
|
35001
34991
|
const sdkVersion = useMemo49(() => getCurrentSdkVersion(), []);
|
|
35002
|
-
|
|
34992
|
+
useEffect62(() => {
|
|
35003
34993
|
logger.configure(props.funkitConfig.apiKey, !!props.debug, sdkVersion);
|
|
35004
34994
|
}, [props.funkitConfig.apiKey, props.debug, sdkVersion]);
|
|
35005
34995
|
const MainChild = /* @__PURE__ */ React248.createElement(FunkitThemeProvider, { theme: props.theme }, /* @__PURE__ */ React248.createElement(
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { Address } from 'viem';
|
|
3
|
+
import type { PaymentMethodCardInfo } from '~/domains/paymentMethods';
|
|
4
|
+
import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
|
|
5
|
+
export type MoonpaySetupState = CheckoutModalCommonState & {
|
|
6
|
+
paymentAddress: Address;
|
|
7
|
+
token: string;
|
|
8
|
+
tokenChainId: string;
|
|
9
|
+
depositAmount: number;
|
|
10
|
+
isSendingToQr: boolean;
|
|
11
|
+
paymentMethodInfo: PaymentMethodCardInfo;
|
|
12
|
+
};
|
|
13
|
+
export type MoonpaySetupNext = {
|
|
14
|
+
depositAddress: Address;
|
|
15
|
+
};
|
|
16
|
+
export declare const MoonpaySetupInfo: ModalStepInfo<FunCheckoutStep.MOONPAY_SETUP>;
|
|
17
|
+
export declare function MoonpaySetup({ modalState, onNext, }: ModalStepComponentProps<FunCheckoutStep.MOONPAY_SETUP>): React.JSX.Element;
|
package/dist/utils/checkout.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
|
|
|
55
55
|
bypassInit: boolean;
|
|
56
56
|
apiKey?: string;
|
|
57
57
|
nonce?: bigint | undefined;
|
|
58
|
+
logger?: import("@funkit/api-base").Logger | undefined;
|
|
58
59
|
fee?: {
|
|
59
60
|
token?: string;
|
|
60
61
|
amount?: number;
|
|
@@ -62,7 +63,6 @@ export declare function getFunkitEnvForCheckoutEstimation({ chainId, bypassWalle
|
|
|
62
63
|
recipient: Address;
|
|
63
64
|
} | undefined;
|
|
64
65
|
skipDBAction?: boolean | undefined;
|
|
65
|
-
logger?: import("@funkit/api-base").Logger | undefined;
|
|
66
66
|
};
|
|
67
67
|
export type TokenInfo = {
|
|
68
68
|
symbol: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const MINIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 35;
|
|
2
|
+
export declare const MAXIMUM_MOONPAY_DEPOSIT_AMOUNT_USD = 10000;
|
|
3
|
+
export declare const generateMoonpayCurrencyCode: (tokenSymbol: string, chainId: string) => string;
|
|
4
|
+
export declare function checkAmountForMoonpay(amountUsd: number, isDefiMode?: boolean): {
|
|
5
|
+
readonly isInvalid: true;
|
|
6
|
+
readonly message: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly isInvalid: false;
|
|
9
|
+
readonly message?: undefined;
|
|
10
|
+
};
|
|
@@ -1,153 +1,153 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
zerionWallet
|
|
4
|
+
} from "./chunk-Q3H3TRBS.js";
|
|
5
|
+
import {
|
|
6
|
+
trustWallet
|
|
7
|
+
} from "./chunk-RKPCWHXL.js";
|
|
5
8
|
import {
|
|
6
9
|
uniswapWallet
|
|
7
10
|
} from "./chunk-LH7BMNFZ.js";
|
|
8
11
|
import {
|
|
9
|
-
|
|
10
|
-
} from "./chunk-
|
|
11
|
-
import {
|
|
12
|
-
tokenPocketWallet
|
|
13
|
-
} from "./chunk-2L43XSW3.js";
|
|
12
|
+
subWallet
|
|
13
|
+
} from "./chunk-ZSI5N4VV.js";
|
|
14
14
|
import {
|
|
15
15
|
talismanWallet
|
|
16
16
|
} from "./chunk-DRO6WYMM.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
} from "./chunk-
|
|
20
|
-
import {
|
|
21
|
-
safepalWallet
|
|
22
|
-
} from "./chunk-NT2HYJKW.js";
|
|
23
|
-
import {
|
|
24
|
-
tahoWallet
|
|
25
|
-
} from "./chunk-ZZZRUXZE.js";
|
|
18
|
+
tokenPocketWallet
|
|
19
|
+
} from "./chunk-J3LI3FYZ.js";
|
|
26
20
|
import {
|
|
27
21
|
tokenaryWallet
|
|
28
22
|
} from "./chunk-D6AOOO5F.js";
|
|
29
|
-
import {
|
|
30
|
-
xdefiWallet
|
|
31
|
-
} from "./chunk-BOU4WKRZ.js";
|
|
32
23
|
import {
|
|
33
24
|
walletConnectWallet
|
|
34
25
|
} from "./chunk-NP5QGWNL.js";
|
|
35
|
-
import {
|
|
36
|
-
phantomWallet
|
|
37
|
-
} from "./chunk-362NXNTM.js";
|
|
38
26
|
import {
|
|
39
27
|
ramperWallet
|
|
40
28
|
} from "./chunk-BYXPFMI7.js";
|
|
41
29
|
import {
|
|
42
|
-
|
|
43
|
-
} from "./chunk-
|
|
30
|
+
zealWallet
|
|
31
|
+
} from "./chunk-RNBEDQHF.js";
|
|
44
32
|
import {
|
|
45
|
-
|
|
46
|
-
} from "./chunk-
|
|
33
|
+
xdefiWallet
|
|
34
|
+
} from "./chunk-BOU4WKRZ.js";
|
|
35
|
+
import {
|
|
36
|
+
omniWallet
|
|
37
|
+
} from "./chunk-7CUY5G6R.js";
|
|
47
38
|
import {
|
|
48
39
|
rabbyWallet
|
|
49
40
|
} from "./chunk-BBOM42DL.js";
|
|
41
|
+
import {
|
|
42
|
+
rainbowWallet
|
|
43
|
+
} from "./chunk-3CICVJUN.js";
|
|
50
44
|
import {
|
|
51
45
|
roninWallet
|
|
52
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-QLVVUKYB.js";
|
|
53
47
|
import {
|
|
54
48
|
safeheronWallet
|
|
55
49
|
} from "./chunk-RZIO5TFF.js";
|
|
56
50
|
import {
|
|
57
|
-
|
|
58
|
-
} from "./chunk-
|
|
51
|
+
safepalWallet
|
|
52
|
+
} from "./chunk-EC6CHBSZ.js";
|
|
59
53
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
54
|
+
safeWallet
|
|
55
|
+
} from "./chunk-BQQQL6UD.js";
|
|
62
56
|
import {
|
|
63
|
-
|
|
64
|
-
} from "./chunk-
|
|
57
|
+
tahoWallet
|
|
58
|
+
} from "./chunk-ZZZRUXZE.js";
|
|
59
|
+
import {
|
|
60
|
+
mewWallet
|
|
61
|
+
} from "./chunk-OL5ZO7E4.js";
|
|
62
|
+
import {
|
|
63
|
+
metaMaskWallet
|
|
64
|
+
} from "./chunk-UYGJO62F.js";
|
|
65
65
|
import {
|
|
66
66
|
oktoWallet
|
|
67
67
|
} from "./chunk-ADIXAKUL.js";
|
|
68
68
|
import {
|
|
69
|
-
|
|
70
|
-
} from "./chunk-
|
|
69
|
+
ledgerWallet
|
|
70
|
+
} from "./chunk-BRBKM4PW.js";
|
|
71
71
|
import {
|
|
72
|
-
|
|
73
|
-
} from "./chunk-
|
|
72
|
+
okxWallet
|
|
73
|
+
} from "./chunk-AFXHGWBH.js";
|
|
74
74
|
import {
|
|
75
75
|
oneInchWallet
|
|
76
76
|
} from "./chunk-OESTDX6I.js";
|
|
77
|
-
import {
|
|
78
|
-
okxWallet
|
|
79
|
-
} from "./chunk-TDIEHTMB.js";
|
|
80
77
|
import {
|
|
81
78
|
oneKeyWallet
|
|
82
79
|
} from "./chunk-SHBUZ7U7.js";
|
|
83
80
|
import {
|
|
84
|
-
|
|
85
|
-
} from "./chunk-
|
|
86
|
-
import {
|
|
87
|
-
frontierWallet
|
|
88
|
-
} from "./chunk-TCAGNB4B.js";
|
|
81
|
+
phantomWallet
|
|
82
|
+
} from "./chunk-362NXNTM.js";
|
|
89
83
|
import {
|
|
90
84
|
frameWallet
|
|
91
85
|
} from "./chunk-IFON7E6U.js";
|
|
86
|
+
import {
|
|
87
|
+
enkryptWallet
|
|
88
|
+
} from "./chunk-OLOIXTYS.js";
|
|
89
|
+
import {
|
|
90
|
+
frontierWallet
|
|
91
|
+
} from "./chunk-VWCLFMWJ.js";
|
|
92
92
|
import {
|
|
93
93
|
gateWallet
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-CJGUM55H.js";
|
|
95
95
|
import {
|
|
96
96
|
imTokenWallet
|
|
97
97
|
} from "./chunk-COZ7MIQS.js";
|
|
98
|
-
import {
|
|
99
|
-
injectedWallet
|
|
100
|
-
} from "./chunk-XWUJE7MW.js";
|
|
101
98
|
import {
|
|
102
99
|
kresusWallet
|
|
103
100
|
} from "./chunk-MJXPRJZT.js";
|
|
104
101
|
import {
|
|
105
|
-
|
|
106
|
-
} from "./chunk-
|
|
102
|
+
injectedWallet
|
|
103
|
+
} from "./chunk-XWUJE7MW.js";
|
|
107
104
|
import {
|
|
108
|
-
|
|
109
|
-
} from "./chunk-
|
|
105
|
+
clvWallet
|
|
106
|
+
} from "./chunk-2GJQ4XZQ.js";
|
|
110
107
|
import {
|
|
111
|
-
|
|
112
|
-
} from "./chunk-
|
|
108
|
+
bitskiWallet
|
|
109
|
+
} from "./chunk-HS3C7OQV.js";
|
|
113
110
|
import {
|
|
114
|
-
|
|
115
|
-
} from "./chunk-
|
|
111
|
+
bybitWallet
|
|
112
|
+
} from "./chunk-LNEC5RNX.js";
|
|
113
|
+
import {
|
|
114
|
+
coreWallet
|
|
115
|
+
} from "./chunk-JCHN6A47.js";
|
|
116
116
|
import {
|
|
117
117
|
dawnWallet
|
|
118
118
|
} from "./chunk-HWPKCIBE.js";
|
|
119
119
|
import {
|
|
120
|
-
|
|
121
|
-
} from "./chunk-
|
|
120
|
+
coinbaseWallet
|
|
121
|
+
} from "./chunk-H4IRCEZN.js";
|
|
122
122
|
import {
|
|
123
|
-
|
|
124
|
-
} from "./chunk-
|
|
123
|
+
desigWallet
|
|
124
|
+
} from "./chunk-OPAZMNA7.js";
|
|
125
125
|
import {
|
|
126
126
|
foxWallet
|
|
127
|
-
} from "./chunk-
|
|
127
|
+
} from "./chunk-CNPKISHN.js";
|
|
128
128
|
import {
|
|
129
129
|
argentWallet
|
|
130
130
|
} from "./chunk-WSQ2YJO2.js";
|
|
131
131
|
import {
|
|
132
132
|
bifrostWallet
|
|
133
|
-
} from "./chunk-
|
|
134
|
-
import {
|
|
135
|
-
bitverseWallet
|
|
136
|
-
} from "./chunk-3HZRRP4Y.js";
|
|
133
|
+
} from "./chunk-UIASLGLV.js";
|
|
137
134
|
import {
|
|
138
|
-
|
|
139
|
-
} from "./chunk-
|
|
135
|
+
bitgetWallet
|
|
136
|
+
} from "./chunk-5W7VDOCL.js";
|
|
140
137
|
import {
|
|
141
|
-
|
|
142
|
-
} from "./chunk-
|
|
138
|
+
bloomWallet
|
|
139
|
+
} from "./chunk-S27IADFU.js";
|
|
143
140
|
import {
|
|
144
141
|
braveWallet
|
|
145
142
|
} from "./chunk-BPZ2XJO2.js";
|
|
146
143
|
import {
|
|
147
|
-
|
|
148
|
-
} from "./chunk-
|
|
149
|
-
import
|
|
144
|
+
bitverseWallet
|
|
145
|
+
} from "./chunk-3HZRRP4Y.js";
|
|
146
|
+
import {
|
|
147
|
+
coin98Wallet
|
|
148
|
+
} from "./chunk-KIDC67XJ.js";
|
|
150
149
|
import "./chunk-DNSG5Q7V.js";
|
|
150
|
+
import "./chunk-23WIEY36.js";
|
|
151
151
|
export {
|
|
152
152
|
argentWallet,
|
|
153
153
|
bifrostWallet,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.22",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -99,12 +99,12 @@
|
|
|
99
99
|
"ua-parser-js": "^1.0.37",
|
|
100
100
|
"use-debounce": "^10.0.5",
|
|
101
101
|
"uuid": "^9.0.1",
|
|
102
|
-
"@funkit/api-base": "1.12.
|
|
103
|
-
"@funkit/core": "2.3.
|
|
104
|
-
"@funkit/
|
|
105
|
-
"@funkit/
|
|
106
|
-
"@funkit/utils": "1.1.
|
|
107
|
-
"@funkit/wagmi-tools": "3.0.
|
|
102
|
+
"@funkit/api-base": "1.12.14",
|
|
103
|
+
"@funkit/core": "2.3.59",
|
|
104
|
+
"@funkit/chains": "0.4.3",
|
|
105
|
+
"@funkit/fun-relay": "2.1.9",
|
|
106
|
+
"@funkit/utils": "1.1.16",
|
|
107
|
+
"@funkit/wagmi-tools": "3.0.82"
|
|
108
108
|
},
|
|
109
109
|
"repository": {
|
|
110
110
|
"type": "git",
|