@funkit/connect 9.11.0-next.0 → 9.11.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 (94) hide show
  1. package/CHANGELOG.md +15 -4
  2. package/dist/__generated__/default_feature_gates.d.ts +1 -0
  3. package/dist/clients/fanatics.css +1 -1
  4. package/dist/clients/fanatics.js +1 -1
  5. package/dist/clients/lighter.css +1 -1
  6. package/dist/clients/lighter.js +1 -1
  7. package/dist/clients/polymarket.js +74 -27
  8. package/dist/components/FunSelectBrokerage/FunSelectBrokerage.d.ts +5 -4
  9. package/dist/consts/bluvo.d.ts +27 -0
  10. package/dist/domains/swapped.d.ts +1 -1
  11. package/dist/hooks/useTokenTransfer.d.ts +2 -1
  12. package/dist/index.css +10 -10
  13. package/dist/index.js +2662 -2343
  14. package/dist/modals/CheckoutModal/Brokerage/SelectBrokerage.d.ts +1 -1
  15. package/dist/modals/CheckoutModal/InputAmount/useMeld.d.ts +1 -1
  16. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  17. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  18. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  19. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  20. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  21. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  22. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  23. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  24. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  25. package/dist/wallets/walletConnectors/index.js +68 -68
  26. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  27. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  28. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  29. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  31. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  32. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  33. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  34. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  35. package/package.json +5 -5
  36. package/dist/chunk-64NZSUGQ.js +0 -368
  37. package/dist/chunk-B2B6HDIE.js +0 -238
  38. package/dist/chunk-OQNN7EMQ.js +0 -238
  39. package/dist/chunk-S65TG73G.js +0 -247
  40. package/dist/chunk-VLAOBEJN.js +0 -247
  41. package/dist/clients/chunk-3LSYVQXK.js +0 -289
  42. package/dist/clients/chunk-5HU2XDR2.js +0 -289
  43. package/dist/clients/chunk-DKWYHSW3.js +0 -225
  44. package/dist/clients/chunk-IPK5DVIL.js +0 -229
  45. package/dist/clients/chunk-PVOHWTSR.js +0 -289
  46. package/dist/clients/chunk-SBQ2UUPK.js +0 -214
  47. package/dist/components/Dropdown/TokenAndChainDropdown.css.d.ts +0 -1
  48. package/dist/hooks/statsig/checkFeatureGate.d.ts +0 -19
  49. package/dist/hooks/track/CheckoutTrackingContext.d.ts +0 -60
  50. package/dist/hooks/useTokenChain.d.ts +0 -21
  51. package/dist/modals/CheckoutModal/SwappedIframe/SwappedIframeContainer.d.ts +0 -17
  52. package/dist/modals/WithdrwalModal/WithdrawalCallbackSuccess.d.ts +0 -10
  53. package/dist/modals/WithdrwalModal/WithdrawalContent.d.ts +0 -11
  54. package/dist/modals/WithdrwalModal/WithdrawalModal.d.ts +0 -9
  55. package/dist/modals/WithdrwalModal/WithdrawalSuccess.d.ts +0 -15
  56. package/dist/modals/WithdrwalModal/types.d.ts +0 -5
  57. package/dist/modals/WithdrwalModal/useWithdrawal.d.ts +0 -24
  58. package/dist/wallets/walletConnectors/chunk-3ZJN3PXP.js +0 -87
  59. package/dist/wallets/walletConnectors/chunk-4C7ER452.js +0 -93
  60. package/dist/wallets/walletConnectors/chunk-53VYSPXK.js +0 -66
  61. package/dist/wallets/walletConnectors/chunk-55VS2NKG.js +0 -95
  62. package/dist/wallets/walletConnectors/chunk-6UCI7GM6.js +0 -98
  63. package/dist/wallets/walletConnectors/chunk-6YO27XOM.js +0 -96
  64. package/dist/wallets/walletConnectors/chunk-7IEUTLHY.js +0 -98
  65. package/dist/wallets/walletConnectors/chunk-7OARWILZ.js +0 -92
  66. package/dist/wallets/walletConnectors/chunk-AZYMJ4C6.js +0 -70
  67. package/dist/wallets/walletConnectors/chunk-CJJT7LMT.js +0 -96
  68. package/dist/wallets/walletConnectors/chunk-EKJHJFRN.js +0 -69
  69. package/dist/wallets/walletConnectors/chunk-FWM4KTOV.js +0 -106
  70. package/dist/wallets/walletConnectors/chunk-GH4M6FTK.js +0 -95
  71. package/dist/wallets/walletConnectors/chunk-GSHSWVEG.js +0 -70
  72. package/dist/wallets/walletConnectors/chunk-GVOQTORD.js +0 -87
  73. package/dist/wallets/walletConnectors/chunk-HETS3KKI.js +0 -218
  74. package/dist/wallets/walletConnectors/chunk-HOPH3TQ3.js +0 -99
  75. package/dist/wallets/walletConnectors/chunk-IICWJWGZ.js +0 -110
  76. package/dist/wallets/walletConnectors/chunk-IMNI4AGV.js +0 -99
  77. package/dist/wallets/walletConnectors/chunk-IRHK6SOW.js +0 -218
  78. package/dist/wallets/walletConnectors/chunk-J3PJOMO7.js +0 -96
  79. package/dist/wallets/walletConnectors/chunk-KO56HCTI.js +0 -106
  80. package/dist/wallets/walletConnectors/chunk-LEAZMT5Y.js +0 -92
  81. package/dist/wallets/walletConnectors/chunk-LI6QY2B5.js +0 -94
  82. package/dist/wallets/walletConnectors/chunk-OD6B2ISG.js +0 -69
  83. package/dist/wallets/walletConnectors/chunk-OSOB6QYX.js +0 -92
  84. package/dist/wallets/walletConnectors/chunk-PKMAPNN6.js +0 -92
  85. package/dist/wallets/walletConnectors/chunk-RZQ4B4Z7.js +0 -96
  86. package/dist/wallets/walletConnectors/chunk-TTHM3WUR.js +0 -100
  87. package/dist/wallets/walletConnectors/chunk-UFYNHHDU.js +0 -100
  88. package/dist/wallets/walletConnectors/chunk-UYW6MV74.js +0 -93
  89. package/dist/wallets/walletConnectors/chunk-VMMROPXK.js +0 -110
  90. package/dist/wallets/walletConnectors/chunk-XBLHZICW.js +0 -103
  91. package/dist/wallets/walletConnectors/chunk-YGMU5VWD.js +0 -66
  92. package/dist/wallets/walletConnectors/chunk-ZJJWGKB6.js +0 -103
  93. package/dist/wallets/walletConnectors/chunk-ZL6XCMV5.js +0 -94
  94. /package/dist/clients/{chunk-GCAV3VTB.js → chunk-LMEQD56M.js} +0 -0
