@funkit/connect 9.0.3 → 9.2.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.
Files changed (73) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/__generated__/default_configs.d.ts +6 -0
  3. package/dist/clients/chunk-SBQ2UUPK.js +214 -0
  4. package/dist/clients/fanatics.js +3 -211
  5. package/dist/clients/polymarket.d.ts +41 -0
  6. package/dist/clients/polymarket.js +345 -0
  7. package/dist/components/Dropdown/ReceiveTokenDropdown.d.ts +3 -1
  8. package/dist/components/FunCheckoutHistory/PendingSuccessScreen.d.ts +13 -0
  9. package/dist/components/FunDivider/FunDivider.d.ts +2 -1
  10. package/dist/consts/bluvo.d.ts +5 -1
  11. package/dist/consts/customers.d.ts +0 -1
  12. package/dist/domains/swapped.d.ts +5 -1
  13. package/dist/hooks/track/CheckoutModalEvent.d.ts +2 -1
  14. package/dist/hooks/useCheckoutDirectExecution.d.ts +1 -1
  15. package/dist/hooks/useFrogAccount.d.ts +1 -1
  16. package/dist/hooks/useFunkitMaxCheckoutUsdInfo.d.ts +5 -5
  17. package/dist/hooks/useIsUsUser.d.ts +0 -1
  18. package/dist/index.css +130 -118
  19. package/dist/index.js +21451 -21458
  20. package/dist/modals/CheckoutModal/Brokerage/components/BrokerageSuccess.d.ts +1 -1
  21. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +0 -1
  22. package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -4
  23. package/dist/modals/CheckoutModal/InputAmount/state.d.ts +1 -5
  24. package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +4 -3
  25. package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +1 -0
  26. package/dist/modals/CheckoutModal/stepTransition.d.ts +1 -7
  27. package/dist/modals/WithdrwalModal/WithdrawalCallbackSuccess.d.ts +10 -0
  28. package/dist/providers/FunkitCheckoutContext/index.d.ts +1 -1
  29. package/dist/providers/FunkitCheckoutContext/types.d.ts +6 -4
  30. package/dist/utils/flags/config.d.ts +15 -1
  31. package/dist/utils/withdrawal.d.ts +13 -0
  32. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  33. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  34. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  35. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  36. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  37. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  38. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  39. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/index.js +51 -51
  42. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  43. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  44. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  45. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  46. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  47. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  48. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  49. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  50. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  51. package/package.json +3 -3
  52. package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenter.d.ts +0 -12
  53. package/dist/modals/CheckoutModal/DirectExecutionNotifCenter/DirectExecutionNotifCenterContent.d.ts +0 -10
  54. package/dist/modals/CheckoutModal/SourceChange/DefiPurchaseSection.d.ts +0 -7
  55. package/dist/modals/WithdrwalModal/WithdrawalNotification.d.ts +0 -12
  56. package/dist/wallets/walletConnectors/{chunk-NEK7T3IC.js → chunk-4C7ER452.js} +3 -3
  57. package/dist/wallets/walletConnectors/{chunk-UVMMPRDM.js → chunk-53VYSPXK.js} +3 -3
  58. package/dist/wallets/walletConnectors/{chunk-I7K6LUZR.js → chunk-6UCI7GM6.js} +3 -3
  59. package/dist/wallets/walletConnectors/{chunk-3Y2GG3PM.js → chunk-6YO27XOM.js} +3 -3
  60. package/dist/wallets/walletConnectors/{chunk-DWMUM4F6.js → chunk-7OARWILZ.js} +3 -3
  61. package/dist/wallets/walletConnectors/{chunk-FDVJHNLL.js → chunk-CJJT7LMT.js} +3 -3
  62. package/dist/wallets/walletConnectors/{chunk-CT3QPTAU.js → chunk-EKJHJFRN.js} +3 -3
  63. package/dist/wallets/walletConnectors/{chunk-TIT5F32X.js → chunk-GH4M6FTK.js} +3 -3
  64. package/dist/wallets/walletConnectors/{chunk-UVYZSGIX.js → chunk-GSHSWVEG.js} +3 -3
  65. package/dist/wallets/walletConnectors/{chunk-CMLFDRCP.js → chunk-GVOQTORD.js} +3 -3
  66. package/dist/wallets/walletConnectors/{chunk-3YCR2ZB4.js → chunk-HETS3KKI.js} +3 -3
  67. package/dist/wallets/walletConnectors/{chunk-C4RP2DNH.js → chunk-HOPH3TQ3.js} +3 -3
  68. package/dist/wallets/walletConnectors/{chunk-CBI3SGOC.js → chunk-IICWJWGZ.js} +3 -3
  69. package/dist/wallets/walletConnectors/{chunk-ZMRIQOR5.js → chunk-KO56HCTI.js} +3 -3
  70. package/dist/wallets/walletConnectors/{chunk-COX3VEDR.js → chunk-LI6QY2B5.js} +3 -3
  71. package/dist/wallets/walletConnectors/{chunk-RLLTYOWT.js → chunk-PKMAPNN6.js} +3 -3
  72. package/dist/wallets/walletConnectors/{chunk-UPUDLUBT.js → chunk-TTHM3WUR.js} +3 -3
  73. package/dist/wallets/walletConnectors/{chunk-N3UJMC3V.js → chunk-XBLHZICW.js} +3 -3
