@funkit/connect 12.15.1 → 12.15.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/dist/domains/checkoutConflict.d.ts +15 -0
- package/dist/index.js +66 -47
- package/dist/wallets/walletConnectors/index.js +27 -27
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 12.15.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1d30d09: Fix the amount input's backdrop restarting its fade on every render.
|
|
8
|
+
- f327212: No consumer-facing changes.
|
|
9
|
+
- 55c223e: Fix React's missing-key warning for expiring chain info banners.
|
|
10
|
+
- fcac9fe: No consumer-facing changes.
|
|
11
|
+
- 6eccdf5: No consumer-facing changes.
|
|
12
|
+
- 51c8eaa: No consumer-facing changes.
|
|
13
|
+
- dcdd9f8: No consumer-facing changes.
|
|
14
|
+
- Updated dependencies [7bc5bb0]
|
|
15
|
+
- Updated dependencies [309d703]
|
|
16
|
+
- Updated dependencies [84548dd]
|
|
17
|
+
- Updated dependencies [0211812]
|
|
18
|
+
- Updated dependencies [6eccdf5]
|
|
19
|
+
- Updated dependencies [51c8eaa]
|
|
20
|
+
- @funkit/connect-core@9.3.0
|
|
21
|
+
|
|
22
|
+
## 12.15.2
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- 932bead: Starting a deposit no longer reopens a previously closed withdrawal.
|
|
27
|
+
- Updated dependencies [cdb4501]
|
|
28
|
+
- Updated dependencies [96f7890]
|
|
29
|
+
- Updated dependencies [032b1a3]
|
|
30
|
+
- Updated dependencies [8189df3]
|
|
31
|
+
- @funkit/connect-core@9.2.0
|
|
32
|
+
- @funkit/api-base@9.0.1
|
|
33
|
+
|
|
3
34
|
## 12.15.1
|
|
4
35
|
|
|
5
36
|
### Patch Changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContext';
|
|
2
|
+
/**
|
|
3
|
+
* Whether `beginCheckout` should reopen the soft-hidden checkout instead of
|
|
4
|
+
* starting the requested one.
|
|
5
|
+
* - The active item must be the soft-hidden checkout itself. A missing item
|
|
6
|
+
* (cleared on logout) or a different id (a later withdrawal took the active
|
|
7
|
+
* slot) leaves nothing coherent to resume.
|
|
8
|
+
* - `beginCheckout` always asks for a deposit. Resuming a withdrawal item drops
|
|
9
|
+
* the deposit config and runs the old withdrawal's recipient and target.
|
|
10
|
+
*/
|
|
11
|
+
export declare function shouldResumeSoftHiddenCheckout({ prefersResume, hiddenCheckoutId, activeCheckoutItem, }: {
|
|
12
|
+
prefersResume: boolean;
|
|
13
|
+
hiddenCheckoutId: string;
|
|
14
|
+
activeCheckoutItem: FunkitActiveCheckoutItem | null;
|
|
15
|
+
}): boolean;
|
package/dist/index.js
CHANGED
|
@@ -113,7 +113,7 @@ function setFunkitConnectVersion({ version }) {
|
|
|
113
113
|
localStorage.setItem(storageKey, version);
|
|
114
114
|
}
|
|
115
115
|
function getCurrentSdkVersion() {
|
|
116
|
-
return "12.15.
|
|
116
|
+
return "12.15.3";
|
|
117
117
|
}
|
|
118
118
|
function useFingerprint() {
|
|
119
119
|
const fingerprint = useCallback(() => {
|
|
@@ -7667,6 +7667,7 @@ import {
|
|
|
7667
7667
|
useClientAsyncInit
|
|
7668
7668
|
} from "@statsig/react-bindings";
|
|
7669
7669
|
import React15, { useEffect as useEffect6 } from "react";
|
|
7670
|
+
import { STATSIG_NETWORK_TIMEOUT_MS } from "@funkit/connect-core";
|
|
7670
7671
|
var STATSIG_API = "https://data-api.fun.xyz/v1";
|
|
7671
7672
|
var STATSIG_CLIENT_KEY = "client-UmFd8WIJljA7cLmZuDqs3X25M8sKd5WIQP4BSC2bRbM";
|
|
7672
7673
|
function getStatsigOptions(isDevelopment) {
|
|
@@ -7675,7 +7676,7 @@ function getStatsigOptions(isDevelopment) {
|
|
|
7675
7676
|
api: STATSIG_API,
|
|
7676
7677
|
// default timeout is 10s which is too large imo
|
|
7677
7678
|
// 5s should be plenty granted on average statsig responds in <200ms
|
|
7678
|
-
networkTimeoutMs:
|
|
7679
|
+
networkTimeoutMs: STATSIG_NETWORK_TIMEOUT_MS
|
|
7679
7680
|
// uncomment to test offline mode
|
|
7680
7681
|
// preventAllNetworkTraffic: true,
|
|
7681
7682
|
},
|
|
@@ -10039,6 +10040,18 @@ function getPolymarketPerpsTargetAssetOverride(qrcodeActionType) {
|
|
|
10039
10040
|
return qrcodeActionType === POLYMARKET_PERPS_DEPOSIT_ACTION_TYPE ? POLYMARKET_PUSD_ADDRESS : void 0;
|
|
10040
10041
|
}
|
|
10041
10042
|
|
|
10043
|
+
// src/domains/checkoutConflict.ts
|
|
10044
|
+
function shouldResumeSoftHiddenCheckout({
|
|
10045
|
+
prefersResume,
|
|
10046
|
+
hiddenCheckoutId,
|
|
10047
|
+
activeCheckoutItem
|
|
10048
|
+
}) {
|
|
10049
|
+
if (!prefersResume || !activeCheckoutItem) {
|
|
10050
|
+
return false;
|
|
10051
|
+
}
|
|
10052
|
+
return activeCheckoutItem.id === hiddenCheckoutId && !activeCheckoutItem.isWithdrawal;
|
|
10053
|
+
}
|
|
10054
|
+
|
|
10042
10055
|
// src/domains/clientMetadata.ts
|
|
10043
10056
|
function stripFunctionsForBackend(config) {
|
|
10044
10057
|
return {
|
|
@@ -11565,6 +11578,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
11565
11578
|
refreshCheckoutHistory();
|
|
11566
11579
|
return confirmationResult;
|
|
11567
11580
|
},
|
|
11581
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO(review): suppressed when the rule was turned on
|
|
11568
11582
|
[
|
|
11569
11583
|
getDirectExecutionInfo,
|
|
11570
11584
|
funkitConfig.apiKey,
|
|
@@ -11572,7 +11586,6 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
11572
11586
|
refreshCheckoutHistory,
|
|
11573
11587
|
setCheckoutProgress,
|
|
11574
11588
|
userInfo.id,
|
|
11575
|
-
updateActiveCheckout,
|
|
11576
11589
|
walletAddress,
|
|
11577
11590
|
payerWallets,
|
|
11578
11591
|
getWithdrawalDirectExecution,
|
|
@@ -11609,13 +11622,7 @@ function FunkitCheckoutProvider({ children }) {
|
|
|
11609
11622
|
depositAddress
|
|
11610
11623
|
};
|
|
11611
11624
|
},
|
|
11612
|
-
[
|
|
11613
|
-
t,
|
|
11614
|
-
activeCheckout,
|
|
11615
|
-
refreshCheckoutHistory,
|
|
11616
|
-
funkitConfig.apiKey,
|
|
11617
|
-
updateActiveCheckout
|
|
11618
|
-
]
|
|
11625
|
+
[t, activeCheckout, refreshCheckoutHistory, funkitConfig.apiKey]
|
|
11619
11626
|
);
|
|
11620
11627
|
const confirmCheckout = useEffectEvent(
|
|
11621
11628
|
async (latestQuote, stepMessageSetter, withdrawalClient, preWithdrawalTxs) => {
|
|
@@ -12018,10 +12025,22 @@ function useFunkitCheckout(props) {
|
|
|
12018
12025
|
);
|
|
12019
12026
|
const [pendingCheckoutConfig, setPendingCheckoutConfig] = useState11();
|
|
12020
12027
|
const onCheckoutConflict = ({
|
|
12028
|
+
hiddenCheckoutId,
|
|
12021
12029
|
resume,
|
|
12022
12030
|
replace
|
|
12023
12031
|
}) => {
|
|
12024
|
-
|
|
12032
|
+
const shouldResume = shouldResumeSoftHiddenCheckout({
|
|
12033
|
+
prefersResume: isLighterxyzCustomer(apiKey),
|
|
12034
|
+
hiddenCheckoutId,
|
|
12035
|
+
activeCheckoutItem: checkoutItem
|
|
12036
|
+
});
|
|
12037
|
+
logger.info("checkoutConflictResolved", {
|
|
12038
|
+
hiddenCheckoutId,
|
|
12039
|
+
activeCheckoutId: checkoutItem?.id,
|
|
12040
|
+
isWithdrawal: !!checkoutItem?.isWithdrawal,
|
|
12041
|
+
shouldResume
|
|
12042
|
+
});
|
|
12043
|
+
if (shouldResume) {
|
|
12025
12044
|
resume();
|
|
12026
12045
|
return false;
|
|
12027
12046
|
}
|
|
@@ -12151,7 +12170,7 @@ function useFunkitCheckout(props) {
|
|
|
12151
12170
|
setPendingCheckoutConfig(void 0);
|
|
12152
12171
|
beginCheckout(pendingCheckoutConfig);
|
|
12153
12172
|
}
|
|
12154
|
-
}, [
|
|
12173
|
+
}, [isUserLoggedIn, pendingCheckoutConfig]);
|
|
12155
12174
|
useEffect12(() => {
|
|
12156
12175
|
if (pendingCheckoutConfig && !isUserLoggedIn && !connectModalOpen) {
|
|
12157
12176
|
setPendingCheckoutConfig(void 0);
|
|
@@ -17193,7 +17212,7 @@ function FunCheckoutStatusLoaded({
|
|
|
17193
17212
|
if (isNewlyDelayed) {
|
|
17194
17213
|
onOrderDelayedEvent();
|
|
17195
17214
|
}
|
|
17196
|
-
}, [isNewlyDelayed
|
|
17215
|
+
}, [isNewlyDelayed]);
|
|
17197
17216
|
if (checkoutHistoryItem.refundState === "REFUNDED") {
|
|
17198
17217
|
return null;
|
|
17199
17218
|
}
|
|
@@ -17762,6 +17781,7 @@ function useWithdrawalAnalytics() {
|
|
|
17762
17781
|
trade_type: "EXACT_IN" /* EXACT_IN */
|
|
17763
17782
|
}));
|
|
17764
17783
|
},
|
|
17784
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO(review): suppressed when the rule was turned on
|
|
17765
17785
|
[logEventV2]
|
|
17766
17786
|
);
|
|
17767
17787
|
const trackWithdrawalMethodSelected = useCallback20(
|
|
@@ -18157,6 +18177,7 @@ function useSwappedSlot(swappedTheme) {
|
|
|
18157
18177
|
}
|
|
18158
18178
|
setIframeUrlState(nextUrl);
|
|
18159
18179
|
},
|
|
18180
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO(review): suppressed when the rule was turned on
|
|
18160
18181
|
[session.reset]
|
|
18161
18182
|
);
|
|
18162
18183
|
const resetIframe = useCallback22(() => {
|
|
@@ -33024,7 +33045,7 @@ function useSwappedIframeLifecycle({
|
|
|
33024
33045
|
});
|
|
33025
33046
|
}, SWAPPED_IFRAME_TIMEOUT);
|
|
33026
33047
|
return () => clearTimeout(timeoutRef.current);
|
|
33027
|
-
}, [isSwappedReady
|
|
33048
|
+
}, [isSwappedReady]);
|
|
33028
33049
|
}
|
|
33029
33050
|
|
|
33030
33051
|
// src/modals/WithdrawalModal/useFiatWithdrawal.ts
|
|
@@ -33172,7 +33193,7 @@ function useFiatWithdrawal({
|
|
|
33172
33193
|
if (withdrawalError) {
|
|
33173
33194
|
handleWithdrawalFailure();
|
|
33174
33195
|
}
|
|
33175
|
-
}, [withdrawalError
|
|
33196
|
+
}, [withdrawalError]);
|
|
33176
33197
|
const rejectOrderBeforeStart = useEffectEvent(
|
|
33177
33198
|
(order) => {
|
|
33178
33199
|
if (isProcessingOrderRef.current) {
|
|
@@ -33358,7 +33379,7 @@ function WithdrawalSwappedIframeController({
|
|
|
33358
33379
|
});
|
|
33359
33380
|
focusAmountInput();
|
|
33360
33381
|
}
|
|
33361
|
-
}, [
|
|
33382
|
+
}, [isSwappedReady, logEvent, focusAmountInput]);
|
|
33362
33383
|
const handleSwappedMessage = useEffectEvent((msg) => {
|
|
33363
33384
|
switch (msg.type) {
|
|
33364
33385
|
case "SWAPPED_GO_BACK": {
|
|
@@ -33463,7 +33484,7 @@ function WithdrawalSwappedIframeController({
|
|
|
33463
33484
|
});
|
|
33464
33485
|
useEffect59(() => {
|
|
33465
33486
|
return swappedTransport.onMessage(handleSwappedMessage);
|
|
33466
|
-
}, [swappedTransport
|
|
33487
|
+
}, [swappedTransport]);
|
|
33467
33488
|
useSwappedIframeLifecycle({
|
|
33468
33489
|
fopType: selectedFop.fopType,
|
|
33469
33490
|
onTimeout: onError,
|
|
@@ -33836,7 +33857,7 @@ function useTrackWithdrawalEvents({
|
|
|
33836
33857
|
if (checkoutId && claimAnalyticsEvent("fc_modal_opened" /* MODAL_OPENED */, checkoutId)) {
|
|
33837
33858
|
trackModalOpened();
|
|
33838
33859
|
}
|
|
33839
|
-
}, [checkoutId
|
|
33860
|
+
}, [checkoutId]);
|
|
33840
33861
|
const trackedCheckoutIdRef = useRef37(null);
|
|
33841
33862
|
const lastViewedStepRef = useRef37(null);
|
|
33842
33863
|
const stepIndexRef = useRef37(1);
|
|
@@ -38447,6 +38468,7 @@ function useDepositAnalytics() {
|
|
|
38447
38468
|
target_chain: args.target.chainId
|
|
38448
38469
|
}));
|
|
38449
38470
|
},
|
|
38471
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO(review): suppressed when the rule was turned on
|
|
38450
38472
|
[logEventV2]
|
|
38451
38473
|
);
|
|
38452
38474
|
const trackDepositAmountConfirmed = useCallback49(
|
|
@@ -38491,6 +38513,7 @@ function useDepositAnalytics() {
|
|
|
38491
38513
|
target_asset_ticker: config.targetAssetTicker || null
|
|
38492
38514
|
}));
|
|
38493
38515
|
},
|
|
38516
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO(review): suppressed when the rule was turned on
|
|
38494
38517
|
[config, connectorId, logEventV2]
|
|
38495
38518
|
);
|
|
38496
38519
|
const trackDepositTransferBreakdownClicked = useCallback49(
|
|
@@ -38553,6 +38576,7 @@ function useDepositAnalytics() {
|
|
|
38553
38576
|
trade_type: "EXACT_IN" /* EXACT_IN */
|
|
38554
38577
|
}));
|
|
38555
38578
|
},
|
|
38579
|
+
// oxlint-disable-next-line react-hooks/exhaustive-deps -- TODO(review): suppressed when the rule was turned on
|
|
38556
38580
|
[config, connectorId, logEventV2, paymentMethodInfo, payerWallets]
|
|
38557
38581
|
);
|
|
38558
38582
|
const trackDepositQuoteConfirmed = useCallback49(
|
|
@@ -38956,7 +38980,7 @@ function useNotificationTracking({
|
|
|
38956
38980
|
);
|
|
38957
38981
|
notificationDisplayedAtRef.current = null;
|
|
38958
38982
|
};
|
|
38959
|
-
}, [id, logEvent
|
|
38983
|
+
}, [id, logEvent]);
|
|
38960
38984
|
useEffect73(() => {
|
|
38961
38985
|
if (!itemRef.current || !notificationDisplayedAtRef.current) {
|
|
38962
38986
|
return;
|
|
@@ -38996,7 +39020,7 @@ function useNotificationTracking({
|
|
|
38996
39020
|
});
|
|
38997
39021
|
}
|
|
38998
39022
|
reasonRef.current = "dismissed";
|
|
38999
|
-
}, [logEvent
|
|
39023
|
+
}, [logEvent]);
|
|
39000
39024
|
const trackShowMore = useCallback50(() => {
|
|
39001
39025
|
if (!itemRef.current || !notificationDisplayedAtRef.current) {
|
|
39002
39026
|
return;
|
|
@@ -39016,7 +39040,7 @@ function useNotificationTracking({
|
|
|
39016
39040
|
status: statusRef.current
|
|
39017
39041
|
});
|
|
39018
39042
|
}
|
|
39019
|
-
}, [logEvent
|
|
39043
|
+
}, [logEvent]);
|
|
39020
39044
|
return { trackDismissal, trackShowMore };
|
|
39021
39045
|
}
|
|
39022
39046
|
function getNotificationDisplayedEventData(item, status, addressDisplayedAtMs) {
|
|
@@ -43736,14 +43760,7 @@ function ConnectExchange({
|
|
|
43736
43760
|
} finally {
|
|
43737
43761
|
setIsLoadingBluvoModal(false);
|
|
43738
43762
|
}
|
|
43739
|
-
}, [
|
|
43740
|
-
brokerType,
|
|
43741
|
-
handleStartWithdrawal,
|
|
43742
|
-
handleAuthError,
|
|
43743
|
-
t,
|
|
43744
|
-
trackExchangeConnectFailed,
|
|
43745
|
-
trackExchangeConnectStarted
|
|
43746
|
-
]);
|
|
43763
|
+
}, [brokerType, handleStartWithdrawal, t, trackExchangeConnectStarted]);
|
|
43747
43764
|
const bottomSectionRef = useBottomSectionRef();
|
|
43748
43765
|
const { CustomComponent } = uiCustomizations.connectExchangeScreen;
|
|
43749
43766
|
return /* @__PURE__ */ React252.createElement(Box, { id: "connect-exchange" }, uiCustomizations.connectExchangeScreen.customTopComponent?.(), CustomComponent ? /* @__PURE__ */ React252.createElement(
|
|
@@ -44184,13 +44201,21 @@ var ChainInfoBanners = ({ chainId: chainId2 }) => {
|
|
|
44184
44201
|
const chainBanners = chainInfoBanners[chainId2] ?? [];
|
|
44185
44202
|
return chainBanners.map((banner) => {
|
|
44186
44203
|
const { expireAtMs, ...bannerProps } = banner;
|
|
44204
|
+
const key = `${banner.message}-${chainId2}`;
|
|
44187
44205
|
if (expireAtMs && Date.now() > expireAtMs) {
|
|
44188
44206
|
return null;
|
|
44189
44207
|
}
|
|
44190
44208
|
if (expireAtMs) {
|
|
44191
|
-
return /* @__PURE__ */ React257.createElement(
|
|
44209
|
+
return /* @__PURE__ */ React257.createElement(
|
|
44210
|
+
EphemeralInfoBanner,
|
|
44211
|
+
{
|
|
44212
|
+
key,
|
|
44213
|
+
...bannerProps,
|
|
44214
|
+
expireAtMs
|
|
44215
|
+
}
|
|
44216
|
+
);
|
|
44192
44217
|
}
|
|
44193
|
-
return /* @__PURE__ */ React257.createElement(InfoBanner, { key
|
|
44218
|
+
return /* @__PURE__ */ React257.createElement(InfoBanner, { key, ...banner });
|
|
44194
44219
|
});
|
|
44195
44220
|
} catch {
|
|
44196
44221
|
logger.error("ChainInfoBanners:error", { chainId: chainId2, chainInfoBanners });
|
|
@@ -45731,13 +45756,7 @@ var FunCountdown = ({
|
|
|
45731
45756
|
if (remainingSeconds <= 0) {
|
|
45732
45757
|
onCountdownEndedOnce();
|
|
45733
45758
|
}
|
|
45734
|
-
}, [
|
|
45735
|
-
remainingSeconds,
|
|
45736
|
-
onCountdownEndedOnce,
|
|
45737
|
-
onBeforeCountdownEndsOnce,
|
|
45738
|
-
onCountdownLastSecondOnce,
|
|
45739
|
-
onBeforeCountdownEndsSeconds
|
|
45740
|
-
]);
|
|
45759
|
+
}, [remainingSeconds, onBeforeCountdownEndsSeconds]);
|
|
45741
45760
|
const innerContent = typeof children === "function" ? children(remainingSeconds) : children;
|
|
45742
45761
|
if (isHidden) {
|
|
45743
45762
|
return null;
|
|
@@ -50010,7 +50029,7 @@ function useAmountInputUI({
|
|
|
50010
50029
|
style: { ...styles }
|
|
50011
50030
|
}
|
|
50012
50031
|
};
|
|
50013
|
-
const
|
|
50032
|
+
const backdrop = /* @__PURE__ */ React283.createElement(
|
|
50014
50033
|
motion17.div,
|
|
50015
50034
|
{
|
|
50016
50035
|
initial: {
|
|
@@ -50065,7 +50084,7 @@ function useAmountInputUI({
|
|
|
50065
50084
|
inputAffix.type === "prefix" && affixElement,
|
|
50066
50085
|
/* @__PURE__ */ React283.createElement(FunInput, { ...sharedInputProps }),
|
|
50067
50086
|
inputAffix.type === "suffix" && affixElement,
|
|
50068
|
-
|
|
50087
|
+
backdrop
|
|
50069
50088
|
)
|
|
50070
50089
|
)
|
|
50071
50090
|
);
|
|
@@ -50104,7 +50123,7 @@ function useAmountInputUI({
|
|
|
50104
50123
|
borderRadius: "inputAmountSwitcher",
|
|
50105
50124
|
isDisabled: meldEnabled || isInputDisabled
|
|
50106
50125
|
},
|
|
50107
|
-
/* @__PURE__ */ React283.createElement(AnimatedWidthWrapper, null, /* @__PURE__ */ React283.createElement(Box, { display: "flex", alignItems: "center", gap: "0" }, !isInputInFiat ? /* @__PURE__ */ React283.createElement(motion17.div, { key: "fiat", layoutId: "fiat", ...motionProps.switch }, fiatDisplay,
|
|
50126
|
+
/* @__PURE__ */ React283.createElement(AnimatedWidthWrapper, null, /* @__PURE__ */ React283.createElement(Box, { display: "flex", alignItems: "center", gap: "0" }, !isInputInFiat ? /* @__PURE__ */ React283.createElement(motion17.div, { key: "fiat", layoutId: "fiat", ...motionProps.switch }, fiatDisplay, backdrop) : /* @__PURE__ */ React283.createElement(motion17.div, { key: "asset", layoutId: "asset", ...motionProps.switch }, formatCryptoAndStringify9(switchAmount), backdrop), isInputInFiat && /* @__PURE__ */ React283.createElement(motion17.div, { key: "symbol", ...motionProps.symbol }, "\xA0", switchSymbol)))
|
|
50108
50127
|
)
|
|
50109
50128
|
);
|
|
50110
50129
|
return {
|
|
@@ -53284,7 +53303,7 @@ function useTrackSourceChangeEvents({
|
|
|
53284
53303
|
if (checkoutId && claimAnalyticsEvent("fc_modal_opened" /* MODAL_OPENED */, checkoutId)) {
|
|
53285
53304
|
trackModalOpened();
|
|
53286
53305
|
}
|
|
53287
|
-
}, [checkoutId
|
|
53306
|
+
}, [checkoutId]);
|
|
53288
53307
|
const trackTabSwitched = useEffectEvent(
|
|
53289
53308
|
({
|
|
53290
53309
|
fromTab,
|
|
@@ -53735,7 +53754,7 @@ function SourceChange({
|
|
|
53735
53754
|
});
|
|
53736
53755
|
useEffect96(() => {
|
|
53737
53756
|
sendPaymentMethodTabEvent(paymentMethodTab);
|
|
53738
|
-
}, [paymentMethodTab
|
|
53757
|
+
}, [paymentMethodTab]);
|
|
53739
53758
|
const analyticsTab = isSwappedEnabled ? paymentMethodTab : null;
|
|
53740
53759
|
const handleNewSourceContinue = async (newSource2) => {
|
|
53741
53760
|
switch (newSource2) {
|
|
@@ -54236,7 +54255,7 @@ function SwappedIframeController({
|
|
|
54236
54255
|
logMeasuredEvent(event);
|
|
54237
54256
|
focusAmountInput();
|
|
54238
54257
|
}
|
|
54239
|
-
}, [
|
|
54258
|
+
}, [isSwappedReady, logMeasuredEvent, focusAmountInput]);
|
|
54240
54259
|
const handleSwappedMessage = useEffectEvent((msg) => {
|
|
54241
54260
|
switch (msg.type) {
|
|
54242
54261
|
case "SWAPPED_GO_BACK": {
|
|
@@ -54396,7 +54415,7 @@ function SwappedIframeController({
|
|
|
54396
54415
|
}
|
|
54397
54416
|
useEffect97(() => {
|
|
54398
54417
|
return swappedTransport.onMessage(handleSwappedMessage);
|
|
54399
|
-
}, [swappedTransport
|
|
54418
|
+
}, [swappedTransport]);
|
|
54400
54419
|
useSwappedIframeLifecycle({
|
|
54401
54420
|
fopType: selectedPaymentOption.fopType,
|
|
54402
54421
|
onTimeout: () => setModalState((s) => ({ ...s, error: true })),
|
|
@@ -55905,7 +55924,7 @@ function useCheckoutModalTransition(checkoutItem, onClose) {
|
|
|
55905
55924
|
});
|
|
55906
55925
|
useEffect99(() => {
|
|
55907
55926
|
ensureLoadingAccountScreen();
|
|
55908
|
-
}, [
|
|
55927
|
+
}, []);
|
|
55909
55928
|
const trackNextState = useCallback72(
|
|
55910
55929
|
(nextState, metadata) => {
|
|
55911
55930
|
const trackEvent = trackEventFromNextState(nextState);
|
|
@@ -56197,7 +56216,7 @@ function useCheckoutBlocked(params) {
|
|
|
56197
56216
|
if (blockedReason) {
|
|
56198
56217
|
onCheckoutBlockedEvent(blockedReason);
|
|
56199
56218
|
}
|
|
56200
|
-
}, [blockedReason
|
|
56219
|
+
}, [blockedReason]);
|
|
56201
56220
|
if (!blockedReason) {
|
|
56202
56221
|
return { blockedReason: null, showBlockedUI: false };
|
|
56203
56222
|
}
|
|
@@ -14,15 +14,15 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
tahoWallet
|
|
16
16
|
} from "./chunk-U74RFZOL.js";
|
|
17
|
+
import {
|
|
18
|
+
tokenPocketWallet
|
|
19
|
+
} from "./chunk-NXWG6FG2.js";
|
|
17
20
|
import {
|
|
18
21
|
talismanWallet
|
|
19
22
|
} from "./chunk-IAYYWCVB.js";
|
|
20
23
|
import {
|
|
21
24
|
tokenaryWallet
|
|
22
25
|
} from "./chunk-TPM5PUJD.js";
|
|
23
|
-
import {
|
|
24
|
-
tokenPocketWallet
|
|
25
|
-
} from "./chunk-NXWG6FG2.js";
|
|
26
26
|
import {
|
|
27
27
|
trustWallet
|
|
28
28
|
} from "./chunk-SR5CZR3L.js";
|
|
@@ -32,12 +32,12 @@ import {
|
|
|
32
32
|
import {
|
|
33
33
|
walletConnectWallet
|
|
34
34
|
} from "./chunk-DUX4XCDV.js";
|
|
35
|
-
import {
|
|
36
|
-
oneKeyWallet
|
|
37
|
-
} from "./chunk-KN32ITJ7.js";
|
|
38
35
|
import {
|
|
39
36
|
rabbyWallet
|
|
40
37
|
} from "./chunk-RQ2GXOJL.js";
|
|
38
|
+
import {
|
|
39
|
+
phantomWallet
|
|
40
|
+
} from "./chunk-Q27YVDDH.js";
|
|
41
41
|
import {
|
|
42
42
|
rainbowWallet
|
|
43
43
|
} from "./chunk-ZSSSLFQF.js";
|
|
@@ -47,12 +47,12 @@ import {
|
|
|
47
47
|
import {
|
|
48
48
|
roninWallet
|
|
49
49
|
} from "./chunk-IA5432IR.js";
|
|
50
|
-
import {
|
|
51
|
-
safeWallet
|
|
52
|
-
} from "./chunk-IR3PJMVM.js";
|
|
53
50
|
import {
|
|
54
51
|
safeheronWallet
|
|
55
52
|
} from "./chunk-UN3ONVNC.js";
|
|
53
|
+
import {
|
|
54
|
+
safeWallet
|
|
55
|
+
} from "./chunk-IR3PJMVM.js";
|
|
56
56
|
import {
|
|
57
57
|
safepalWallet
|
|
58
58
|
} from "./chunk-BBB2J3US.js";
|
|
@@ -78,8 +78,8 @@ import {
|
|
|
78
78
|
oneInchWallet
|
|
79
79
|
} from "./chunk-GFS2AVAH.js";
|
|
80
80
|
import {
|
|
81
|
-
|
|
82
|
-
} from "./chunk-
|
|
81
|
+
oneKeyWallet
|
|
82
|
+
} from "./chunk-KN32ITJ7.js";
|
|
83
83
|
import {
|
|
84
84
|
desigWallet
|
|
85
85
|
} from "./chunk-DFHP75HV.js";
|
|
@@ -104,48 +104,48 @@ import {
|
|
|
104
104
|
import {
|
|
105
105
|
kresusWallet
|
|
106
106
|
} from "./chunk-V77ATGZT.js";
|
|
107
|
+
import {
|
|
108
|
+
bybitWallet
|
|
109
|
+
} from "./chunk-BBDNB5TQ.js";
|
|
107
110
|
import {
|
|
108
111
|
clvWallet
|
|
109
112
|
} from "./chunk-4FHNLTR3.js";
|
|
110
113
|
import {
|
|
111
114
|
coin98Wallet
|
|
112
115
|
} from "./chunk-RFCZYLNR.js";
|
|
116
|
+
import {
|
|
117
|
+
coreWallet
|
|
118
|
+
} from "./chunk-TRZDAXCQ.js";
|
|
113
119
|
import {
|
|
114
120
|
coinbaseWallet
|
|
115
121
|
} from "./chunk-SM2A3OSG.js";
|
|
116
|
-
import {
|
|
117
|
-
bybitWallet
|
|
118
|
-
} from "./chunk-BBDNB5TQ.js";
|
|
119
122
|
import {
|
|
120
123
|
customWallet
|
|
121
124
|
} from "./chunk-VKM5M5UK.js";
|
|
122
125
|
import {
|
|
123
126
|
dawnWallet
|
|
124
127
|
} from "./chunk-LV6YV3DE.js";
|
|
125
|
-
import {
|
|
126
|
-
coreWallet
|
|
127
|
-
} from "./chunk-TRZDAXCQ.js";
|
|
128
128
|
import {
|
|
129
129
|
enkryptWallet
|
|
130
130
|
} from "./chunk-Z6LDN2AN.js";
|
|
131
131
|
import {
|
|
132
|
-
|
|
133
|
-
} from "./chunk-
|
|
134
|
-
import {
|
|
135
|
-
argentWallet
|
|
136
|
-
} from "./chunk-XSDTNMQY.js";
|
|
132
|
+
bitgetWallet
|
|
133
|
+
} from "./chunk-HOCKAU5H.js";
|
|
137
134
|
import {
|
|
138
135
|
bitskiWallet
|
|
139
136
|
} from "./chunk-NPITCCJE.js";
|
|
140
137
|
import {
|
|
141
|
-
|
|
142
|
-
} from "./chunk-
|
|
138
|
+
bloomWallet
|
|
139
|
+
} from "./chunk-PNHDOC77.js";
|
|
140
|
+
import {
|
|
141
|
+
argentWallet
|
|
142
|
+
} from "./chunk-XSDTNMQY.js";
|
|
143
|
+
import {
|
|
144
|
+
bifrostWallet
|
|
145
|
+
} from "./chunk-ALGPGI6V.js";
|
|
143
146
|
import {
|
|
144
147
|
bitverseWallet
|
|
145
148
|
} from "./chunk-5AEWIKRA.js";
|
|
146
|
-
import {
|
|
147
|
-
bloomWallet
|
|
148
|
-
} from "./chunk-PNHDOC77.js";
|
|
149
149
|
import "./chunk-AALSJCUR.js";
|
|
150
150
|
import {
|
|
151
151
|
braveWallet
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "12.15.
|
|
3
|
+
"version": "12.15.3",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -119,11 +119,11 @@
|
|
|
119
119
|
"ua-parser-js": "^1.0.37",
|
|
120
120
|
"use-debounce": "^10.0.5",
|
|
121
121
|
"uuid": "^11.1.1",
|
|
122
|
-
"@funkit/
|
|
123
|
-
"@funkit/
|
|
124
|
-
"@funkit/connect-core": "9.
|
|
122
|
+
"@funkit/chains": "2.5.0",
|
|
123
|
+
"@funkit/api-base": "9.0.1",
|
|
124
|
+
"@funkit/connect-core": "9.3.0",
|
|
125
125
|
"@funkit/utils": "5.0.2",
|
|
126
|
-
"@funkit/
|
|
126
|
+
"@funkit/fun-relay": "3.1.3"
|
|
127
127
|
},
|
|
128
128
|
"repository": {
|
|
129
129
|
"type": "git",
|