@funkit/connect 13.1.1 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -0
- package/dist/{chunk-53FF4ZHH.js → chunk-SJ7E3DKC.js} +6 -0
- package/dist/{chunk-2RND3WWH.js → chunk-V4VFNIG4.js} +6 -0
- package/dist/clients/aave.d.ts +1 -1
- package/dist/clients/{chunk-44LV4GCX.js → chunk-2INCUCQQ.js} +1 -0
- package/dist/clients/chunk-6JL6PF5P.js +22 -0
- package/dist/clients/chunk-747THMHY.js +185 -0
- package/dist/clients/{chunk-Q4JGDB4L.js → chunk-BMU5EYUJ.js} +8 -24
- package/dist/clients/{chunk-T6YNXIOS.js → chunk-HBW7AZUH.js} +7 -5
- package/dist/clients/{chunk-ZBBYOJWK.js → chunk-KDZFZETH.js} +176 -0
- package/dist/clients/{chunk-D6EY2WW4.js → chunk-PVBHWD47.js} +1 -1
- package/dist/clients/chunk-RNTQ7KEL.js +76 -0
- package/dist/clients/{chunk-ZEXIDBIZ.js → chunk-RTHDOT5K.js} +1 -1
- package/dist/clients/{chunk-AJGDTTRJ.js → chunk-SKYQYPX5.js} +58 -2
- package/dist/clients/{chunk-NNMZMHO6.js → chunk-Z6FHIDTD.js} +5 -5
- package/dist/clients/fanatics.css +3136 -2947
- package/dist/clients/fanatics.js +1 -1
- package/dist/clients/internal/nado/withdrawalCallback.js +4 -4
- package/dist/clients/internal/nado/withdrawalErrors.js +2 -2
- package/dist/clients/internal/nado/withdrawalForm.js +12 -77
- package/dist/clients/internal/nado/withdrawalStatus.css +18233 -0
- package/dist/clients/internal/nado/withdrawalStatus.js +218 -20
- package/dist/clients/lighter.css +3519 -2947
- package/dist/clients/lighter.js +5 -7
- package/dist/clients/mallard.d.ts +24 -3
- package/dist/clients/mallard.js +7 -3
- package/dist/clients/nado.js +4 -4
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +4 -3
- package/dist/clients/polymarket/index.js +9 -7
- package/dist/clients/polymarket/polymarket.js +6 -4
- package/dist/components/Box/Box.d.ts +18 -18
- package/dist/components/Dropdown/BaseDropdownItem.d.ts +1 -1
- package/dist/components/FunAsset/FunAssetItem.d.ts +3 -1
- package/dist/components/FunBadge/FunBadge.d.ts +1 -1
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.d.ts +2 -3
- package/dist/components/FunTransactionSummary/PaymentFeesSummary.track.d.ts +2 -3
- package/dist/components/ModalErrorState/ModalErrorState.d.ts +2 -3
- package/dist/consts/customers.d.ts +1 -1
- package/dist/consts/polymarket.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +24 -18
- package/dist/domains/clientMetadata.d.ts +2 -1
- package/dist/domains/convert/hostTimeout.d.ts +1 -1
- package/dist/domains/destinationAssetBalance.d.ts +1 -1
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +2 -3
- package/dist/hooks/statsig/index.d.ts +1 -0
- package/dist/hooks/track/analytics/mappers.d.ts +11 -1
- package/dist/hooks/track/analytics/swappedErrorCode.d.ts +1 -0
- package/dist/hooks/track/analytics/useTrackErrorShown.d.ts +2 -3
- package/dist/hooks/useConvertBalances.d.ts +6 -1
- package/dist/hooks/useFunkitMaxCheckoutUsdInfo.d.ts +3 -3
- package/dist/hooks/useHostDepositSettlement.d.ts +12 -0
- package/dist/hooks/useModalStateValueWithProp.d.ts +1 -1
- package/dist/hooks/useRefreshBalancesOnDeposit.d.ts +20 -0
- package/dist/index.css +3519 -2947
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6179 -3864
- package/dist/interfaces/solanaWallet.d.ts +2 -2
- package/dist/modals/CheckoutModal/FiatV2/FiatV2Step.d.ts +19 -0
- package/dist/modals/CheckoutModal/FiatV2/fiatV2DepositInputs.d.ts +38 -0
- package/dist/modals/CheckoutModal/FiatV2/fiatV2PaymentSelectionEffects.d.ts +26 -0
- package/dist/modals/CheckoutModal/FiatV2/useFiatV2DepositInputs.d.ts +6 -0
- package/dist/modals/CheckoutModal/FiatV2/useFiatV2PaymentSelectionHost.d.ts +22 -0
- package/dist/modals/CheckoutModal/FiatV2/useFiatV2Text.d.ts +7 -0
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +3 -1
- package/dist/modals/CheckoutModal/InputAmount/useCheckoutAmountLimits.d.ts +3 -3
- package/dist/modals/CheckoutModal/SourceChange/AddCardItem.d.ts +9 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +5 -0
- package/dist/modals/CheckoutModal/SourceChange/fiatV2Reroute.d.ts +24 -0
- package/dist/modals/CheckoutModal/SourceChange/useAddCardRow.d.ts +13 -0
- package/dist/modals/CheckoutModal/SourceChange/useFiatV2Entry.d.ts +21 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -0
- package/dist/modals/PolymarketPerpsTransfer/TransferActionButton.d.ts +5 -5
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +2 -3
- package/dist/providers/FunSessionContext.d.ts +20 -0
- package/dist/providers/FunkitCheckoutContext/index.d.ts +7 -1
- package/dist/providers/FunkitCheckoutContext/types.d.ts +30 -0
- package/dist/providers/FunkitProvider.d.ts +7 -0
- package/dist/providers/FunkitQuoteContext.track.d.ts +2 -3
- package/dist/providers/FunkitThemeProvider.d.ts +9 -0
- package/dist/shadow-css.js +1 -1
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/checkout.d.ts +2 -2
- package/dist/utils/localStorageFunSessionStorage.d.ts +9 -0
- package/dist/v2/components/PrimaryButton.css.d.ts +5 -0
- package/dist/v2/components/PrimaryButton.d.ts +16 -0
- package/dist/v2/components/Sheet.css.d.ts +13 -0
- package/dist/v2/components/Sheet.d.ts +23 -0
- package/dist/v2/components/Spinner.css.d.ts +2 -0
- package/dist/v2/components/Spinner.d.ts +6 -0
- package/dist/v2/flows/fiat/FiatDepositGate.d.ts +20 -0
- package/dist/v2/flows/fiat/FiatScreenPicker.d.ts +37 -0
- package/dist/v2/flows/funLogin/FunLoginScreenPicker.d.ts +30 -0
- package/dist/v2/screens/amount/AmountDisplay.css.d.ts +5 -0
- package/dist/v2/screens/amount/AmountDisplay.d.ts +15 -0
- package/dist/v2/screens/amount/AmountScreen.css.d.ts +2 -0
- package/dist/v2/screens/amount/AmountScreen.d.ts +37 -0
- package/dist/v2/screens/amount/PresetButton.css.d.ts +1 -0
- package/dist/v2/screens/amount/PresetButton.d.ts +9 -0
- package/dist/v2/screens/amount/fittedText/useFittedText.d.ts +19 -0
- package/dist/v2/screens/amount/fittedText/useIsomorphicEffect.d.ts +2 -0
- package/dist/v2/screens/amount/fittedText/useTextMeasurer.d.ts +3 -0
- package/dist/v2/screens/amount/typedAmount/amountText.d.ts +37 -0
- package/dist/v2/screens/amount/typedAmount/attachInputNormalization.d.ts +1 -0
- package/dist/v2/screens/fiat/FiatPlaceholderScreen.d.ts +9 -0
- package/dist/v2/screens/funLogin/FunLoginCodeScreen.d.ts +35 -0
- package/dist/v2/screens/funLogin/FunLoginEmailScreen.d.ts +26 -0
- package/dist/v2/screens/funLogin/FunLoginScreen.css.d.ts +20 -0
- package/dist/v2/screens/funLogin/looksLikeEmail.d.ts +5 -0
- package/dist/v2/theme/colors.d.ts +28 -0
- package/dist/v2/theme/fonts.d.ts +9 -0
- package/dist/v2/theme/radii.d.ts +6 -0
- package/dist/wallets/walletConnectors/index.js +39 -39
- package/package.json +4 -4
- package/dist/clients/chunk-JXTKKLVA.js +0 -185
- package/dist/clients/chunk-PZSKO3BJ.js +0 -60
- package/dist/components/FunPayments/icons/coinbase.d.ts +0 -5
package/dist/clients/fanatics.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
createNadoWithdrawalCallback
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
4
|
+
} from "../../chunk-Z6FHIDTD.js";
|
|
5
|
+
import "../../chunk-PVBHWD47.js";
|
|
6
|
+
import "../../chunk-2INCUCQQ.js";
|
|
7
7
|
import "../../chunk-LICTGZXW.js";
|
|
8
8
|
import "../../chunk-OODIKHYE.js";
|
|
9
|
-
import "../../chunk-
|
|
9
|
+
import "../../chunk-KDZFZETH.js";
|
|
10
10
|
import "../../chunk-B67ESBGC.js";
|
|
11
11
|
export {
|
|
12
12
|
createNadoWithdrawalCallback
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isExpectedNadoWithdrawalFailure,
|
|
4
4
|
toNadoWithdrawalErrorMessage
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-
|
|
5
|
+
} from "../../chunk-PVBHWD47.js";
|
|
6
|
+
import "../../chunk-KDZFZETH.js";
|
|
7
7
|
export {
|
|
8
8
|
isExpectedNadoWithdrawalFailure,
|
|
9
9
|
toNadoWithdrawalErrorMessage
|
|
@@ -2,16 +2,18 @@
|
|
|
2
2
|
import {
|
|
3
3
|
isNadoWithdrawalConfig
|
|
4
4
|
} from "../../chunk-LCYJLY4X.js";
|
|
5
|
-
import
|
|
5
|
+
import {
|
|
6
|
+
useDynamicConfig
|
|
7
|
+
} from "../../chunk-RNTQ7KEL.js";
|
|
6
8
|
import {
|
|
7
9
|
useFunkitConfig
|
|
8
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-SKYQYPX5.js";
|
|
9
11
|
import {
|
|
10
12
|
useFunkitTranslation
|
|
11
|
-
} from "../../chunk-
|
|
13
|
+
} from "../../chunk-RTHDOT5K.js";
|
|
12
14
|
import "../../chunk-LICTGZXW.js";
|
|
13
15
|
import "../../chunk-2W2P3OS6.js";
|
|
14
|
-
import "../../chunk-
|
|
16
|
+
import "../../chunk-KDZFZETH.js";
|
|
15
17
|
import {
|
|
16
18
|
logger
|
|
17
19
|
} from "../../chunk-B67ESBGC.js";
|
|
@@ -23,84 +25,17 @@ import {
|
|
|
23
25
|
useNadoFeeRates,
|
|
24
26
|
useNadoMaxWithdrawable
|
|
25
27
|
} from "@funkit/connect-core/clients/nado";
|
|
26
|
-
import { useEffect
|
|
28
|
+
import { useEffect, useMemo, useState } from "react";
|
|
27
29
|
|
|
28
30
|
// src/hooks/useAssetPrice.ts
|
|
29
31
|
import { getAssetPriceInfoWithFallback } from "@funkit/connect-core";
|
|
30
32
|
import { skipToken, useQuery } from "@tanstack/react-query";
|
|
31
33
|
|
|
32
34
|
// src/hooks/useIsStablecoin.ts
|
|
33
|
-
import { useCallback
|
|
34
|
-
|
|
35
|
-
// src/hooks/statsig/useDynamicConfig.ts
|
|
36
|
-
import {
|
|
37
|
-
useDynamicConfig as useCoreDynamicConfig
|
|
38
|
-
} from "@funkit/connect-core";
|
|
39
|
-
|
|
40
|
-
// src/hooks/useUserIpInfo.ts
|
|
41
|
-
import { useUserIpInfo as useCoreUserIpInfo } from "@funkit/connect-core";
|
|
42
|
-
|
|
43
|
-
// src/providers/GeneralWalletProvider.tsx
|
|
44
|
-
import React, {
|
|
45
|
-
createContext,
|
|
46
|
-
useCallback,
|
|
47
|
-
useContext,
|
|
48
|
-
useEffect,
|
|
49
|
-
useMemo,
|
|
50
|
-
useRef,
|
|
51
|
-
useState
|
|
52
|
-
} from "react";
|
|
53
|
-
|
|
54
|
-
// src/consts/funkit.ts
|
|
55
|
-
import { FUNKIT_CONNECT_CHECKOUT_NATIVE_CURRENCY_ADDRESS } from "@funkit/chains";
|
|
56
|
-
var PLACEHOLDER_FUNKIT_USER_INFO = {
|
|
57
|
-
id: "0x",
|
|
58
|
-
address: "0x",
|
|
59
|
-
solanaAddress: void 0,
|
|
60
|
-
name: "Guest",
|
|
61
|
-
nameTruncated: "Guest",
|
|
62
|
-
type: "unknown",
|
|
63
|
-
typeLabel: "",
|
|
64
|
-
iconSrc: "",
|
|
65
|
-
isConnected: false
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
// src/providers/GeneralWalletProvider.tsx
|
|
69
|
-
var GeneralWalletContext = createContext({
|
|
70
|
-
walletAddress: "",
|
|
71
|
-
payerWallets: { evmWallet: { address: "" }, solanaWallet: void 0 },
|
|
72
|
-
isUserLoggedIn: false,
|
|
73
|
-
loginType: "guest" /* Guest */,
|
|
74
|
-
connectorId: void 0,
|
|
75
|
-
userInfo: PLACEHOLDER_FUNKIT_USER_INFO,
|
|
76
|
-
l2Address: void 0,
|
|
77
|
-
handleLogout: async () => void 0,
|
|
78
|
-
logoutSymbol: void 0
|
|
79
|
-
});
|
|
80
|
-
var useGeneralWallet = () => {
|
|
81
|
-
return useContext(GeneralWalletContext);
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// src/hooks/useUserIpInfo.ts
|
|
85
|
-
function useUserIpInfo() {
|
|
86
|
-
const { apiKey } = useFunkitConfig();
|
|
87
|
-
const { isUserLoggedIn } = useGeneralWallet();
|
|
88
|
-
return useCoreUserIpInfo({ logger, apiKey, enabled: isUserLoggedIn });
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
// src/hooks/statsig/useDynamicConfig.ts
|
|
92
|
-
var useDynamicConfig = (name, options) => {
|
|
93
|
-
const { userIpInfo } = useUserIpInfo();
|
|
94
|
-
return useCoreDynamicConfig(name, {
|
|
95
|
-
bypassCountryCode: options?.bypassCountryCode,
|
|
96
|
-
countryCode: userIpInfo?.alpha2
|
|
97
|
-
});
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// src/hooks/useIsStablecoin.ts
|
|
35
|
+
import { useCallback } from "react";
|
|
101
36
|
var useIsStablecoin = () => {
|
|
102
37
|
const stablecoinSymbols = useDynamicConfig("stablecoinsymbols");
|
|
103
|
-
return
|
|
38
|
+
return useCallback(
|
|
104
39
|
(symbol) => stablecoinSymbols.some(
|
|
105
40
|
(s) => symbol.toLowerCase().includes(s.toLowerCase())
|
|
106
41
|
),
|
|
@@ -149,11 +84,11 @@ function useNadoWithdrawalForm(config, selectedSourceToken) {
|
|
|
149
84
|
const isNado = !!nadoConfig;
|
|
150
85
|
const subaccount = nadoConfig?.customerConfig.subaccount;
|
|
151
86
|
const { t } = useFunkitTranslation();
|
|
152
|
-
const [spotLeverage, setSpotLeverage] =
|
|
87
|
+
const [spotLeverage, setSpotLeverage] = useState(
|
|
153
88
|
() => nadoConfig?.defaultSpotLeverage ?? false
|
|
154
89
|
);
|
|
155
90
|
const { data: feeRates } = useNadoFeeRates({ sender: subaccount, logger });
|
|
156
|
-
|
|
91
|
+
useEffect(() => {
|
|
157
92
|
setSpotLeverage(nadoConfig?.defaultSpotLeverage ?? false);
|
|
158
93
|
}, [subaccount, nadoConfig?.defaultSpotLeverage]);
|
|
159
94
|
const amountToggle = {
|
|
@@ -162,7 +97,7 @@ function useNadoWithdrawalForm(config, selectedSourceToken) {
|
|
|
162
97
|
checked: spotLeverage,
|
|
163
98
|
onChange: setSpotLeverage
|
|
164
99
|
};
|
|
165
|
-
const sourceOptions =
|
|
100
|
+
const sourceOptions = useMemo(
|
|
166
101
|
() => (nadoConfig?.sourceTokens ?? []).filter(isNadoSourceToken).map(({ asset, customData, symbol, iconSrc }) => ({
|
|
167
102
|
productId: customData.productId,
|
|
168
103
|
symbol,
|