@@ -0,0 +1,345 @@
1
+ "use client";
2
+ import {
3
+ logger
4
+ } from "./chunk-SBQ2UUPK.js";
5
+
6
+ // src/clients/polymarket.tsx
7
+ import {
8
+ POLYMARKET_API_KEY,
9
+ initializeCheckoutTokenTransferAddress
10
+ } from "@funkit/api-base";
11
+ import { polygon } from "viem/chains";
12
+
13
+ // src/domains/paymentMethods.ts
14
+ import { exhaustiveCheck, formatAddress } from "@funkit/utils";
15
+
16
+ // src/consts/bluvo.tsx
17
+ import { ETHEREAL_API_KEY } from "@funkit/api-base";
18
+ import React6 from "react";
19
+
20
+ // src/components/Icons/BinanceIcon.tsx
21
+ import React from "react";
22
+ var BinanceIcon = ({ size = 24 }) => {
23
+ return /* @__PURE__ */ React.createElement(
24
+ "svg",
25
+ {
26
+ width: size,
27
+ height: size,
28
+ viewBox: "0 0 20 20",
29
+ fill: "none",
30
+ xmlns: "http://www.w3.org/2000/svg"
31
+ },
32
+ /* @__PURE__ */ React.createElement("rect", { width: "20", height: "20", rx: "4", fill: "#F3BA2F" }),
33
+ /* @__PURE__ */ React.createElement(
34
+ "path",
35
+ {
36
+ d: "M7.67 9.04 10 6.71l2.33 2.34 1.36-1.36L10 4 6.31 7.69zM4 10l1.36-1.36L6.7 10l-1.35 1.36zm3.67.96L10 13.29l2.33-2.33 1.36 1.35-3.69 3.7-3.69-3.7zm5.62-.96 1.35-1.35L16 10l-1.36 1.36z",
37
+ fill: "#fff"
38
+ }
39
+ ),
40
+ /* @__PURE__ */ React.createElement(
41
+ "path",
42
+ {
43
+ d: "M11.38 10 10 8.62 8.98 9.64l-.11.12-.25.24L10 11.38z",
44
+ fill: "#fff"
45
+ }
46
+ )
47
+ );
48
+ };
49
+
50
+ // src/components/Icons/CoinbaseIcon.tsx
51
+ import React2 from "react";
52
+ var CoinbaseIcon = ({ size = 24 }) => {
53
+ return /* @__PURE__ */ React2.createElement(
54
+ "svg",
55
+ {
56
+ xmlns: "http://www.w3.org/2000/svg",
57
+ width: size,
58
+ height: size,
59
+ viewBox: "0 0 20 20",
60
+ fill: "none"
61
+ },
62
+ /* @__PURE__ */ React2.createElement("rect", { width: "20", height: "20", rx: "4", fill: "#2C5FF6" }),
63
+ /* @__PURE__ */ React2.createElement(
64
+ "path",
65
+ {
66
+ d: "M9.99 13.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5c1.76 0 3.22 1.305 3.46 3h3.52A7.005 7.005 0 0 0 9.99 3c-3.86 0-7 3.14-7 7s3.14 7 7 7c3.69 0 6.725-2.87 6.98-6.5h-3.52c-.24 1.695-1.7 3-3.46 3Z",
67
+ fill: "#fff"
68
+ }
69
+ )
70
+ );
71
+ };
72
+
73
+ // src/components/Icons/GateIoIcon.tsx
74
+ import React3 from "react";
75
+ var GateIoIcon = ({ size = 24 }) => {
76
+ return /* @__PURE__ */ React3.createElement(
77
+ "svg",
78
+ {
79
+ width: size,
80
+ height: size,
81
+ viewBox: "0 0 25 25",
82
+ fill: "none",
83
+ xmlns: "http://www.w3.org/2000/svg"
84
+ },
85
+ /* @__PURE__ */ React3.createElement("rect", { width: "25", height: "25", rx: "5.357", fill: "#fff" }),
86
+ /* @__PURE__ */ React3.createElement("g", { clipPath: "url(#a)" }, /* @__PURE__ */ React3.createElement(
87
+ "mask",
88
+ {
89
+ id: "b",
90
+ maskUnits: "userSpaceOnUse",
91
+ x: "5",
92
+ y: "5",
93
+ width: "15",
94
+ height: "15",
95
+ style: { maskType: "luminance" }
96
+ },
97
+ /* @__PURE__ */ React3.createElement("path", { d: "M5 5h15v15H5V5Z", fill: "#fff" })
98
+ ), /* @__PURE__ */ React3.createElement("g", { mask: "url(#b)" }, /* @__PURE__ */ React3.createElement(
99
+ "path",
100
+ {
101
+ fillRule: "evenodd",
102
+ clipRule: "evenodd",
103
+ d: "M12.5 16.625a4.125 4.125 0 0 1 0-8.25V5a7.5 7.5 0 1 0 7.5 7.5h-3.375a4.125 4.125 0 0 1-4.125 4.125Z",
104
+ fill: "#2354E6"
105
+ }
106
+ )), /* @__PURE__ */ React3.createElement(
107
+ "path",
108
+ {
109
+ fillRule: "evenodd",
110
+ clipRule: "evenodd",
111
+ d: "M12.5 12.5h4.125V8.375H12.5V12.5Z",
112
+ fill: "#17E6A1"
113
+ }
114
+ )),
115
+ /* @__PURE__ */ React3.createElement("defs", null, /* @__PURE__ */ React3.createElement("clipPath", { id: "a" }, /* @__PURE__ */ React3.createElement("path", { fill: "#fff", transform: "translate(5 5)", d: "M0 0h15v15H0z" })))
116
+ );
117
+ };
118
+
119
+ // src/components/Icons/GeminiIcon.tsx
120
+ import React4 from "react";
121
+ var GeminiIcon = ({ size = 24 }) => {
122
+ return /* @__PURE__ */ React4.createElement(
123
+ "svg",
124
+ {
125
+ width: size,
126
+ height: size,
127
+ viewBox: "0 0 20 20",
128
+ fill: "none",
129
+ xmlns: "http://www.w3.org/2000/svg"
130
+ },
131
+ /* @__PURE__ */ React4.createElement(
132
+ "path",
133
+ {
134
+ d: "M16 0H4a4 4 0 0 0-4 4v12a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4",
135
+ fill: "#58C8E6"
136
+ }
137
+ ),
138
+ /* @__PURE__ */ React4.createElement(
139
+ "path",
140
+ {
141
+ d: "M15.025 7.686H8.661a3.21 3.21 0 0 1 3.182-2.746 3.21 3.21 0 0 1 3.182 2.746m-3.653.94v2.746H8.626V8.626zm-.035 3.686a3.21 3.21 0 0 1-3.182 2.746 3.21 3.21 0 0 1-3.183-2.746zm-6.365-.94A3.23 3.23 0 0 1 7.686 8.66v2.71zm10.053-2.746a3.23 3.23 0 0 1-2.711 2.71v-2.71zM11.843 4C9.734 4 7.937 5.624 7.712 7.712A4.18 4.18 0 0 0 4 11.843 4.16 4.16 0 0 0 8.157 16c2.109 0 3.909-1.624 4.131-3.712C14.376 12.063 16 10.266 16 8.157A4.16 4.16 0 0 0 11.843 4",
142
+ fill: "#fff"
143
+ }
144
+ )
145
+ );
146
+ };
147
+
148
+ // src/components/Icons/KrakenIcon.tsx
149
+ import React5 from "react";
150
+ var KrakenIcon = ({ size = 24 }) => {
151
+ return /* @__PURE__ */ React5.createElement(
152
+ "svg",
153
+ {
154
+ width: size,
155
+ height: size,
156
+ viewBox: "0 0 20 20",
157
+ fill: "none",
158
+ xmlns: "http://www.w3.org/2000/svg"
159
+ },
160
+ /* @__PURE__ */ React5.createElement(
161
+ "path",
162
+ {
163
+ d: "M16 0H4a4 4 0 0 0-4 4v12a4 4 0 0 0 4 4h12a4 4 0 0 0 4-4V4a4 4 0 0 0-4-4",
164
+ fill: "#5741D9"
165
+ }
166
+ ),
167
+ /* @__PURE__ */ React5.createElement(
168
+ "path",
169
+ {
170
+ d: "M4 11.78v-.67a6.4 6.4 0 0 1 .83-3.26 6 6 0 0 1 2.64-2.3A6 6 0 0 1 9.89 5q1.84-.02 3.4.96a5.6 5.6 0 0 1 2.64 4.18q.1.9.07 1.82l-.01.98q0 .22-.05.43c-.15.54-.8.8-1.27.49a.8.8 0 0 1-.35-.57l-.04-.48v-1.98q0-.4-.26-.68a.83.83 0 0 0-1.17-.04 1 1 0 0 0-.32.65v.28l-.01 2.19c0 .41-.33.73-.76.76a1 1 0 0 1-.56-.17.8.8 0 0 1-.3-.48l-.03-.33v-2.2a1 1 0 0 0-.26-.65.84.84 0 0 0-1.25.02 1 1 0 0 0-.24.64V13q0 .28-.1.54a1 1 0 0 1-.32.34.8.8 0 0 1-1.17-.4 1 1 0 0 1-.07-.38V11q.01-.24-.05-.47a.9.9 0 0 0-.72-.62c-.37-.06-.65.11-.85.4q-.14.22-.14.46v2q.02.3-.04.59a.84.84 0 0 1-.87.63.9.9 0 0 1-.74-.63A1 1 0 0 1 4 13z",
171
+ fill: "#fff"
172
+ }
173
+ )
174
+ );
175
+ };
176
+
177
+ // src/consts/bluvo.tsx
178
+ var BLUVO_MIN_DEPOSIT_BY_CUSTOMER = {
179
+ [ETHEREAL_API_KEY]: 15
180
+ };
181
+ var BLUVO_EXCHANGES = {
182
+ coinbase: {
183
+ icon: (size) => /* @__PURE__ */ React6.createElement(CoinbaseIcon, { size }),
184
+ name: "Coinbase"
185
+ },
186
+ binance: {
187
+ icon: (size) => /* @__PURE__ */ React6.createElement(BinanceIcon, { size }),
188
+ name: "Binance"
189
+ },
190
+ gemini: {
191
+ icon: (size) => /* @__PURE__ */ React6.createElement(GeminiIcon, { size }),
192
+ name: "Gemini"
193
+ },
194
+ kraken: {
195
+ icon: (size) => /* @__PURE__ */ React6.createElement(KrakenIcon, { size }),
196
+ name: "Kraken"
197
+ },
198
+ gate: {
199
+ icon: (size) => /* @__PURE__ */ React6.createElement(GateIoIcon, { size }),
200
+ name: "Gate"
201
+ }
202
+ };
203
+ function getExchangeName(brokerType) {
204
+ return BLUVO_EXCHANGES[brokerType].name;
205
+ }
206
+
207
+ // src/domains/paymentMethods.ts
208
+ function createPaymentMethodInfo(params) {
209
+ switch (params.paymentMethod) {
210
+ case "card" /* CARD */:
211
+ return {
212
+ paymentMethod: "card" /* CARD */,
213
+ title: params.titleCustomization,
214
+ description: ""
215
+ };
216
+ case "balance" /* ACCOUNT_BALANCE */:
217
+ return {
218
+ paymentMethod: "balance" /* ACCOUNT_BALANCE */,
219
+ title: "Your Wallet",
220
+ description: formatAddress(params.walletAddress || "")
221
+ };
222
+ case "brokerage" /* BROKERAGE */:
223
+ return {
224
+ paymentMethod: "brokerage" /* BROKERAGE */,
225
+ title: getExchangeName(params.exchange),
226
+ description: "",
227
+ deviceId: params.deviceId,
228
+ exchange: params.exchange
229
+ };
230
+ case "token_transfer" /* TOKEN_TRANSFER */:
231
+ return {
232
+ // this is an arbitrary value for Polymarket.
233
+ paymentMethod: "token_transfer" /* TOKEN_TRANSFER */,
234
+ title: "QR Code Transfer",
235
+ description: ""
236
+ };
237
+ case "virtual_bank" /* VIRTUAL_BANK */:
238
+ return {
239
+ paymentMethod: "virtual_bank" /* VIRTUAL_BANK */,
240
+ title: "Fiat Account",
241
+ description: "",
242
+ matchingFiatAccount: params.matchingFiatAccount,
243
+ bridgeCustomer: params.bridgeCustomer
244
+ };
245
+ default:
246
+ exhaustiveCheck(params);
247
+ return {};
248
+ }
249
+ }
250
+
251
+ // src/domains/clientMetadata.ts
252
+ function generateClientMetadataForTokenTransfer() {
253
+ return {
254
+ id: "",
255
+ startTimestampMs: 0,
256
+ finalDollarValue: 0,
257
+ latestQuote: null,
258
+ depositAddress: null,
259
+ initSettings: {
260
+ config: {
261
+ targetAsset: "0x",
262
+ targetChain: "",
263
+ targetAssetTicker: "",
264
+ checkoutItemTitle: ""
265
+ }
266
+ },
267
+ selectedSourceAssetInfo: {
268
+ address: "0x",
269
+ symbol: "",
270
+ chainId: "",
271
+ iconSrc: null
272
+ },
273
+ selectedPaymentMethodInfo: createPaymentMethodInfo({
274
+ paymentMethod: "token_transfer" /* TOKEN_TRANSFER */
275
+ })
276
+ };
277
+ }
278
+
279
+ // src/clients/polymarket.tsx
280
+ var PMCT_WITHDRAW_ACTION_TYPE = "PMCT_WITHDRAW";
281
+ var POLYGON_USDCE = "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174";
282
+ function createPolymarketWithdrawalCallback(config) {
283
+ const { userId, sendPmctTransfer } = config;
284
+ return async (param) => {
285
+ const { targetAssetAddress, targetChainId, destinationAddress, funQuote } = param;
286
+ logger.info("polymarket:withdrawal:start", {
287
+ targetChainId,
288
+ targetAssetAddress,
289
+ destinationAddress,
290
+ quoteId: param.quoteId
291
+ });
292
+ const transferInit = await initializeCheckoutTokenTransferAddress({
293
+ apiKey: POLYMARKET_API_KEY,
294
+ userId,
295
+ recipientAddr: destinationAddress,
296
+ toChainId: targetChainId.toString(),
297
+ toTokenAddress: targetAssetAddress,
298
+ logger,
299
+ clientMetadata: {
300
+ ...generateClientMetadataForTokenTransfer(),
301
+ isWithdrawal: true
302
+ }
303
+ // TODO: add this actionType back
304
+ // we need a backend release to pass the actual actionType for it.
305
+ // otherwise the current checkout will fail due to UDA creation
306
+ // actionType: PMCT_WITHDRAW_ACTION_TYPE,
307
+ });
308
+ const udaAddress = transferInit.depositAddr;
309
+ logger.info("polymarket:withdrawal:udaGenerated", { udaAddress });
310
+ const quote = funQuote;
311
+ const amountStr = quote?.baseQuote?.estTotalFromAmountBaseUnit;
312
+ if (!amountStr) {
313
+ logger.error("polymarket:withdrawal:missingAmountInQuote", { quote });
314
+ throw new Error("Missing withdrawal amount in quote");
315
+ }
316
+ const amount = BigInt(amountStr);
317
+ await sendPmctTransfer({
318
+ udaAddress,
319
+ amountBaseUnit: amount
320
+ });
321
+ logger.info("polymarket:withdrawal:transferSubmitted", {
322
+ udaAddress,
323
+ amountBaseUnit: amountStr
324
+ });
325
+ };
326
+ }
327
+ function createPolymarketWithdrawalConfig(config) {
328
+ return {
329
+ modalTitle: config.modalTitle ?? "Withdraw",
330
+ sourceChainId: polygon.id.toString(),
331
+ sourceTokenSymbol: "PMCT",
332
+ defaultReceiveToken: "USDC",
333
+ // TODO: PMCT is not deployed yet. we need to update this later
334
+ sourceTokenAddress: POLYGON_USDCE,
335
+ iconSrc: "https://sdk-cdn.fun.xyz/images/pmct.png",
336
+ disableConnectedWallet: config.disableConnectedWallet,
337
+ // sending $3 is enough to trigger Fun's UDA flow
338
+ getMinWithdrawalUSD: () => 3,
339
+ withdrawCallback: createPolymarketWithdrawalCallback(config)
340
+ };
341
+ }
342
+ export {
343
+ PMCT_WITHDRAW_ACTION_TYPE,
344
+ createPolymarketWithdrawalConfig
345
+ };
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { DynamicTargetAssetCandidate } from '../../providers/FunkitCheckoutContext';
3
+ import type { BaseActiveDropdownItemProps } from './BaseActiveDropdownItem';
3
4
  import { type BaseDropdownProps } from './BaseDropdown';