@@ -1,214 +0,0 @@
1
- "use client";
2
-
3
- // src/utils/funLogger.ts
4
- import { datadogLogs } from "@datadog/browser-logs";
5
- import { DEV_API_KEY } from "@funkit/api-base";
6
- var DDOG_CLIENT_TOKEN = "pub4f86c6be8c792cb48dc156a8c17d9a47";
7
- var FUN_DEV_API_KEYS = [
8
- "hnHevQR0y394nBprGrvNx4HgoZHUwMet5mXTOBhf",
9
- "MYny3w7xJh6PRlRgkJ9604sHouY2MTke6lCPpSHq",
10
- DEV_API_KEY
11
- ];
12
- function setDdogEnv(environment) {
13
- datadogLogs.setGlobalContextProperty("env", environment);
14
- }
15
- function setDdogTrackingConsent(consent) {
16
- datadogLogs.setTrackingConsent(consent);
17
- }
18
- var FunLogger = class {
19
- constructor() {
20
- setDdogEnv("development" /* DEVELOPMENT */);
21
- setDdogTrackingConsent("granted");
22
- this.apiKey = null;
23
- this.isDebugMode = false;
24
- this.userId = null;
25
- this.userAddress = null;
26
- this.userName = null;
27
- this.userLoginType = null;
28
- this.sdkVersion = null;
29
- this.l2Address = null;
30
- this.isConfigured = false;
31
- this.logQueue = [];
32
- this.disableLogging = false;
33
- }
34
- getFunLogEnv() {
35
- if (!this.apiKey || FUN_DEV_API_KEYS.includes(this.apiKey)) {
36
- return "development" /* DEVELOPMENT */;
37
- }
38
- return "production" /* PRODUCTION */;
39
- }
40
- logDataDog(level, title, data, error) {
41
- if (typeof window === "undefined") {
42
- return;
43
- }
44
- const datadogData = {
45
- data,
46
- apiKey: this.apiKey,
47
- userId: this.userId,
48
- userName: this.userName,
49
- userAddress: this.userAddress,
50
- userLoginType: this.userLoginType,
51
- sdkVersion: this.sdkVersion
52
- };
53
- switch (level) {
54
- case "info":
55
- datadogLogs.logger.info(title, datadogData);
56
- break;
57
- case "debug":
58
- datadogLogs.logger.debug(title, datadogData);
59
- break;
60
- case "warn":
61
- datadogLogs.logger.warn(title, datadogData);
62
- break;
63
- case "error":
64
- datadogLogs.logger.error(title, datadogData, error);
65
- }
66
- }
67
- processLog(level, title, data, error) {
68
- if (!this.isConfigured) {
69
- this.logQueue.push({ level, title, data, error });
70
- return;
71
- }
72
- if (!this.apiKey) {
73
- console.error(
74
- "FunLogger: apiKey is not set. Please call configure() with a valid apiKey."
75
- );
76
- return;
77
- }
78
- const isProd = this.getFunLogEnv() === "production" /* PRODUCTION */;
79
- if (isProd) {
80
- this.logDataDog(level, title, data, error);
81
- }
82
- if (!isProd || this.isDebugMode) {
83
- const formattedData = data || "";
84
- switch (level) {
85
- case "debug":
86
- console.debug(title, formattedData);
87
- break;
88
- case "info":
89
- console.log(title, formattedData);
90
- break;
91
- case "warn":
92
- console.warn(title, formattedData);
93
- break;
94
- case "error":
95
- console.error(title, formattedData, error);
96
- break;
97
- }
98
- }
99
- }
100
- onDebug({ title, data }) {
101
- this.processLog("debug", title, data);
102
- }
103
- onInfo({ title, data }) {
104
- this.processLog("info", title, data);
105
- }
106
- onWarn({ title, data }) {
107
- this.processLog("warn", title, data);
108
- }
109
- onError({ title, error, data }) {
110
- this.processLog("error", title, data, error);
111
- }
112
- extractError(error) {
113
- if (error instanceof Error) {
114
- return error;
115
- }
116
- if (typeof error === "object" && error !== null && "error" in error && error.error instanceof Error) {
117
- return error.error;
118
- }
119
- return null;
120
- }
121
- /**========================
122
- * PUBLIC LOGGER FUNCTIONS
123
- *=========================*/
124
- log(title, data) {
125
- this.onInfo({ title, data });
126
- }
127
- info(title, data) {
128
- this.onInfo({ title, data });
129
- }
130
- debug(title, data) {
131
- this.onDebug({ title, data });
132
- }
133
- warn(title, data) {
134
- this.onWarn({ title, data });
135
- }
136
- /**
137
- * @param errorOrData -
138
- * Previously was called "error" but since in the {@link Logger} interface, error is defined as object (which is the same thing as "any"), we treat it as of unknown type here for safety.
139
- * In a lot of places it's actually being used as a "data" prop, which also usually has an `.error` property representing an actual {@link Error} object.
140
- */
141
- error(title, errorOrData, _data = {}) {
142
- const error = this.extractError(errorOrData) ?? void 0;
143
- const data = {
144
- ..._data,
145
- ...typeof errorOrData === "object" && errorOrData !== null ? errorOrData : {}
146
- };
147
- this.onError({ title, error, data });
148
- }
149
- flushLogQueue() {
150
- const queueCopy = [...this.logQueue];
151
- this.logQueue = [];
152
- for (const queuedLog of queueCopy) {
153
- const { level, title, data, error } = queuedLog;
154
- switch (level) {
155
- case "debug":
156
- this.onDebug({ title, data });
157
- break;
158
- case "info":
159
- this.onInfo({ title, data });
160
- break;
161
- case "warn":
162
- this.onWarn({ title, data });
163
- break;
164
- case "error":
165
- this.onError({ title, data, error });
166
- break;
167
- }
168
- }
169
- }
170
- configure(apiKey, isDebug, sdkVersion, disableLogging = false) {
171
- this.apiKey = apiKey;
172
- this.isDebugMode = isDebug;
173
- this.sdkVersion = sdkVersion;
174
- this.disableLogging = disableLogging;
175
- this.isConfigured = true;
176
- setDdogEnv(this.getFunLogEnv());
177
- setDdogTrackingConsent(this.disableLogging ? "not-granted" : "granted");
178
- this.flushLogQueue();
179
- }
180
- getUserId() {
181
- return this.userId;
182
- }
183
- getUserAddress() {
184
- return this.userAddress;
185
- }
186
- getUserName() {
187
- return this.userName;
188
- }
189
- getUserLoginType() {
190
- return this.userLoginType;
191
- }
192
- getL2Address() {
193
- return this.l2Address;
194
- }
195
- setUserInfo(userId, userAddress, userName, userLoginType, l2Address) {
196
- this.userId = userId;
197
- this.userAddress = userAddress;
198
- this.userName = userName;
199
- this.userLoginType = userLoginType;
200
- this.l2Address = l2Address ?? null;
201
- }
202
- };
203
- datadogLogs.init({
204
- clientToken: DDOG_CLIENT_TOKEN,
205
- site: "datadoghq.com",
206
- forwardErrorsToLogs: false,
207
- sessionSampleRate: 100,
208
- service: "connect-sdk"
209
- });
210
- var logger = new FunLogger();
211
-
212
- export {
213
- logger
214
- };
@@ -1 +0,0 @@
1
- export declare const hideOnXsmallScreenSize: string;
@@ -1,19 +0,0 @@
1
- import fallbackFeatureGates from '../../__generated__/default_feature_gates';
2
- type FeatureGateName = keyof typeof fallbackFeatureGates;
3
- /**
4
- * Synchronous, non-hook variant of {@link useFeatureGate}. Reads the gate
5
- * value directly from the connect package's Statsig client singleton.
6
- *
7
- * Use this from non-React contexts (event handlers, async callbacks created
8
- * outside render) where calling a hook is not possible. Behavior:
9
- * - Returns the live gate value once `FunkitStatsigProvider`'s async init
10
- * has resolved (typical case for event-driven calls — by the time a user
11
- * clicks a button, init has long since completed).
12
- * - Returns the bundled default if called before init completes or if the
13
- * provider has not been mounted (graceful fallback rather than throw).
14
- *
15
- * For render-time consumers, prefer {@link useFeatureGate} so the consumer
16
- * re-renders when values update mid-session.
17
- */
18
- export declare function checkFeatureGate(name: FeatureGateName): boolean;
19
- export {};
@@ -1,60 +0,0 @@
1
- import React, { type ReactNode } from 'react';
2
- import type { FunCheckoutStep } from '../../modals/CheckoutModal/FunCheckoutStep';
3
- /**
4
- * Read-only per-session metadata auto-attached by {@link useTrack} to every
5
- * Statsig event emitted inside the checkout modal tree. All three fields
6
- * already exist on the state machine — this context just surfaces them:
7
- *
8
- * - `checkoutId` — `modalState.checkoutId` (client-generated UUID from
9
- * `initNewCheckout`). Joins Statsig events to
10
- * `analytics.checkouts` in Redshift.
11
- * - `step` — `modalState.step` (current `FunCheckoutStep`).
12
- * - `modalOpenedAt` — `checkoutItem.startTimestampMs`. `useTrack` derives
13
- * `time_since_modal_ms` = `Date.now() - modalOpenedAt`
14
- * at emission time.
15
- *
16
- * Outside the provider (e.g. `useTrack` called from a non-checkout surface)
17
- * every field is `null` and `useTrack` elides the attachment.
18
- */
19
- export interface CheckoutTrackingContextValue {
20
- checkoutId: string | null;
21
- step: FunCheckoutStep | null;
22
- modalOpenedAt: number | null;
23
- }
24
- interface CheckoutTrackingProviderProps extends CheckoutTrackingContextValue {
25
- children: ReactNode;
26
- }
27
- /**
28
- * Root provider. Memoizes `value` against the three primitive fields so
29
- * consumers only re-render when one of them actually changes (not on
30
- * every parent render). The three fields are already-derived state owned
31
- * by `FunCheckoutModal` / `useCheckoutModalTransition`; we surface them
32
- * here rather than duplicating storage.
33
- */
34
- export declare function CheckoutTrackingProvider({ children, checkoutId, step, modalOpenedAt, }: CheckoutTrackingProviderProps): React.JSX.Element;
35
- export declare function useCheckoutTrackingContext(): CheckoutTrackingContextValue;
36
- /**
37
- * Build the shared-metadata fields (`checkoutId`, `step`,
38
- * `time_since_modal_ms`) inline at emission sites that run *outside* this
39
- * provider and therefore can't use `useTrack`'s auto-attach.
40
- *
41
- * Those sites are:
42
- * - `FunkitCheckoutContext.initNewCheckout` — modal not mounted yet
43
- * - `FunkitCheckoutContext.confirmCheckout` — app-level, above the modal
44
- * - `useCheckoutModalTransition.{trackNextState,onBack,onCloseWrapper}` —
45
- * the hook that *produces* the provider's value; it cannot also
46
- * consume it
47
- *
48
- * Keep this as a pure helper — no hooks. The three fields mirror the
49
- * contract in {@link CheckoutTrackingContextValue}; any new auto-attached
50
- * field should be added to both in the same commit.
51
- */
52
- export declare function buildCheckoutSessionMetadata(checkoutItem: {
53
- id: string;
54
- startTimestampMs: number;
55
- }, step: FunCheckoutStep): {
56
- checkoutId: string;
57
- step: FunCheckoutStep;
58
- time_since_modal_ms: string;
59
- };
60
- export {};
@@ -1,21 +0,0 @@
1
- import type { CheckoutInitTokenTransferResponse } from '@funkit/api-base';
2
- import type { TokenTransferSourceChainsAndAssets } from '../modals/CheckoutModal/TransferToken/TransferToken';
3
- export type TransferTokenDefault = {
4
- token: string;
5
- chainId: number;
6
- };
7
- interface UseTokenChainResult {
8
- assets: TokenTransferSourceChainsAndAssets;
9
- selectedChainId: number;
10
- handleChainChange: (chainId?: number, autoUpdate?: boolean) => void;
11
- selectedToken: string;
12
- selectedChainName: string;
13
- handleTokenChange: (token: string, chainId?: number, autoUpdate?: boolean) => void;
14
- }
15
- /**
16
- * Semi reusable hook (tied into token transfer configuration)
17
- * ensures token&chain dropdown preselection logic is reusable
18
- * @param transferInit - used for chain&token solana filtering, can be omitted if not needed
19
- */
20
- export declare const useTokenAndChainSelection: (transferInit: CheckoutInitTokenTransferResponse | undefined, defaultValues?: TransferTokenDefault, isWithdrawal?: boolean) => UseTokenChainResult;
21
- export {};
@@ -1,17 +0,0 @@
1
- import type { SwappedFormOfPayment } from '@funkit/api-base';
2
- import React from 'react';
3
- import type { PaymentMethodType } from '../../../hooks/usePaymentSources';
4
- import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from '../../../modals/CheckoutModal/stepTransition';
5
- export type SwappedIframeState = CheckoutModalCommonState & {
6
- /** The selected payment option from the fops API */
7
- selectedPaymentOption: SwappedFormOfPayment;
8
- /** Payment method type filter to restore when returning to SOURCE_CHANGE */
9
- paymentMethodTypeFilter?: PaymentMethodType;
10
- /** Set to true when an error occurs (iframe error or load timeout) */
11
- error?: boolean;
12
- };
13
- export type SwappedIframeNext = {
14
- success?: boolean;
15
- };
16
- export declare const SwappedIframeInfo: ModalStepInfo<FunCheckoutStep.SWAPPED_IFRAME>;
17
- export declare function SwappedIframeContainer({ modalState, onBack, onClose, setModalState, }: ModalStepComponentProps<FunCheckoutStep.SWAPPED_IFRAME>): React.JSX.Element;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
3
- interface WithdrawalCallbackSuccessProps {
4
- bottomBarId: string;
5
- onClose: () => void;
6
- onNewWithdrawal: () => void;
7
- quote: FunkitCheckoutQuoteResult | undefined;
8
- }
9
- export declare const WithdrawalCallbackSuccess: ({ bottomBarId, onClose, onNewWithdrawal, quote, }: WithdrawalCallbackSuccessProps) => React.JSX.Element;
10
- export {};
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import type { Hex } from 'viem';
3
- import type { FunkitActiveWithdrawalItem, FunkitWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
4
- import { type WithdrawalFormData } from './useWithdrawal';
5
- interface WithdrawContentProps {
6
- onContinue: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
7
- config: FunkitWithdrawalConfig;
8
- withdrawalItem: FunkitActiveWithdrawalItem | null;
9
- }
10
- export declare const WithdrawContent: ({ onContinue, config, withdrawalItem, }: WithdrawContentProps) => React.JSX.Element;
11
- export {};
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { FunkitWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
3
- export declare const WITHDRAWAL_MODAL_CONTENT_ID = "withdrawal-modal-content";
4
- export interface WithdrawalModalProps {
5
- open: boolean;
6
- onClose: () => void;
7
- config: FunkitWithdrawalConfig;
8
- }
9
- export declare function WithdrawalModal({ onClose, open, config, }: WithdrawalModalProps): React.JSX.Element;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import type { Address } from 'viem';
3
- interface WithdrawSuccessProps {
4
- depositAddress: Address;
5
- amount: number;
6
- token: string;
7
- tokenIconSrc: string;
8
- chainId: string;
9
- txHash: string;
10
- bottomBarId: string;
11
- onNewWithdrawal: () => void;
12
- onClose: () => void;
13
- }
14
- export declare const WithdrawSuccess: ({ depositAddress, bottomBarId, onNewWithdrawal, onClose, }: WithdrawSuccessProps) => React.JSX.Element;
15
- export {};
@@ -1,5 +0,0 @@
1
- export declare enum WithdrawalModalStep {
2
- ENTER_AMOUNT = "ENTER_AMOUNT",
3
- SUCCESS = "SUCCESS",
4
- PENDING_CALLBACK = "PENDING_CALLBACK"
5
- }
@@ -1,24 +0,0 @@
1
- import type { Address, Hex } from 'viem';
2
- import type { FunkitCheckoutQuoteResult } from '../../domains/quote';
3
- import { type FunkitActiveWithdrawalItem, type FunkitWithdrawalConfig } from '../../providers/FunkitCheckoutContext';
4
- import { type CheckoutConfirmationError } from '../CheckoutModal/ConfirmationStep/useCheckoutConfirmation';
5
- interface UseWithdrawalResult {
6
- handleWithdrawal: (withdrawal: WithdrawalFormData) => Promise<void>;
7
- isWithdrawing: boolean;
8
- withdrawalError: CheckoutConfirmationError | null;
9
- stepMessage: string | null;
10
- }
11
- export type WithdrawalFormData = {
12
- destinationAddress: Address;
13
- withdrawalUSD: string;
14
- tokenSymbol: string;
15
- tokenAddress: Address;
16
- chainId: number;
17
- quote: FunkitCheckoutQuoteResult;
18
- };
19
- export declare function useWithdrawal({ config, withdrawalItem, onSuccess, }: {
20
- config: FunkitWithdrawalConfig;
21
- withdrawalItem: FunkitActiveWithdrawalItem | null;
22
- onSuccess: (withdrawal: WithdrawalFormData, txHash: Hex) => void;
23
- }): UseWithdrawalResult;
24
- export {};
@@ -1,87 +0,0 @@
1
- "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-FMVNQKZL.js";
5
- import {
6
- getInjectedConnector,
7
- hasInjectedProvider
8
- } from "./chunk-YYYRPQHB.js";
9
-
10
- // src/wallets/walletConnectors/clvWallet/clvWallet.ts
11
- var clvWallet = ({
12
- projectId,
13
- walletConnectParameters
14
- }) => {
15
- const isCLVInjected = hasInjectedProvider({ namespace: "clover" });
16
- const shouldUseWalletConnect = !isCLVInjected;
17
- return {
18
- id: "clv",
19
- name: "CLV",
20
- iconUrl: async () => (await import("./clvWallet-VVMLP7BK.js")).default,
21
- iconBackground: "#fff",
22
- iconAccent: "#BDFDE2",
23
- installed: isCLVInjected,
24
- downloadUrls: {
25
- chrome: "https://chrome.google.com/webstore/detail/clv-wallet/nhnkbkgjikgcigadomkphalanndcapjk",
26
- ios: "https://apps.apple.com/app/clover-wallet/id1570072858",
27
- mobile: "https://apps.apple.com/app/clover-wallet/id1570072858",
28
- qrCode: "https://clv.org/"
29
- },
30
- extension: {
31
- instructions: {
32
- learnMoreUrl: "https://clv.org/",
33
- steps: [
34
- {
35
- description: "wallet_connectors.clv.extension.step1.description",
36
- step: "install",
37
- title: "wallet_connectors.clv.extension.step1.title"
38
- },
39
- {
40
- description: "wallet_connectors.clv.extension.step2.description",
41
- step: "create",
42
- title: "wallet_connectors.clv.extension.step2.title"
43
- },
44
- {
45
- description: "wallet_connectors.clv.extension.step3.description",
46
- step: "refresh",
47
- title: "wallet_connectors.clv.extension.step3.title"
48
- }
49
- ]
50
- }
51
- },
52
- mobile: {
53
- getUri: shouldUseWalletConnect ? (uri) => uri : void 0
54
- },
55
- qrCode: shouldUseWalletConnect ? {
56
- getUri: (uri) => uri,
57
- instructions: {
58
- learnMoreUrl: "https://clv.org/",
59
- steps: [
60
- {
61
- description: "wallet_connectors.clv.qr_code.step1.description",
62
- step: "install",
63
- title: "wallet_connectors.clv.qr_code.step1.title"
64
- },
65
- {
66
- description: "wallet_connectors.clv.qr_code.step2.description",
67
- step: "create",
68
- title: "wallet_connectors.clv.qr_code.step2.title"
69
- },
70
- {
71
- description: "wallet_connectors.clv.qr_code.step3.description",
72
- step: "scan",
73
- title: "wallet_connectors.clv.qr_code.step3.title"
74
- }
75
- ]
76
- }
77
- } : void 0,
78
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
79
- projectId,
80
- walletConnectParameters
81
- }) : getInjectedConnector({ namespace: "clover" })
82
- };
83
- };
84
-
85
- export {
86
- clvWallet
87
- };
@@ -1,93 +0,0 @@
1
- "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-MAPXJUOO.js";
5
- import {
6
- getInjectedConnector,
7
- hasInjectedProvider
8
- } from "./chunk-BAVE62IL.js";
9
-
10
- // src/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.ts
11
- import { isMobile } from "@funkit/utils";
12
- var tokenPocketWallet = ({
13
- projectId,
14
- walletConnectParameters
15
- }) => {
16
- const isTokenPocketInjected = hasInjectedProvider({ flag: "isTokenPocket" });
17
- const shouldUseWalletConnect = !isTokenPocketInjected;
18
- const getUri = (uri) => {
19
- return isMobile() ? `tpoutside://wc?uri=${encodeURIComponent(uri)}` : uri;
20
- };
21
- return {
22
- id: "tokenPocket",
23
- name: "TokenPocket",
24
- rdns: "pro.tokenpocket",
25
- iconUrl: async () => (await import("./tokenPocketWallet-FLFG3JUQ.js")).default,
26
- iconBackground: "#2980FE",
27
- installed: !shouldUseWalletConnect ? isTokenPocketInjected : void 0,
28
- downloadUrls: {
29
- chrome: "https://chrome.google.com/webstore/detail/tokenpocket/mfgccjchihfkkindfppnaooecgfneiii",
30
- browserExtension: "https://extension.tokenpocket.pro/",
31
- android: "https://play.google.com/store/apps/details?id=vip.mytokenpocket",
32
- ios: "https://apps.apple.com/us/app/tp-global-wallet/id6444625622",
33
- qrCode: "https://tokenpocket.pro/en/download/app",
34
- mobile: "https://tokenpocket.pro/en/download/app"
35
- },
36
- mobile: {
37
- getUri: shouldUseWalletConnect ? getUri : void 0
38
- },
39
- qrCode: shouldUseWalletConnect ? {
40
- getUri,
41
- instructions: {
42
- learnMoreUrl: "https://help.tokenpocket.pro/en/",
43
- steps: [
44
- {
45
- description: "wallet_connectors.token_pocket.qr_code.step1.description",
46
- step: "install",
47
- title: "wallet_connectors.token_pocket.qr_code.step1.title"
48
- },
49
- {
50
- description: "wallet_connectors.token_pocket.qr_code.step2.description",
51
- step: "create",
52
- title: "wallet_connectors.token_pocket.qr_code.step2.title"
53
- },
54
- {
55
- description: "wallet_connectors.token_pocket.qr_code.step3.description",
56
- step: "scan",
57
- title: "wallet_connectors.token_pocket.qr_code.step3.title"
58
- }
59
- ]
60
- }
61
- } : void 0,
62
- extension: {
63
- instructions: {
64
- learnMoreUrl: "https://help.tokenpocket.pro/en/extension-wallet/faq/installation-tutorial",
65
- steps: [
66
- {
67
- description: "wallet_connectors.token_pocket.extension.step1.description",
68
- step: "install",
69
- title: "wallet_connectors.token_pocket.extension.step1.title"
70
- },
71
- {
72
- description: "wallet_connectors.token_pocket.extension.step2.description",
73
- step: "create",
74
- title: "wallet_connectors.token_pocket.extension.step2.title"
75
- },
76
- {
77
- description: "wallet_connectors.token_pocket.extension.step3.description",
78
- step: "refresh",
79
- title: "wallet_connectors.token_pocket.extension.step3.title"
80
- }
81
- ]
82
- }
83
- },
84
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
85
- projectId,
86
- walletConnectParameters
87
- }) : getInjectedConnector({ flag: "isTokenPocket" })
88
- };
89
- };
90
-
91
- export {
92
- tokenPocketWallet
93
- };
@@ -1,66 +0,0 @@
1
- "use client";
2
- import {
3
- getWalletConnectConnector
4
- } from "./chunk-MAPXJUOO.js";
5
- import {
6
- getInjectedConnector,
7
- hasInjectedProvider
8
- } from "./chunk-BAVE62IL.js";
9
-
10
- // src/wallets/walletConnectors/foxWallet/foxWallet.ts
11
- var foxWallet = ({
12
- projectId,
13
- walletConnectParameters
14
- }) => {
15
- const isFoxInjected = hasInjectedProvider({
16
- namespace: "foxwallet.ethereum"
17
- });
18
- const shouldUseWalletConnect = !isFoxInjected;
19
- return {
20
- id: "foxwallet",
21
- name: "FoxWallet",
22
- iconUrl: async () => (await import("./foxWallet-I7D5KIW4.js")).default,
23
- iconBackground: "#fff",
24
- downloadUrls: {
25
- android: "https://play.google.com/store/apps/details?id=com.foxwallet.play",
26
- ios: "https://apps.apple.com/app/foxwallet-crypto-web3/id1590983231",
27
- qrCode: "https://foxwallet.com/download"
28
- },
29
- mobile: {
30
- getUri: shouldUseWalletConnect ? (uri) => {
31
- return `foxwallet://wc?uri=${encodeURIComponent(uri)}`;
32
- } : void 0
33
- },
34
- qrCode: shouldUseWalletConnect ? {
35
- getUri: (uri) => uri,
36
- instructions: {
37
- learnMoreUrl: "https://foxwallet.com",
38
- steps: [
39
- {
40
- description: "wallet_connectors.fox.qr_code.step1.description",
41
- step: "install",
42
- title: "wallet_connectors.fox.qr_code.step1.title"
43
- },
44
- {
45
- description: "wallet_connectors.fox.qr_code.step2.description",
46
- step: "create",
47
- title: "wallet_connectors.fox.qr_code.step2.title"
48
- },
49
- {
50
- description: "wallet_connectors.fox.qr_code.step3.description",
51
- step: "scan",
52
- title: "wallet_connectors.fox.qr_code.step3.title"
53
- }
54
- ]
55
- }
56
- } : void 0,
57
- createConnector: shouldUseWalletConnect ? getWalletConnectConnector({
58
- projectId,
59
- walletConnectParameters
60
- }) : getInjectedConnector({ namespace: "foxwallet.ethereum" })
61
- };
62
- };
63
-
64
- export {
65
- foxWallet
66
- };