@funkit/connect 5.5.13-next.1 → 5.5.13-next.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.
@@ -15,6 +15,7 @@ export type ConfirmationStepNext = {
15
15
  moonpayData?: MoonpayDepositData;
16
16
  paymentMethodInfo: PaymentMethodInfo;
17
17
  redirectBackToSourceChange?: boolean;
18
+ isSendingToQr: boolean;
18
19
  };
19
20
  export declare const ConfirmationStepInfo: ModalStepInfo<FunCheckoutStep.CONFIRMATION>;
20
21
  export declare function ConfirmationStep({ modalState, onNext, setModalState, }: ModalStepComponentProps<FunCheckoutStep.CONFIRMATION>): React.JSX.Element;
@@ -14,6 +14,7 @@ export interface PostCheckoutSuccessData {
14
14
  depositAddress: Address;
15
15
  moonpayData: MoonpayDepositData;
16
16
  paymentMethodInfo: PaymentMethodInfo;
17
+ isSendingToQr: boolean;
17
18
  }
18
19
  interface UsePostCheckoutOptions {
19
20
  onSuccess(data: PostCheckoutSuccessData): void;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import type { Address } from 'viem';
3
+ import type { PaymentMethodInfo } from '~/domains/paymentMethods';
4
+ import type { CheckoutModalCommonState, FunCheckoutStep, ModalStepComponentProps, ModalStepInfo } from '../stepTransition';
5
+ export type DirectExecutionNotifCenterState = CheckoutModalCommonState & {
6
+ depositAddress: Address;
7
+ paymentMethodInfo?: PaymentMethodInfo;
8
+ };
9
+ export type DirectExecutionNotifCenterNext = Record<string, never>;
10
+ export declare const DirectExecutionNotifCenterInfo: ModalStepInfo<FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER>;
11
+ /** A checkout detail component to handle redirecting to the checkout history page */
12
+ export declare function DirectExecutionNotifCenter({ modalState, onClose, }: ModalStepComponentProps<FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER>): React.JSX.Element | null;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { PaymentMethodInfo } from '~/domains/paymentMethods';
3
+ interface DirectExecutionNotifCenterContentProps {
4
+ onClose: (options?: {
5
+ isNewDeposit?: boolean;
6
+ }) => void;
7
+ paymentMethodInfo: PaymentMethodInfo;
8
+ }
9
+ declare const DirectExecutionNotifCenterContent: ({ onClose, paymentMethodInfo, }: DirectExecutionNotifCenterContentProps) => React.JSX.Element;
10
+ export default DirectExecutionNotifCenterContent;
@@ -5,6 +5,7 @@ import type { PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
5
5
  import { type CheckoutModalCommonState, FunCheckoutStep, type ModalStepComponentProps, type ModalStepInfo } from './stepTransition';
6
6
  export type MeshVerificationState = CheckoutModalCommonState & {
7
7
  paymentMethodInfo: PaymentMethodBrokerageInfo;
8
+ isSendingToQr: boolean;
8
9
  };
9
10
  export type MeshVerificationNext = {
10
11
  depositAddress: Address;
@@ -6,6 +6,7 @@ export type MoonpaySetupState = CheckoutModalCommonState & {
6
6
  token: string;
7
7
  tokenChainId: string;
8
8
  depositAmount: number;
9
+ isSendingToQr: boolean;
9
10
  };
10
11
  export type MoonpaySetupNext = {
11
12
  depositAddress: Address;
@@ -9,6 +9,7 @@ import { type CheckoutCompleteNext, type CheckoutCompleteState } from './Checkou
9
9
  import { type CheckoutHelpState } from './CheckoutHelp/CheckoutHelp';
10
10
  import { type ConfirmationStepNext, type ConfirmationStepState } from './ConfirmationStep/ConfirmationStep';
11
11
  import { type ConnectExchangeNext, type ConnectExchangeState } from './ConnectExchange';
12
+ import { type DirectExecutionNotifCenterState } from './DirectExecutionNotifCenter/DirectExecutionNotifCenter';
12
13
  import { type InputAmountNext, type InputAmountState } from './InputAmount/InputAmount';
13
14
  import { type LoadingAccountNext, type LoadingAccountState } from './LoadingAccount';
14
15
  import { type MeldCurrencySelectNext, type MeldCurrencySelectState } from './MeldCurrencySelect/MeldCurrencySelect';
@@ -58,7 +59,8 @@ export declare enum FunCheckoutStep {
58
59
  FIAT_ACCOUNT_DETAIL = "fiat_account_detail",
59
60
  ERROR_SCREEN = "error_screen",
60
61
  MELD_QUOTES = "meld_quotes",
61
- MELD_CURRENCY_SELECT = "meld_currency_select"
62
+ MELD_CURRENCY_SELECT = "meld_currency_select",
63
+ DIRECT_EXECUTION_NOTIF_CENTER = "direct_execution_notif_center"
62
64
  }
63
65
  interface ModalStepInput<S extends FunCheckoutStep> {
64
66
  state: CheckoutModalState<S>;
@@ -102,6 +104,7 @@ type CheckoutModalState<S extends FunCheckoutStep = FunCheckoutStep> = {
102
104
  [FunCheckoutStep.ERROR_SCREEN]: ErrorScreenState;
103
105
  [FunCheckoutStep.MELD_QUOTES]: MeldQuotesState;
104
106
  [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectState;
107
+ [FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: DirectExecutionNotifCenterState;
105
108
  }[T] & {
106
109
  step: T;
107
110
  };
@@ -127,6 +130,7 @@ type NextPayload<S extends FunCheckoutStep = FunCheckoutStep> = {
127
130
  [FunCheckoutStep.ERROR_SCREEN]: null;
128
131
  [FunCheckoutStep.MELD_QUOTES]: MeldQuotesNext;
129
132
  [FunCheckoutStep.MELD_CURRENCY_SELECT]: MeldCurrencySelectNext;
133
+ [FunCheckoutStep.DIRECT_EXECUTION_NOTIF_CENTER]: null;
130
134
  }[S] & {
131
135
  /** Whether screen transition should change direction to simulate back transition. Only applies if there is a history entry in the stack*/
132
136
  reverseAnimation?: boolean;
@@ -2,9 +2,9 @@ import { type FunAddress } from '@funkit/api-base';
2
2
  import type { ApiCheckoutClientMetadata, ApiFunkitCheckoutActionParams, ApiFunkitCheckoutConfig } from '@funkit/utils';
3
3
  import React, { type ReactNode } from 'react';
4
4
  import type { Address } from 'viem';
5
- import type { AssetHoldingsItem } from '~/utils/assets';
6
- import type { WithdrawalClient } from '~/wallets/Wallet';
7
5
  import { type PaymentMethodInfo } from '../domains/paymentMethods';
6
+ import type { AssetHoldingsItem } from '../utils/assets';
7
+ import type { WithdrawalClient } from '../wallets/Wallet';
8
8
  import { type FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
9
9
  export type FunkitCheckoutActionParams = ApiFunkitCheckoutActionParams;
10
10
  export interface DynamicTargetAssetCandidate {
@@ -37,6 +37,8 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
37
37
  checkoutItemTitle: string;
38
38
  /** @deprecated use targetAssetAmount **/
39
39
  checkoutItemAmount?: number;
40
+ /** amount of source token. it is not baseUnit **/
41
+ withdrawalSourceTokenBalance?: () => number;
40
42
  /** *****************************
41
43
  * Miscellaneous configurations *
42
44
  ********************************/
@@ -59,8 +61,6 @@ export interface FunkitWithdrawalConfig {
59
61
  sourceChainId: string;
60
62
  /** source token id to withdraw **/
61
63
  sourceTokenAddress: Address;
62
- /** amount of source token. it is not baseUnit **/
63
- sourceTokenBalance: number;
64
64
  /** whether to show connected as preferred withdrawal destination*/
65
65
  showConnectedWalletAsPreferredRecipient?: boolean;
66
66
  /** Wallet instance used to execute the quote */
@@ -138,6 +138,7 @@ export interface FunkitActiveWithdrawalItem {
138
138
  id: string;
139
139
  /** Final settings the withdrawal was init-ed with **/
140
140
  initSettings: Partial<UseFunkitCheckoutPropsWithFullConfig>;
141
+ withdrawalSourceTokenBalance: () => number;
141
142
  }
142
143
  interface FunkitCheckoutContextInterface {
143
144
  checkoutItem: FunkitActiveCheckoutItem | null;
@@ -275,7 +275,7 @@ export declare const flagConfig: {
275
275
  type: "isAnyOf";
276
276
  values: string[];
277
277
  }[];
278
- value: true;
278
+ value: false;
279
279
  if_all?: undefined;
280
280
  } | {
281
281
  if_any: {
@@ -295,4 +295,8 @@ export declare const flagConfig: {
295
295
  type: "string";
296
296
  default_value: string;
297
297
  };
298
+ withdrawal_exclude_tokens: {
299
+ type: "string";
300
+ default_value: string;
301
+ };
298
302
  };
@@ -15,20 +15,20 @@ import {
15
15
  subWallet
16
16
  } from "./chunk-4UM4GTKZ.js";
17
17
  import {
18
- tokenaryWallet
19
- } from "./chunk-SLOIIJGP.js";
18
+ tokenPocketWallet
19
+ } from "./chunk-FRGSRLTS.js";
20
20
  import {
21
21
  talismanWallet
22
22
  } from "./chunk-ABFSXBE6.js";
23
23
  import {
24
24
  trustWallet
25
25
  } from "./chunk-IPOC2VJX.js";
26
+ import {
27
+ tokenaryWallet
28
+ } from "./chunk-SLOIIJGP.js";
26
29
  import {
27
30
  uniswapWallet
28
31
  } from "./chunk-LH7BMNFZ.js";
29
- import {
30
- tokenPocketWallet
31
- } from "./chunk-FRGSRLTS.js";
32
32
  import {
33
33
  walletConnectWallet
34
34
  } from "./chunk-NP5QGWNL.js";
@@ -38,9 +38,6 @@ import {
38
38
  import {
39
39
  rabbyWallet
40
40
  } from "./chunk-BVX4XGNP.js";
41
- import {
42
- rainbowWallet
43
- } from "./chunk-MOOBCMMB.js";
44
41
  import {
45
42
  ramperWallet
46
43
  } from "./chunk-PIUNLQJG.js";
@@ -51,23 +48,23 @@ import {
51
48
  safeWallet
52
49
  } from "./chunk-BQQQL6UD.js";
53
50
  import {
54
- safeheronWallet
55
- } from "./chunk-R6RWZRFF.js";
51
+ rainbowWallet
52
+ } from "./chunk-MOOBCMMB.js";
56
53
  import {
57
54
  safepalWallet
58
55
  } from "./chunk-6LPM6LUQ.js";
56
+ import {
57
+ safeheronWallet
58
+ } from "./chunk-R6RWZRFF.js";
59
+ import {
60
+ ledgerWallet
61
+ } from "./chunk-BRBKM4PW.js";
59
62
  import {
60
63
  metaMaskWallet
61
64
  } from "./chunk-N2NIIUW6.js";
62
65
  import {
63
66
  mewWallet
64
67
  } from "./chunk-V57WLZEE.js";
65
- import {
66
- ledgerWallet
67
- } from "./chunk-BRBKM4PW.js";
68
- import {
69
- oktoWallet
70
- } from "./chunk-ADIXAKUL.js";
71
68
  import {
72
69
  okxWallet
73
70
  } from "./chunk-3U3BMEH5.js";
@@ -75,11 +72,14 @@ import {
75
72
  omniWallet
76
73
  } from "./chunk-7CUY5G6R.js";
77
74
  import {
78
- oneInchWallet
79
- } from "./chunk-OESTDX6I.js";
75
+ oktoWallet
76
+ } from "./chunk-ADIXAKUL.js";
80
77
  import {
81
78
  oneKeyWallet
82
79
  } from "./chunk-4AD7VI2P.js";
80
+ import {
81
+ oneInchWallet
82
+ } from "./chunk-OESTDX6I.js";
83
83
  import {
84
84
  foxWallet
85
85
  } from "./chunk-XYBEMO3C.js";
@@ -102,17 +102,17 @@ import {
102
102
  injectedWallet
103
103
  } from "./chunk-VCVVV2K7.js";
104
104
  import {
105
- bybitWallet
106
- } from "./chunk-W5O4YSZN.js";
105
+ braveWallet
106
+ } from "./chunk-PB254NQ4.js";
107
107
  import {
108
108
  clvWallet
109
109
  } from "./chunk-LEXSM5KI.js";
110
- import {
111
- coinbaseWallet
112
- } from "./chunk-H4IRCEZN.js";
113
110
  import {
114
111
  coin98Wallet
115
112
  } from "./chunk-KFFJPS5R.js";
113
+ import {
114
+ coinbaseWallet
115
+ } from "./chunk-H4IRCEZN.js";
116
116
  import {
117
117
  coreWallet
118
118
  } from "./chunk-JXP2QPW7.js";
@@ -140,13 +140,13 @@ import {
140
140
  import {
141
141
  bitverseWallet
142
142
  } from "./chunk-3HZRRP4Y.js";
143
- import {
144
- braveWallet
145
- } from "./chunk-PB254NQ4.js";
146
- import "./chunk-WRA2DVJ7.js";
147
143
  import {
148
144
  bloomWallet
149
145
  } from "./chunk-S27IADFU.js";
146
+ import {
147
+ bybitWallet
148
+ } from "./chunk-W5O4YSZN.js";
149
+ import "./chunk-WRA2DVJ7.js";
150
150
  import "./chunk-23WIEY36.js";
151
151
  export {
152
152
  argentWallet,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@funkit/connect",
3
- "version": "5.5.13-next.1",
3
+ "version": "5.5.13-next.3",
4
4
  "description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
5
5
  "files": [
6
6
  "dist",
@@ -88,12 +88,12 @@
88
88
  "ua-parser-js": "^1.0.37",
89
89
  "use-debounce": "^10.0.5",
90
90
  "uuid": "^9.0.1",
91
- "@funkit/api-base": "1.9.5-next.1",
91
+ "@funkit/api-base": "1.9.5-next.2",
92
+ "@funkit/core": "2.3.27-next.2",
92
93
  "@funkit/chains": "0.3.2-next.0",
93
- "@funkit/core": "2.3.27-next.1",
94
- "@funkit/utils": "1.1.4-next.0",
95
94
  "@funkit/fun-relay": "0.1.9-next.1",
96
- "@funkit/wagmi-tools": "3.0.49-next.1"
95
+ "@funkit/utils": "1.1.4-next.1",
96
+ "@funkit/wagmi-tools": "3.0.49-next.2"
97
97
  },
98
98
  "repository": {
99
99
  "type": "git",
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- interface DydxSwitchTabProps {
3
- onSwitch: (() => void) | undefined;
4
- showSwitch: boolean;
5
- onClose?: () => void;
6
- }
7
- export declare function DydxSwitchTabInternal({ limitLabel, onSwitch, }: {
8
- limitLabel: string;
9
- onSwitch: () => void;
10
- }): React.JSX.Element;
11
- export declare function DydxSwitchTab({ onSwitch, showSwitch, onClose, }: DydxSwitchTabProps): React.JSX.Element | null;
12
- export {};
@@ -1,3 +0,0 @@
1
- import React from 'react';
2
- export declare const Instant: React.JSX.Element;
3
- export declare const Standard: React.JSX.Element;