4
5
  interface ReceiveTokenDropdownProps {
5
6
  chainId: number;
@@ -11,6 +12,7 @@ interface ReceiveTokenDropdownProps {
11
12
  activeItemLabel?: string;
12
13
  activeItemProps?: BaseDropdownProps['activeItemProps'];
13
14
  maxDropdownHeight?: BaseDropdownProps['maxDropdownHeight'];
15
+ size?: BaseActiveDropdownItemProps['size'];
14
16
  }
15
- export declare const ReceiveTokenDropdown: ({ tokens, chainId, selectedToken, onTokenSelected, label, activeItemLabel, activeItemProps, maxDropdownHeight, displayedChainId, }: ReceiveTokenDropdownProps) => React.JSX.Element;
17
+ export declare const ReceiveTokenDropdown: ({ tokens, chainId, selectedToken, onTokenSelected, label, activeItemLabel, activeItemProps, maxDropdownHeight, size, displayedChainId, }: ReceiveTokenDropdownProps) => React.JSX.Element;
16
18
  export {};
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import type { TextConfigSteps } from '../../components/TransactionStatus/TransactionStatus';
3
+ import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
4
+ export interface PendingSuccessScreenProps {
5
+ bottomBarId: string;
6
+ onClose: () => void;
7
+ onAction: () => void;
8
+ customTextConfigSteps?: TextConfigSteps;
9
+ quote?: FunkitCheckoutQuoteResult | null;
10
+ isWithdrawal?: boolean;
11
+ hideYouReceive: boolean;
12
+ }
13
+ export declare const PendingSuccessScreen: ({ bottomBarId, onClose, onAction, customTextConfigSteps, quote, isWithdrawal, hideYouReceive, }: PendingSuccessScreenProps) => React.JSX.Element | null;
@@ -5,6 +5,7 @@ interface FunDividerProps {
5
5
  marginBottom?: BoxProps['marginBottom'];
6
6
  borderColor?: BoxProps['borderColor'];
7
7
  label?: string;
8
+ className?: string;
8
9
  }
9
- export declare function FunDivider({ marginTop, marginBottom, borderColor, label, }: FunDividerProps): React.JSX.Element;
10
+ export declare function FunDivider({ marginTop, marginBottom, borderColor, label, className, }: FunDividerProps): React.JSX.Element;
10
11
  export {};
@@ -11,7 +11,8 @@ export declare enum BluvoExchangeType {
11
11
  Coinbase = "coinbase",
12
12
  Binance = "binance",
13
13
  Gemini = "gemini",
14
- Kraken = "kraken"
14
+ Kraken = "kraken",
15
+ Gate = "gate"
15
16
  }
16
17
  export type BluvoExchangeInfo = {
17
18
  icon: (size: number) => React.JSX.Element | null;
@@ -36,6 +37,9 @@ export declare const SUPPORTED_EXCHANGES: readonly [{
36
37
  }, {
37
38
  readonly exchange: BluvoExchangeType.Gemini;
38
39
  readonly status: BluvoExchangeStatus.ComingSoon;
40
+ }, {
41
+ readonly exchange: BluvoExchangeType.Gate;
42
+ readonly status: BluvoExchangeStatus.ComingSoon;
39
43
  }];
40
44
  export declare const BLUVO_EXCHANGES: Readonly<Record<BluvoExchangeType, BluvoExchangeInfo>>;
41
45
  export declare function getExchangeIcon(brokerType: BluvoExchangeType, size: number): React.JSX.Element | null;
@@ -1,7 +1,6 @@
1
1
  import type { FunkitCheckoutConfig } from '../providers/FunkitCheckoutContext';
2
2
  export declare function isPolymarketCustomer(apiKey: string): apiKey is "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
3
3
  export declare function isOstiumCustomer(apiKey: string): apiKey is "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN";
4
- export declare function isBankrCustomer(apiKey: string): apiKey is "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ";
5
4
  export declare function isBsxCustomer(apiKey: string): apiKey is "zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1";
6
5
  export declare function isEtherealCustomer(apiKey: string): apiKey is "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
7
6
  export declare function isHyperdashCustomer(apiKey: string): apiKey is "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe";
@@ -1,5 +1,9 @@
1
1
  import type { ExchangeRates, SwappedFormOfPayment } from '@funkit/api-base';
2
- export declare function sortFops<T extends SwappedFormOfPayment>(fops: T[]): T[];
2
+ /**
3
+ * Sorts fops by a priority order list (array of fopType strings, index = priority).
4
+ * Fops not in the list are sorted by max checkout limit descending.
5
+ */
6
+ export declare function sortFops<T extends SwappedFormOfPayment>(fops: T[], priorityOrder: readonly string[]): T[];
3
7
  /**
4
8
  * Rounds down to:
5
9
  * - >= $1M: nearest $100,000
@@ -15,7 +15,6 @@ export declare enum CheckoutModalEvent {
15
15
  NAVIGATE_MELD_QUOTES = "fc::navigate::meld_quotes",
16
16
  NAVIGATE_MELD_REDIRECT = "fc::navigate::meld_redirect",
17
17
  NAVIGATE_MELD_CURRENCY_SELECT = "fc::navigate::meld_currency_select",
18
- NAVIGATE_DIRECT_EXECUTION_NOTIF_CENTER = "fc::navigate::direct_execution_notif_center",
19
18
  NAVIGATE_KYC_IFRAME = "fc::navigate::kyc_iframe",
20
19
  NAVIGATE_CREATE_FIAT_ACCOUNT = "fc::navigate::create_fiat_account",
21
20
  NAVIGATE_LOADING_ACCOUNT = "fc::navigate::loading_account",
@@ -47,6 +46,8 @@ export declare enum CheckoutModalEvent {
47
46
  QUICK_OPTION_SELECTED = "fc::input_amount::quick_option_selected",
48
47
  SWAPPED_IFRAME_NAVIGATION = "fc::swapped_iframe::navigation",
49
48
  SWAPPED_IFRAME_NAVIGATION_INITIAL = "fc::swapped_iframe::navigation::initial",
49
+ SWAPPED_IFRAME_NAVIGATION_LOGIN = "fc::swapped_iframe::navigation::login",
50
+ SWAPPED_IFRAME_NAVIGATION_2FA = "fc::swapped_iframe::navigation::2fa",
50
51
  SWAPPED_IFRAME_NAVIGATION_KYC = "fc::swapped_iframe::navigation::kyc",
51
52
  SWAPPED_IFRAME_NAVIGATION_PAYMENT = "fc::swapped_iframe::navigation::payment",
52
53
  SWAPPED_IFRAME_NAVIGATION_CONFIRMATION = "fc::swapped_iframe::navigation::confirmation",
@@ -22,7 +22,7 @@ interface RegularDEQuoteRequest extends DirectExecutionQuoteRequestParamsBase {
22
22
  isExactIn?: false;
23
23
  }
24
24
  interface WithdrawalDEQuoteRequest extends DirectExecutionQuoteRequestParamsBase {
25
- fromTokenAmount: number;
25
+ fromTokenAmount: string;
26
26
  isExactIn: true;
27
27
  fromTokenDecimals: number;
28
28
  }
@@ -1,6 +1,6 @@
1
1
  import { type BridgeVirtualBankAccount, type Guid } from '@funkit/api-base';
2
2
  import { type AllFiatAccounts } from '../domains/bridge';
3
- export declare function useIfFiatEnabledRegardlessOfUDA(): boolean;
3
+ export declare function useIsSepaUser(): boolean;
4
4
  export declare function useFiatEnabled(): boolean;
5
5
  export declare function useFrogAccounts(): import("@tanstack/react-query").UseQueryResult<import("@funkit/api-base").SubAccount[] | null, Error>;
6
6
  export declare function useClearFrogAccountsCache(): {
@@ -2,19 +2,19 @@
2
2
  * Retrieves the maximum checkout amount in USD and formats the limit text.
3
3
  *
4
4
  * @description
5
- * This hook uses a feature flag to determine the maximum checkout amount.
6
- * If the amount is Number.MAX_VALUE, it returns 'no' as the limit text.
5
+ * This hook uses a Statsig dynamic config to determine the maximum checkout amount.
6
+ * If the amount is negative (e.g. -1), it returns 'no' as the limit text (no limit).
7
7
  * Otherwise, it formats the amount as a currency string with specific formatting options.
8
8
  *
9
9
  * @returns {Object} An object containing:
10
- * - `value`: The maximum checkout amount in USD (number). Defaults to Number.MAX_VALUE.
10
+ * - `value`: The maximum checkout amount in USD (number). Defaults to Number.MAX_VALUE (no limit).
11
11
  * - `limitLabel`: A formatted string representing the checkout limit
12
- * - Returns 'no' if the limit is Number.MAX_VALUE (default)
12
+ * - Returns 'no' if the limit is negative (no limit, e.g. -1)
13
13
  * - Otherwise, returns a formatted currency string (e.g., '$1k')
14
14
  *
15
15
  * @example
16
16
  * // Example usage in a component
17
- * const { value, limitLabel } = useFunkitMaxCheckoutUsd();
17
+ * const { value, limitLabel } = useFunkitMaxCheckoutUsdInfo();
18
18
  * console.log(value); // e.g., 1000
19
19
  * console.log(limitLabel); // e.g., '$1k'
20
20
  * console.log(limitLabel); // e.g., 'no'
@@ -1,2 +1 @@
1
1
  export declare function useIsUsUser(): boolean;
2
- export declare function useIsUsBankrUser(): boolean;