@funkit/connect 6.14.9 → 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.
- package/CHANGELOG.md +24 -0
- package/dist/components/FunCheckoutHistory/FunDirectExecutionHistoryDetail.d.ts +2 -1
- package/dist/components/YouPayYouReceive/YouPayYouReceive.d.ts +4 -1
- package/dist/domains/bridge.d.ts +3 -1
- package/dist/hooks/queries/useRecentDirectExecutions.d.ts +9 -1
- package/dist/hooks/track/WithdrawModalEvent.d.ts +4 -0
- package/dist/hooks/track/useTrack.d.ts +3 -1
- package/dist/hooks/useCheckoutDirectExecutionHistory.d.ts +10 -0
- package/dist/index.js +1137 -929
- package/dist/modals/CheckoutModal/FunCheckoutStep.d.ts +1 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +2 -1
- package/dist/modals/CheckoutModal/MeldCurrencySelect/utils.d.ts +1 -0
- package/dist/modals/CheckoutModal/MeldRedirect/MeldRedirect.d.ts +14 -0
- package/dist/modals/CheckoutModal/TransferToken/DirectExecutionNotification.d.ts +2 -2
- package/dist/modals/CheckoutModal/TransferToken/types.d.ts +3 -2
- package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -0
- package/dist/providers/FunkitCheckoutContext.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext.track.d.ts +4 -3
- package/dist/utils/directExecution.d.ts +1 -0
- package/dist/utils/flags/config.d.ts +11 -10
- package/dist/utils/safeJSON.d.ts +1 -0
- package/dist/wallets/walletConnectors/bifrostWallet/bifrostWallet.js +2 -2
- package/dist/wallets/walletConnectors/bitgetWallet/bitgetWallet.js +2 -2
- package/dist/wallets/walletConnectors/bybitWallet/bybitWallet.js +2 -2
- package/dist/wallets/walletConnectors/clvWallet/clvWallet.js +2 -2
- package/dist/wallets/walletConnectors/coin98Wallet/coin98Wallet.js +2 -2
- package/dist/wallets/walletConnectors/coreWallet/coreWallet.js +2 -2
- package/dist/wallets/walletConnectors/foxWallet/foxWallet.js +2 -2
- package/dist/wallets/walletConnectors/frontierWallet/frontierWallet.js +2 -2
- package/dist/wallets/walletConnectors/gateWallet/gateWallet.js +2 -2
- package/dist/wallets/walletConnectors/index.js +57 -57
- package/dist/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.js +2 -2
- package/dist/wallets/walletConnectors/okxWallet/okxWallet.js +2 -2
- package/dist/wallets/walletConnectors/rainbowWallet/rainbowWallet.js +2 -2
- package/dist/wallets/walletConnectors/roninWallet/roninWallet.js +2 -2
- package/dist/wallets/walletConnectors/safepalWallet/safepalWallet.js +2 -2
- package/dist/wallets/walletConnectors/subWallet/subWallet.js +2 -2
- package/dist/wallets/walletConnectors/tokenPocketWallet/tokenPocketWallet.js +2 -2
- package/dist/wallets/walletConnectors/trustWallet/trustWallet.js +2 -2
- package/dist/wallets/walletConnectors/zerionWallet/zerionWallet.js +2 -2
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
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
|
+
|
|
20
|
+
## 6.14.10
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 553c4b7: fix display amount
|
|
25
|
+
- 237e42d: Refactor Bridge chain lookup logic into shared utility function
|
|
26
|
+
|
|
3
27
|
## 6.14.9
|
|
4
28
|
|
|
5
29
|
### 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:
|
|
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;
|
package/dist/domains/bridge.d.ts
CHANGED
|
@@ -6,8 +6,10 @@
|
|
|
6
6
|
* - Bridge Bank Account: corresponds to a payment route for a user
|
|
7
7
|
* https://docs.google.com/document/d/1A0GVWMIe1aLHtblMYJZfFP3C-DybMo47l4vvoxcbpcs/edit?tab=t.0
|
|
8
8
|
*/
|
|
9
|
-
import { type BaseApiRequest, type BridgeCustomer, BridgeCustomerStatus, BridgeKycStatus, type BridgeSubAccount, type BridgeVirtualBankAccount, type FunAddress } from '@funkit/api-base';
|
|
9
|
+
import { type BaseApiRequest, type BridgeCustomer, BridgeCustomerStatus, BridgeKycStatus, type BridgeSubAccount, type BridgeVirtualBankAccount, type CreateBridgeBankAccountRequest, type FunAddress } from '@funkit/api-base';
|
|
10
10
|
import type { Address } from 'viem';
|
|
11
|
+
/** Bridge only supports a handful of chains so we need to normalize other chains to the supported chain*/
|
|
12
|
+
export declare const findBridgeSupportedChain: (chainId: string) => CreateBridgeBankAccountRequest["chainName"];
|
|
11
13
|
export interface AllFiatAccounts {
|
|
12
14
|
bridgeCustomer?: BridgeCustomer;
|
|
13
15
|
bankAccounts?: BridgeVirtualBankAccount[];
|
|
@@ -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<
|
|
19
|
+
export declare const useRecentDirectExecutions: ({ isVisible, filterFunc, }: RecentDirectExecutionsQuery) => import("@tanstack/react-query").UseQueryResult<MergedMultiStepDirectExecution[], Error>;
|
|
12
20
|
export {};
|
|
@@ -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
|
}
|
|
@@ -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
|
+
};
|