@funkit/connect 6.14.10 → 6.14.11

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 (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +2 -1
  3. package/dist/components/YouPayYouReceive/YouPayYouReceive.d.ts +4 -1
  4. package/dist/hooks/queries/useRecentDirectExecutions.d.ts +9 -1
  5. package/dist/hooks/track/WithdrawModalEvent.d.ts +4 -0
  6. package/dist/hooks/track/useTrack.d.ts +3 -1
  7. package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
  8. package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +10 -0
  9. package/dist/index.js +1097 -894
  10. package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +1 -0
  11. package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +2 -1
  12. package/dist/modals/CheckoutModal/MeldCurrencySelect/utils.d.ts +1 -0
  13. package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +14 -0
  14. package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +2 -2
  15. package/dist/modals/CheckoutModal/TransferToken/types.d.ts +3 -2
  16. package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -0
  17. package/dist/providers/FunkitCheckoutContext.d.ts +1 -1
  18. package/dist/providers/FunkitCheckoutContext.track.d.ts +4 -3
  19. package/dist/utils/checkout.d.ts +1 -1
  20. package/dist/utils/directExecution.d.ts +1 -0
  21. package/dist/utils/flags/config.d.ts +10 -9
  22. package/dist/utils/safeJSON.d.ts +1 -0
  23. package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
  24. package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
  25. package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
  26. package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
  27. package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
  28. package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
  29. package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
  30. package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
  31. package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
  32. package/dist/wallets/walletConnectors/index.js +53 -53
  33. package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
  34. package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
  35. package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
  36. package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
  37. package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
  38. package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
  39. package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
  40. package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
  41. package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
  42. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 6.14.11
4
+
5
+ ### Patch Changes
6
+
7
+ - 953fb4c: feat: add eusde icon
8
+ - b96de20: feat(connect): merge multi-step direct execution notification data
9
+ - 175deb9: feat(connect): add Meld redirect state screen
10
+ - 071fbbf: refactor: remove initNewCheckout from beginWithdrawal
11
+ - d01122c: feat: add wusde icon
12
+ - 071fbbf: refactor(connect): added WithdrawModalEvent for tracking opening of withdrawal modal
13
+ - 569094d: fix: apply getMinDepositUSD to transfer checkout
14
+ - 0914811: audit and performance improvements
15
+ - Updated dependencies [96408f4]
16
+ - @funkit/api-base@1.12.9
17
+ - @funkit/core@2.3.54
18
+ - @funkit/wagmi-tools@3.0.77
19
+
3
20
  ## 6.14.10
4
21
 
5
22
  ### Patch Changes
@@ -1,5 +1,6 @@
1
1
  import type { DirectExecution } from '@funkit/api-base';
2
2
  import React from 'react';
3
+ import type { MergedMultiStepDirectExecution } from '~/hooks/queries/useRecentDirectExecutions';
3
4
  export declare function FunDirectExecutionHistoryDetail({ bottomBarId, directExecution, isActiveCheckout, onClose, onAnimationComplete, }: {
4
5
  bottomBarId: string;
5
6
  directExecution: DirectExecution;
@@ -10,5 +11,5 @@ export declare function FunDirectExecutionHistoryDetail({ bottomBarId, directExe
10
11
  onAnimationComplete?: (callback: () => void) => void;
11
12
  }): React.JSX.Element;
12
13
  export declare function DirectExecutionOrderDetailSection({ directExecution, }: {
13
- directExecution: DirectExecution;
14
+ directExecution: MergedMultiStepDirectExecution;
14
15
  }): React.JSX.Element;
@@ -2,16 +2,19 @@ import React from 'react';
2
2
  interface YouPayYouReceiveProps {
3
3
  payLabel?: string;
4
4
  receiveLabel?: string;
5
+ fiatCurrencyLabel?: string;
5
6
  payTokenSymbol: string;
6
7
  receiveTokenSymbol: string;
8
+ fiatCurrencySymbol?: string;
7
9
  payTokenIconSrc: string;
8
10
  receiveTokenIconSrc: string;
9
11
  payTokenChainId?: string;
10
12
  receiveTokenChainId?: string;
11
13
  showYouPaySection?: boolean;
14
+ showFiatCurrencySection?: boolean;
12
15
  prioritizeDefaults?: boolean;
13
16
  }
14
- export declare const YouPayYouReceive: ({ payLabel, receiveLabel, payTokenSymbol, receiveTokenSymbol, payTokenIconSrc, receiveTokenIconSrc, payTokenChainId, receiveTokenChainId, showYouPaySection, prioritizeDefaults, }: YouPayYouReceiveProps) => React.JSX.Element;
17
+ export declare const YouPayYouReceive: ({ payLabel, receiveLabel, fiatCurrencyLabel, payTokenSymbol, receiveTokenSymbol, fiatCurrencySymbol, payTokenIconSrc, receiveTokenIconSrc, payTokenChainId, receiveTokenChainId, showYouPaySection, showFiatCurrencySection, prioritizeDefaults, }: YouPayYouReceiveProps) => React.JSX.Element;
15
18
  export declare const YouPayYouReceiveBottomBarLayoutWrapper: ({ children, }: {
16
19
  children: React.ReactNode;
17
20
  }) => React.JSX.Element;
@@ -3,10 +3,18 @@ interface RecentDirectExecutionsQuery {
3
3
  isVisible: boolean;
4
4
  filterFunc?: (de: DirectExecution) => boolean;
5
5
  }
6
+ export interface MergedMultiStepDirectExecution extends DirectExecution {
7
+ /**
8
+ * In a multi-step DE chain, represents the latest **present** DE of the chain.
9
+ *
10
+ * Always `undefined` for single-step DEs.
11
+ */
12
+ latestStep?: DirectExecution;
13
+ }
6
14
  export declare function isTokenTransferDirectExecution(de: DirectExecution): boolean;
7
15
  export declare function isWithdrawalDirectExecution(de: DirectExecution): boolean;
8
16
  /**
9
17
  * @returns recent direct executions tied to a recipient address used in the token transfer flow
10
18
  */
11
- export declare const useRecentDirectExecutions: ({ isVisible, filterFunc, }: RecentDirectExecutionsQuery) => import("@tanstack/react-query").UseQueryResult<DirectExecution[], Error>;
19
+ export declare const useRecentDirectExecutions: ({ isVisible, filterFunc, }: RecentDirectExecutionsQuery) => import("@tanstack/react-query").UseQueryResult<MergedMultiStepDirectExecution[], Error>;
12
20
  export {};
@@ -0,0 +1,4 @@
1
+ export declare enum WithdrawModalEvent {
2
+ MODAL_OPENED = "fw::modal_opened",
3
+ MODAL_CLOSED = "fw::modal_closed"
4
+ }
@@ -1,4 +1,5 @@
1
1
  import type { FunkitUserInfo } from '~/consts/funkit';
2
+ import type { WithdrawModalEvent } from './WithdrawModalEvent';
2
3
  export declare enum CheckoutModalEvent {
3
4
  MODAL_OPENED = "fc::modal_opened",
4
5
  MODAL_CLOSED = "fc::modal_closed",
@@ -14,6 +15,7 @@ export declare enum CheckoutModalEvent {
14
15
  NAVIGATE_BRIDGE_CUSTOMER = "fc::navigate::bridge_customer",
15
16
  NAVIGATE_MOONPAY_SETUP = "fc::navigate::moonpay_setup",
16
17
  NAVIGATE_MELD_QUOTES = "fc::navigate::meld_quotes",
18
+ NAVIGATE_MELD_REDIRECT = "fc::navigate::meld_redirect",
17
19
  NAVIGATE_MELD_CURRENCY_SELECT = "fc::navigate::meld_currency_select",
18
20
  NAVIGATE_DIRECT_EXECUTION_NOTIF_CENTER = "fc::navigate::direct_execution_notif_center",
19
21
  NAVIGATE_KYC_IFRAME = "fc::navigate::kyc_iframe",
@@ -26,7 +28,7 @@ export declare enum CheckoutModalEvent {
26
28
  WITHDRAWAL_SUCCESS = "fc::success::withdrawal"
27
29
  }
28
30
  export interface TrackEventData {
29
- eventName: CheckoutModalEvent;
31
+ eventName: CheckoutModalEvent | WithdrawModalEvent;
30
32
  value?: string | number;
31
33
  metadata?: object;
32
34
  }
@@ -14,6 +14,7 @@ export declare function useCheckoutAccountBalanceTransfer(): {
14
14
  bypassInit: boolean;
15
15
  apiKey?: string;
16
16
  nonce?: bigint | undefined;
17
+ logger?: import("@funkit/api-base").Logger | undefined;
17
18
  fee?: {
18
19
  token?: string;
19
20
  amount?: number;
@@ -21,7 +22,6 @@ export declare function useCheckoutAccountBalanceTransfer(): {
21
22
  recipient: import("viem").Address;
22
23
  } | undefined;
23
24
  skipDBAction?: boolean | undefined;
24
- logger?: import("@funkit/api-base").Logger | undefined;
25
25
  };
26
26
  } | {
27
27
  rFunWallet: null;
@@ -1,4 +1,5 @@
1
1
  import { CheckoutRefundState, CheckoutState, type DirectExecution, RelayExecutionStatus } from '@funkit/api-base';
2
+ import type { MergedMultiStepDirectExecution } from './queries/useRecentDirectExecutions';
2
3
  export declare function mapRelayExecutionStatusToCheckoutState(status: RelayExecutionStatus): CheckoutState;
3
4
  export declare function mapRelayExecutionStatusToRefundState(status: RelayExecutionStatus): CheckoutRefundState | undefined;
4
5
  export declare function useCheckoutDirectExecutionHistory({ initDirectExecution, }: {
@@ -12,3 +13,12 @@ export declare function useCheckoutDirectExecutionHistory({ initDirectExecution,
12
13
  isDelayed: boolean;
13
14
  isProcessing: boolean;
14
15
  };
16
+ export declare function useMultiStepDirectExecutionStatus(multiStepDirectExecution: MergedMultiStepDirectExecution): {
17
+ isCompleted: boolean;
18
+ isDelayed: boolean;
19
+ isFailed: boolean;
20
+ isFinalStep: boolean;
21
+ isProcessing: boolean;
22
+ isRefunded: boolean;
23
+ latestDirectExecution: DirectExecution;
24
+ };