@funkit/connect 9.24.0-next.0 → 9.25.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 +50 -4
- package/dist/clients/aave.d.ts +9 -0
- package/dist/clients/aave.js +4 -1
- package/dist/clients/{chunk-4HCOSF4M.js → chunk-7G3QEQFB.js} +2 -2
- package/dist/clients/{chunk-7FIVHWNC.js → chunk-7UIDHSYG.js} +47 -0
- package/dist/clients/{chunk-UUHGOBKZ.js → chunk-AHYOV7AV.js} +2 -1
- package/dist/clients/{chunk-S7FRYR55.js → chunk-ME4OAQIY.js} +1 -1
- package/dist/clients/{chunk-CEBG7XQ5.js → chunk-MXPZTW2H.js} +212 -1126
- package/dist/clients/chunk-SQ2RX7WY.js +1110 -0
- package/dist/clients/{chunk-KWIR3HO4.js → chunk-VJZW3MA3.js} +1 -1
- package/dist/clients/{chunk-MRBN4XCA.js → chunk-ZEXZQOAO.js} +1 -1
- package/dist/clients/fanatics.css +1 -1
- package/dist/clients/fanatics.js +4 -6
- package/dist/clients/lighter.css +2816 -1
- package/dist/clients/lighter.js +44 -28
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.css +217 -222
- package/dist/clients/polymarket/PolymarketDepositAccountDropdown.js +7 -8
- package/dist/clients/polymarket/createPolymarketDepositConfig.js +3 -3
- package/dist/clients/polymarket/index.css +217 -222
- package/dist/clients/polymarket/index.js +7 -8
- package/dist/clients/polymarket/polymarket.js +2 -2
- package/dist/clients/polymarket/usePolymarketAccountBalances.js +2 -2
- package/dist/clients/rolly.js +1 -1
- package/dist/components/FunCheckoutHistory/FunCheckoutHistoryContent.d.ts +1 -2
- package/dist/components/FunTooltip/FunTooltip.d.ts +10 -5
- package/dist/components/FunTransactionSummary/DestinationHealthFactorRow.d.ts +15 -0
- package/dist/components/FunTransactionSummary/DestinationYieldRows.d.ts +1 -0
- package/dist/components/FunTransactionSummary/PaymentAmountSummary.d.ts +2 -1
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +8 -1
- package/dist/domains/aave.d.ts +14 -9
- package/dist/domains/nado.d.ts +9 -0
- package/dist/hooks/track/CheckoutModalEvent.d.ts +0 -1
- package/dist/hooks/track/WithdrawModalEvent.d.ts +9 -1
- package/dist/hooks/useGetAssetHoldingsFromRpc.d.ts +23 -0
- package/dist/hooks/useInjectedAssetHoldings.d.ts +23 -0
- package/dist/hooks/useXstockAssetHoldings.d.ts +15 -0
- package/dist/hooks/useXstocksWrappedTokenAddress.d.ts +16 -0
- package/dist/index.css +11 -16
- package/dist/index.js +4696 -4117
- package/dist/modals/CheckoutModal/CheckoutComplete/CheckoutComplete.d.ts +1 -1
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -1
- package/dist/modals/CheckoutModal/InputAmount/useNadoDirectTransfer.d.ts +64 -0
- package/dist/modals/CheckoutModal/SelectAsset/SelectAsset.d.ts +1 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +0 -3
- package/dist/modals/WithdrawalModal/LighterWithdrawal.d.ts +25 -4
- package/dist/modals/WithdrawalModal/WithdrawAmountInput.d.ts +10 -1
- package/dist/modals/WithdrawalModal/WithdrawalContent.d.ts +8 -1
- package/dist/modals/WithdrawalModal/WithdrawalSwappedIframeController.d.ts +11 -0
- package/dist/modals/WithdrawalModal/types.d.ts +1 -0
- package/dist/providers/FunkitCheckoutContext/types.d.ts +29 -12
- package/dist/utils/assets.d.ts +7 -0
- package/dist/utils/checkoutHistory.d.ts +1 -5
- package/dist/utils/customer.d.ts +6 -0
- package/dist/wallets/walletConnectors/index.js +50 -50
- package/package.json +6 -6
- package/dist/__generated__/default_configs.d.ts +0 -901
- package/dist/__generated__/default_feature_gates.d.ts +0 -20
- package/dist/clients/chunk-25ICASD7.js +0 -2371
- package/dist/clients/chunk-3GO74QTP.js +0 -2382
- package/dist/clients/chunk-7GWX2ZS4.js +0 -69
- package/dist/clients/chunk-7HNGV6JU.js +0 -54
- package/dist/clients/chunk-A32VN2DX.js +0 -2382
- package/dist/clients/chunk-ELLXM7RO.js +0 -186
- package/dist/clients/chunk-GGXTLJ7J.js +0 -290
- package/dist/clients/chunk-GUWXVR5S.js +0 -186
- package/dist/clients/chunk-HRWCNZJA.js +0 -230
- package/dist/clients/chunk-JBWB54MX.js +0 -69
- package/dist/clients/chunk-JD3FIVZ7.js +0 -69
- package/dist/clients/chunk-JTGKAPID.js +0 -2382
- package/dist/clients/chunk-L7PABCF2.js +0 -54
- package/dist/clients/chunk-LII3SVUH.js +0 -230
- package/dist/clients/chunk-NCUPPJ2Z.js +0 -2382
- package/dist/clients/chunk-NPPIETHZ.js +0 -54
- package/dist/clients/chunk-NUJ6ZM5F.js +0 -186
- package/dist/clients/chunk-UVWNEQMD.js +0 -186
- package/dist/clients/chunk-VVTNR7YH.js +0 -2382
- package/dist/clients/chunk-YYMIRDCQ.js +0 -230
- package/dist/clients/chunk-ZNVFASTH.js +0 -54
- package/dist/clients/nado.d.ts +0 -78
- package/dist/clients/nado.js +0 -107
- package/dist/clients/polymarket.d.ts +0 -161
- package/dist/clients/polymarket.js +0 -688
- package/dist/components/FunCheckoutHistory/FunCheckoutHistoryHelp.d.ts +0 -10
- package/dist/interfaces/logTransport.d.ts +0 -51
- package/dist/interfaces/swapped-transport.d.ts +0 -78
- package/dist/modals/CheckoutModal/CheckoutHelp/CheckoutHelp.d.ts +0 -9
- package/dist/modals/CheckoutModal/SourceChange/EmptyFormOfPaymentsMessage.d.ts +0 -4
- package/dist/modals/CheckoutModal/SourceChange/useUpdateSourceAssetForCard.d.ts +0 -4
- package/dist/modals/CheckoutModal/SwappedIframe/SwappedErrorMessage.d.ts +0 -6
- package/dist/utils/flags/resolver.d.ts +0 -34
- package/dist/wallets/walletConnectors/chunk-4NV5BYRP.js +0 -95
- package/dist/wallets/walletConnectors/chunk-AVDUNQUW.js +0 -96
- package/dist/wallets/walletConnectors/chunk-GUQM4QSL.js +0 -66
- package/dist/wallets/walletConnectors/chunk-IULPZP2Q.js +0 -69
- package/dist/wallets/walletConnectors/chunk-JPN6TWIT.js +0 -92
- package/dist/wallets/walletConnectors/chunk-KCRO2AGO.js +0 -106
- package/dist/wallets/walletConnectors/chunk-KI5Y2BBF.js +0 -94
- package/dist/wallets/walletConnectors/chunk-NR2OGDHQ.js +0 -103
- package/dist/wallets/walletConnectors/chunk-OEEGYENV.js +0 -87
- package/dist/wallets/walletConnectors/chunk-OX37G4YT.js +0 -98
- package/dist/wallets/walletConnectors/chunk-SWFF3TWJ.js +0 -100
- package/dist/wallets/walletConnectors/chunk-TKB2OY6G.js +0 -99
- package/dist/wallets/walletConnectors/chunk-W2LCLDPX.js +0 -70
- package/dist/wallets/walletConnectors/chunk-WAHGI5L7.js +0 -96
- package/dist/wallets/walletConnectors/chunk-WKNQMP4A.js +0 -93
- package/dist/wallets/walletConnectors/chunk-XCNHV3HS.js +0 -110
- package/dist/wallets/walletConnectors/chunk-YO2K4MBH.js +0 -218
- package/dist/wallets/walletConnectors/chunk-YQFGVZGR.js +0 -92
|
@@ -1,186 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
useFunkitTranslation
|
|
4
|
-
} from "./chunk-7FIVHWNC.js";
|
|
5
|
-
|
|
6
|
-
// src/providers/FunkitConfigContext.tsx
|
|
7
|
-
import {
|
|
8
|
-
createContext,
|
|
9
|
-
useContext,
|
|
10
|
-
useMemo
|
|
11
|
-
} from "react";
|
|
12
|
-
var DEFAULT_TEXT_CUSTOMIZATIONS = {
|
|
13
|
-
virtualFiat: "Deposit with SEPA",
|
|
14
|
-
brokerageOrExchange: "Connect Exchange",
|
|
15
|
-
debitOrCredit: "Deposit with Card",
|
|
16
|
-
accountBalance: "Wallet",
|
|
17
|
-
selectAccount: "Select an exchange",
|
|
18
|
-
perpsTransferTitle: "Transfer",
|
|
19
|
-
sourceMethodTitle: "Your source",
|
|
20
|
-
tokensListTitle: "Your tokens",
|
|
21
|
-
transferTokens: "Transfer Crypto",
|
|
22
|
-
bitcoinLightning: "Bitcoin on Cash App",
|
|
23
|
-
receiveDropdownTitle: "",
|
|
24
|
-
// Default to empty
|
|
25
|
-
receiveDropdownLabel: "Asset to Receive",
|
|
26
|
-
confirmationScreen: {
|
|
27
|
-
payAmountLabel: "You send",
|
|
28
|
-
receiveAmountLabel: "You receive"
|
|
29
|
-
},
|
|
30
|
-
paymentMethodSubtitles: {}
|
|
31
|
-
};
|
|
32
|
-
var DEFAULT_UI_CUSTOMIZATIONS = {
|
|
33
|
-
alignTitle: "center",
|
|
34
|
-
alwaysShowTopDivider: false,
|
|
35
|
-
showModalTitle: true,
|
|
36
|
-
callToActionsUppercase: false,
|
|
37
|
-
enableCompactList: false,
|
|
38
|
-
checkoutHistory: {
|
|
39
|
-
showGetHelpAsAlert: true,
|
|
40
|
-
simplifiedUi: false
|
|
41
|
-
},
|
|
42
|
-
confirmationScreen: {
|
|
43
|
-
preferDestinationWhenSame: false,
|
|
44
|
-
showAmountSummaryAbovePaymentMethod: false,
|
|
45
|
-
showDisclaimerAsAlert: true,
|
|
46
|
-
showInstantTimeEstimate: false,
|
|
47
|
-
showLeftAlignedDollarValueWithLabel: false,
|
|
48
|
-
showPaymentAmountUsd: false,
|
|
49
|
-
showReceiveAmountUsd: false,
|
|
50
|
-
showSelectedRoute: false,
|
|
51
|
-
stepIndicatorType: "spinner",
|
|
52
|
-
showTokenAmount: true,
|
|
53
|
-
showTransactionDigest: "none"
|
|
54
|
-
},
|
|
55
|
-
sourceChangeScreen: {
|
|
56
|
-
bottomBarCloseButton: {
|
|
57
|
-
enabled: false,
|
|
58
|
-
labelKey: "common.close"
|
|
59
|
-
},
|
|
60
|
-
showTargetAssetSelection: false,
|
|
61
|
-
showWalletOnInsufficientBalance: false,
|
|
62
|
-
showWalletConnect: true,
|
|
63
|
-
showCustomTopComponentDivider: false,
|
|
64
|
-
paymentMethodIcons: {}
|
|
65
|
-
},
|
|
66
|
-
inputAmountScreen: {
|
|
67
|
-
allowTokenAmountInput: true
|
|
68
|
-
},
|
|
69
|
-
selectAssetScreen: {
|
|
70
|
-
isSecondaryTokenSymbolVisible: true,
|
|
71
|
-
navigateOnAssetClick: false
|
|
72
|
-
},
|
|
73
|
-
transferCryptoScreen: {
|
|
74
|
-
showYouSendYouReceive: false
|
|
75
|
-
},
|
|
76
|
-
withdrawalScreen: {},
|
|
77
|
-
selectBrokerageScreen: {},
|
|
78
|
-
connectExchangeScreen: {},
|
|
79
|
-
customIcons: {},
|
|
80
|
-
customFontFamily: {
|
|
81
|
-
primary: "",
|
|
82
|
-
secondary: "",
|
|
83
|
-
tertiary: ""
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
var DEFAULT_FUNKIT_CONFIG = {
|
|
87
|
-
apiKey: "",
|
|
88
|
-
appName: "",
|
|
89
|
-
textCustomizations: DEFAULT_TEXT_CUSTOMIZATIONS,
|
|
90
|
-
uiCustomizations: DEFAULT_UI_CUSTOMIZATIONS
|
|
91
|
-
};
|
|
92
|
-
var FunkitConfigContext = createContext(
|
|
93
|
-
DEFAULT_FUNKIT_CONFIG
|
|
94
|
-
);
|
|
95
|
-
function useFunkitConfig() {
|
|
96
|
-
const originalFunkitConfig = useContext(FunkitConfigContext);
|
|
97
|
-
const { t } = useFunkitTranslation();
|
|
98
|
-
const translatedDefaults = useMemo(() => {
|
|
99
|
-
return {
|
|
100
|
-
virtualFiat: t("textCustomizations.virtualFiat"),
|
|
101
|
-
brokerageOrExchange: t("textCustomizations.brokerageOrExchange"),
|
|
102
|
-
debitOrCredit: t("textCustomizations.debitOrCredit"),
|
|
103
|
-
accountBalance: t("textCustomizations.accountBalance"),
|
|
104
|
-
selectAccount: t("textCustomizations.selectAccount"),
|
|
105
|
-
perpsTransferTitle: t("perpsTransfer.title"),
|
|
106
|
-
sourceMethodTitle: t("textCustomizations.sourceMethodTitle"),
|
|
107
|
-
tokensListTitle: t("textCustomizations.tokensListTitle"),
|
|
108
|
-
transferTokens: t("textCustomizations.transferTokens"),
|
|
109
|
-
bitcoinLightning: t("textCustomizations.bitcoinLightning"),
|
|
110
|
-
receiveDropdownTitle: t("textCustomizations.receiveDropdownTitle"),
|
|
111
|
-
receiveDropdownLabel: t("textCustomizations.receiveDropdownLabel"),
|
|
112
|
-
confirmationScreen: {
|
|
113
|
-
payAmountLabel: t("textCustomizations.payAmountLabel"),
|
|
114
|
-
receiveAmountLabel: t("textCustomizations.receiveAmountLabel")
|
|
115
|
-
},
|
|
116
|
-
paymentMethodSubtitles: {}
|
|
117
|
-
};
|
|
118
|
-
}, [t]);
|
|
119
|
-
const finalFunkitConfig = useMemo(() => {
|
|
120
|
-
return {
|
|
121
|
-
...DEFAULT_FUNKIT_CONFIG,
|
|
122
|
-
...originalFunkitConfig,
|
|
123
|
-
textCustomizations: {
|
|
124
|
-
...translatedDefaults,
|
|
125
|
-
...originalFunkitConfig.textCustomizations,
|
|
126
|
-
confirmationScreen: {
|
|
127
|
-
...translatedDefaults.confirmationScreen,
|
|
128
|
-
...originalFunkitConfig.textCustomizations?.confirmationScreen
|
|
129
|
-
},
|
|
130
|
-
paymentMethodSubtitles: {
|
|
131
|
-
...translatedDefaults.paymentMethodSubtitles,
|
|
132
|
-
...originalFunkitConfig.textCustomizations?.paymentMethodSubtitles
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
uiCustomizations: {
|
|
136
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations,
|
|
137
|
-
...originalFunkitConfig.uiCustomizations,
|
|
138
|
-
checkoutHistory: {
|
|
139
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.checkoutHistory,
|
|
140
|
-
...originalFunkitConfig.uiCustomizations?.checkoutHistory
|
|
141
|
-
},
|
|
142
|
-
confirmationScreen: {
|
|
143
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.confirmationScreen,
|
|
144
|
-
...originalFunkitConfig.uiCustomizations?.confirmationScreen
|
|
145
|
-
},
|
|
146
|
-
connectExchangeScreen: {
|
|
147
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.connectExchangeScreen,
|
|
148
|
-
...originalFunkitConfig.uiCustomizations?.connectExchangeScreen
|
|
149
|
-
},
|
|
150
|
-
inputAmountScreen: {
|
|
151
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.inputAmountScreen,
|
|
152
|
-
...originalFunkitConfig.uiCustomizations?.inputAmountScreen
|
|
153
|
-
},
|
|
154
|
-
selectAssetScreen: {
|
|
155
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.selectAssetScreen,
|
|
156
|
-
...originalFunkitConfig.uiCustomizations?.selectAssetScreen
|
|
157
|
-
},
|
|
158
|
-
selectBrokerageScreen: {
|
|
159
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.selectBrokerageScreen,
|
|
160
|
-
...originalFunkitConfig.uiCustomizations?.selectBrokerageScreen
|
|
161
|
-
},
|
|
162
|
-
sourceChangeScreen: {
|
|
163
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.sourceChangeScreen,
|
|
164
|
-
...originalFunkitConfig.uiCustomizations?.sourceChangeScreen,
|
|
165
|
-
bottomBarCloseButton: {
|
|
166
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.sourceChangeScreen.bottomBarCloseButton,
|
|
167
|
-
...originalFunkitConfig.uiCustomizations?.sourceChangeScreen?.bottomBarCloseButton
|
|
168
|
-
}
|
|
169
|
-
},
|
|
170
|
-
transferCryptoScreen: {
|
|
171
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.transferCryptoScreen,
|
|
172
|
-
...originalFunkitConfig.uiCustomizations?.transferCryptoScreen
|
|
173
|
-
},
|
|
174
|
-
withdrawalScreen: {
|
|
175
|
-
...DEFAULT_FUNKIT_CONFIG.uiCustomizations.withdrawalScreen,
|
|
176
|
-
...originalFunkitConfig.uiCustomizations?.withdrawalScreen
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
};
|
|
180
|
-
}, [originalFunkitConfig, translatedDefaults]);
|
|
181
|
-
return finalFunkitConfig;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
export {
|
|
185
|
-
useFunkitConfig
|
|
186
|
-
};
|