@funkit/connect 12.10.0 → 12.11.1
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 +32 -0
- package/dist/components/FunTransactionSummary/DestinationLineItems.d.ts +14 -0
- package/dist/components/FunTransactionSummary/DestinationYieldRows.d.ts +0 -1
- package/dist/components/FunTransactionSummary/FunTxSummaryComponents.d.ts +2 -1
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +4 -2
- package/dist/hooks/useModalStateValueWithProp.d.ts +13 -0
- package/dist/hooks/useWalletAssetHoldings.d.ts +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1530 -1404
- package/dist/providers/FunkitCheckoutContext/types.d.ts +46 -0
- package/dist/wallets/walletConnectors/index.js +44 -44
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,37 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 12.11.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- ed6d1be: Prevent closed modals from applying delayed navigation or state changes.
|
|
8
|
+
|
|
9
|
+
## 12.11.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- 5d1e582: Checkout configs can now add their own rows to the payment method summary on the confirmation screen, each with an optional info tooltip on the label or value.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies [4aa16c2]
|
|
18
|
+
- @funkit/connect-core@8.4.1
|
|
19
|
+
|
|
20
|
+
## 12.10.1
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- e06ae58: Skip wallet holdings with a malformed balance instead of crashing the checkout modal.
|
|
25
|
+
- 28803f9: Show the clear button on the withdrawal recipient address input when both an EVM and a Solana wallet are connected.
|
|
26
|
+
- Updated dependencies [bd9d5e8]
|
|
27
|
+
- Updated dependencies [e06ae58]
|
|
28
|
+
- Updated dependencies [48aae63]
|
|
29
|
+
- @funkit/api-base@8.5.1
|
|
30
|
+
- @funkit/connect-core@8.4.0
|
|
31
|
+
- @funkit/chains@2.4.1
|
|
32
|
+
- @funkit/fun-relay@3.1.1
|
|
33
|
+
- @funkit/utils@5.0.1
|
|
34
|
+
|
|
3
35
|
## 12.10.0
|
|
4
36
|
|
|
5
37
|
### Minor Changes
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { DestinationLineItem } from '../../providers/FunkitCheckoutContext/types';
|
|
3
|
+
export declare const TX_SUMMARY_VALUE_COLORS: {
|
|
4
|
+
default: string;
|
|
5
|
+
success: string;
|
|
6
|
+
caution: string;
|
|
7
|
+
danger: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const MAX_DESTINATION_LINE_ITEMS = 3;
|
|
10
|
+
/** Additional line items provided through `resolveDestinationLineItems`, rendered last in the summary box. */
|
|
11
|
+
export declare function DestinationLineItems({ items, isLoading, }: {
|
|
12
|
+
items: DestinationLineItem[] | null | undefined;
|
|
13
|
+
isLoading?: boolean;
|
|
14
|
+
}): React.JSX.Element | null;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { FunkitCheckoutConfig } from '../../providers/FunkitCheckoutContext/types';
|
|
3
|
-
export declare const YIELD_GREEN = "#478f00";
|
|
4
3
|
/**
|
|
5
4
|
* Renders integrator-provided destination yield metadata (Supply APY /
|
|
6
5
|
* Collateralization) as rows. Driven by the customer-agnostic
|
|
@@ -3,6 +3,7 @@ import { type BoxProps } from '../Box/Box';
|
|
|
3
3
|
export declare function FunTxSummaryBox({ children, ...otherProps }: BoxProps): React.JSX.Element;
|
|
4
4
|
export declare function FunTxSummaryDivider(): React.JSX.Element;
|
|
5
5
|
export declare function FunTxSummaryLineItem({ children, ...otherProps }: BoxProps): React.JSX.Element;
|
|
6
|
-
export declare function FunTxSummaryLineItemKeyText({ text }: {
|
|
6
|
+
export declare function FunTxSummaryLineItemKeyText({ text, tooltip, }: {
|
|
7
7
|
text: string;
|
|
8
|
+
tooltip?: string;
|
|
8
9
|
}): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { FunAddress } from '@funkit/api-base';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import type { PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
4
|
-
import type { FunkitCheckoutConfig } from '../../providers/FunkitCheckoutContext/types';
|
|
4
|
+
import type { DestinationLineItem, FunkitCheckoutConfig } from '../../providers/FunkitCheckoutContext/types';
|
|
5
5
|
import { type HealthFactorInfo } from './DestinationHealthFactorRow';
|
|
6
6
|
interface PaymentMethodSummaryProps {
|
|
7
7
|
paymentMethodInfo: PaymentMethodInfo;
|
|
@@ -20,6 +20,8 @@ interface PaymentMethodSummaryProps {
|
|
|
20
20
|
* this from the live confirmation amount (Aave supply checkouts only).
|
|
21
21
|
*/
|
|
22
22
|
healthFactorInfo?: HealthFactorInfo;
|
|
23
|
+
/** Integrator-resolved rows (`resolveDestinationLineItems`), rendered last in the summary box. */
|
|
24
|
+
destinationLineItems?: DestinationLineItem[] | null;
|
|
23
25
|
}
|
|
24
|
-
export declare function PaymentMethodSummary({ paymentMethodInfo, customRecipient, estimatedTimeText, isLoading, isWithdrawal, destinationYieldInfo, healthFactorInfo, }: PaymentMethodSummaryProps): React.JSX.Element;
|
|
26
|
+
export declare function PaymentMethodSummary({ paymentMethodInfo, customRecipient, estimatedTimeText, isLoading, isWithdrawal, destinationYieldInfo, healthFactorInfo, destinationLineItems, }: PaymentMethodSummaryProps): React.JSX.Element;
|
|
25
27
|
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Modal open state plus a prop that outlives the close animation.
|
|
3
|
+
*
|
|
4
|
+
* The prop keys the modal component, so clearing it is delayed until the
|
|
5
|
+
* animation finishes — and cancelled if the owner unmounts first, which would
|
|
6
|
+
* otherwise set state on a torn-down tree.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useModalStateValueWithProp<T = string>(): {
|
|
9
|
+
closeModal: () => void;
|
|
10
|
+
isModalOpen: boolean;
|
|
11
|
+
prop: T | null;
|
|
12
|
+
openModal: (prop?: T | null) => void;
|
|
13
|
+
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import type { ChainAssetBalanceInfo } from '@funkit/api-base';
|
|
1
2
|
import { type AssetHoldingsMap } from '../utils/assets';
|
|
3
|
+
import { type IsStablecoinFn } from './useIsStablecoin';
|
|
4
|
+
export declare const processWalletAssets: (walletAssets: ChainAssetBalanceInfo | undefined, targetChain: string, isStablecoin: IsStablecoinFn) => AssetHoldingsMap<import("../domains/wallet").AssetHoldingsItem> | undefined;
|
|
2
5
|
interface UseWalletAssetHoldingsResponse {
|
|
3
6
|
data: AssetHoldingsMap | undefined;
|
|
4
7
|
isLoading: boolean;
|
package/dist/index.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export { createAuthenticationAdapter, FunkitConnectAuthenticationProvider, } fro
|
|
|
20
20
|
export type { AuthenticationAdapter, FunkitConnectAuthenticationProviderProps, } from './providers/AuthenticationContext';
|
|
21
21
|
export type { AvatarComponent } from './providers/AvatarContext';
|
|
22
22
|
export type { CheckoutBlockedReason } from './modals/CheckoutModal/CheckoutBlockedReason';
|
|
23
|
-
export type { FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitCheckoutOnCloseResult, FunkitWithdrawalConfig, WalletWithdrawalConfig, CustomWithdrawalConfig, MultiMethodWithdrawalConfig, WithdrawalMethodOption, WithdrawalParam, WithdrawalFormData, WithdrawalSourceTokenBalanceParams, WithdrawalSourceCustomData, SourceTokenOption, WithdrawalCustomerData, LighterWithdrawalCustomerData, LighterRouteType, WithdrawalCustomerConfig, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, ModalTitleContext, } from './providers/FunkitCheckoutContext';
|
|
23
|
+
export type { FunkitCheckoutActionParams, FunkitCheckoutConfig, FunkitCheckoutOnCloseResult, FunkitWithdrawalConfig, WalletWithdrawalConfig, CustomWithdrawalConfig, MultiMethodWithdrawalConfig, WithdrawalMethodOption, WithdrawalParam, WithdrawalFormData, WithdrawalSourceTokenBalanceParams, WithdrawalSourceCustomData, SourceTokenOption, WithdrawalCustomerData, LighterWithdrawalCustomerData, LighterRouteType, WithdrawalCustomerConfig, UseFunkitCheckoutPropsWithFullConfig, UseFunkitCheckoutProps, FunkitCheckoutValidationResult, FunkitCheckoutResult, DynamicTargetAssetCandidate, AddToWalletToken, TokenInfo, ModalTitleContext, DestinationLineItem, DestinationLineItemContext, LineItemSlot, LineItemValue, LineItemValueColor, } from './providers/FunkitCheckoutContext';
|
|
24
24
|
export { useFunkitCheckout, FunCheckoutStartingStep, } from './providers/FunkitCheckoutContext';
|
|
25
25
|
export type { FunkitCheckoutQuoteResult } from './domains/quote';
|
|
26
26
|
export type { FunkitConfig, FunkitUiCustomizationsConfig, FunkitTextCustomizationsConfig, } from './providers/FunkitConfigContext';
|