@funkit/connect 6.14.8 → 6.14.9-next.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 CHANGED
@@ -1,5 +1,23 @@
1
1
  # @funkit/connect
2
2
 
3
+ ## 6.14.9-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 4d52e42: fix: add fallback bridge bank account to prevent SEPA error
8
+ - 157aa94: feat(connect): added tracking for navigaton and modal open/close events in checkout modal
9
+ - 0a14ab9: feat(connect): implement feature flag for hiding non wallet options
10
+ - d8e25ba: feat(connect): tracking for checkout completion in wallet balance flow + quote tracking
11
+ - 8891f56: feat(connect): add user metadata tracking to statsig
12
+ - 27c1bdb: feat(connect): tracking for QR Code flow completion events (success::token_transfer)
13
+ - 613a8eb: chore(connect): statsig initial setup
14
+ - Updated dependencies [4d52e42]
15
+ - Updated dependencies [613a8eb]
16
+ - @funkit/api-base@1.12.8-next.0
17
+ - @funkit/utils@1.2.0-next.0
18
+ - @funkit/core@2.3.53-next.0
19
+ - @funkit/wagmi-tools@3.0.76-next.0
20
+
3
21
  ## 6.14.8
4
22
 
5
23
  ### Patch Changes
@@ -0,0 +1,36 @@
1
+ import type { FunkitUserInfo } from '~/consts/funkit';
2
+ export declare enum CheckoutModalEvent {
3
+ MODAL_OPENED = "fc::modal_opened",
4
+ MODAL_CLOSED = "fc::modal_closed",
5
+ NAVIGATE_SOURCE_CHANGE = "fc::navigate::source_change",
6
+ NAVIGATE_SELECT_ASSET = "fc::navigate::select_asset",
7
+ NAVIGATE_CONFIRMATION = "fc::navigate::confirmation",
8
+ NAVIGATE_CHECKOUT_COMPLETE = "fc::navigate::checkout_complete",
9
+ NAVIGATE_TRANSFER_TOKEN = "fc::navigate::transfer_token",
10
+ NAVIGATE_INPUT_AMOUNT = "fc::navigate::input_amount",
11
+ NAVIGATE_ERROR_SCREEN = "fc::navigate::error_screen",
12
+ NAVIGATE_FIAT_ACCOUNT_DETAIL = "fc::navigate::fiat_account_detail",
13
+ NAVIGATE_BRIDGE_KYC = "fc::navigate::bridge_kyc",
14
+ NAVIGATE_BRIDGE_CUSTOMER = "fc::navigate::bridge_customer",
15
+ NAVIGATE_MOONPAY_SETUP = "fc::navigate::moonpay_setup",
16
+ NAVIGATE_MELD_QUOTES = "fc::navigate::meld_quotes",
17
+ NAVIGATE_MELD_CURRENCY_SELECT = "fc::navigate::meld_currency_select",
18
+ NAVIGATE_DIRECT_EXECUTION_NOTIF_CENTER = "fc::navigate::direct_execution_notif_center",
19
+ NAVIGATE_KYC_IFRAME = "fc::navigate::kyc_iframe",
20
+ NAVIGATE_CREATE_FIAT_ACCOUNT = "fc::navigate::create_fiat_account",
21
+ NAVIGATE_LOADING_ACCOUNT = "fc::navigate::loading_account",
22
+ NAVIGATE_CHECKOUT_HELP = "fc::navigate::checkout_help",
23
+ FINAL_QUOTE = "fc::quote::final_quote",
24
+ ACCOUNT_BALANCE_SUCCESS = "fc::success::account_balance",
25
+ TOKEN_TRANSFER_SUCCESS = "fc::success::token_transfer",
26
+ WITHDRAWAL_SUCCESS = "fc::success::withdrawal"
27
+ }
28
+ export interface TrackEventData {
29
+ eventName: CheckoutModalEvent;
30
+ value?: string | number;
31
+ metadata?: object;
32
+ }
33
+ export declare const useTrack: () => {
34
+ logEvent: (eventNameOrTrackEventData: CheckoutModalEvent | TrackEventData) => void;
35
+ updateUserAsync: (userInfo: FunkitUserInfo, apiKey: string) => Promise<import("@statsig/react-bindings").StatsigUpdateDetails>;
36
+ };
@@ -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 { DirectExecutionType } from '@funkit/api-base';
2
+ import type { RelayTxHash, RelayVmType } from '@funkit/fun-relay';
2
3
  import { type CheckoutQuoteResponse } from '@funkit/utils';
3
4
  import type { Address, Hex } from 'viem';
4
5
  import type { FunkitCheckoutQuoteResult } from '~/domains/quote';
@@ -31,7 +32,7 @@ interface DirectExecutionStartParams {
31
32
  stepMessageSetter: (m: string) => void;
32
33
  actionsParams: FunkitCheckoutActionParams[];
33
34
  latestQuote: FunkitCheckoutQuoteResult;
34
- onTransactionConfirmed: () => void;
35
+ onTransactionConfirmed: (txHash: RelayTxHash<RelayVmType>) => void;
35
36
  withdrawalClient?: WithdrawalClient;
36
37
  }
37
38
  export interface FunkitDirectExecutionInfo {
@@ -1,4 +1,2 @@
1
1
  export declare function useIsUsUser(): boolean;
2
2
  export declare function useIsUsBankrUser(): boolean;
3
- export declare function useIsUsKatanaUser(): boolean;
4
- export declare function useIsUsHyperdashUser(): boolean;
@@ -0,0 +1,8 @@
1
+ import type { NotificationItem } from '~/modals/CheckoutModal/TransferToken/types';
2
+ /**
3
+ * This might not work if multiple instances of this hook are used in the same page
4
+ * since it uses sessionStorage to store the processed notifications
5
+ *
6
+ * Warning: If QR Code screen is open in multiple tabs, cb will be called multiple times (once for each tab) for the same notification.
7
+ */
8
+ export declare const useOnNewNotification: (combinedNotifications: NotificationItem[], cb: (item: NotificationItem) => void) => void;