@funkit/connect 5.0.4 → 5.0.5
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 +10 -0
- package/dist/components/CopyAddress/CopyIconButton.d.ts +1 -0
- package/dist/components/FunAssetAvatar/FunAssetAvatar.css.d.ts +0 -2
- package/dist/components/FunAssetAvatar/FunAssetAvatar.d.ts +1 -2
- package/dist/components/FunCheckoutBlocked/FunCheckoutBlocked.d.ts +1 -1
- package/dist/components/FunPaymentMethodItem/FunPaymentMethodItem.d.ts +6 -4
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +1 -0
- package/dist/components/FunSkeletonLoader/FunSkeletonBlock.d.ts +2 -2
- package/dist/components/QRCode/QRCodeSkeletonLoader.d.ts +7 -0
- package/dist/components/SourcePaymentMethodItem/SourcePaymentMethodItem.d.ts +7 -0
- package/dist/consts/animations.d.ts +1 -0
- package/dist/domains/{checkoutState.d.ts → checkout.d.ts} +3 -0
- package/dist/domains/{checkoutFees.d.ts → fees.d.ts} +1 -1
- package/dist/domains/paymentMethods.d.ts +1 -1
- package/dist/domains/quote.d.ts +1 -1
- package/dist/hooks/useCheckoutAccountBalanceTransfer.d.ts +1 -1
- package/dist/hooks/useIsBlacklisted.d.ts +6 -0
- package/dist/index.css +3 -10
- package/dist/index.js +652 -580
- package/dist/modals/CheckoutModal/CheckoutNotification.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/ConfirmationStep.d.ts +1 -1
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutConfirmation.d.ts +6 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -0
- package/dist/providers/FunkitMoonpayProvider.d.ts +0 -2
- package/dist/providers/GeneralWalletProvider.d.ts +9 -10
- package/dist/utils/checkout.d.ts +1 -1
- package/dist/utils/flags/config.d.ts +1 -1
- 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 +67 -67
- 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 +3 -3
- package/dist/hooks/useIsCheckoutRisky.d.ts +0 -4
- /package/dist/components/{FunPaymentMethodItem/FunPaymentMethodItem.css.d.ts → SourcePaymentMethodItem/SourcePaymentMethodItem.css.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 5.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 00ea666: feat(connect): show fallback asset icon for You will pay
|
|
8
|
+
- c7b1755: feat: run risk assessment in confirmation step
|
|
9
|
+
- 6916daf: fix(connect): fix layout shifts related to NumberFlow
|
|
10
|
+
- 3024c44: feat(connect): add clip-path to FunAssetAvatar to make space for chain icon and adjust visual
|
|
11
|
+
- 97579ef: feat: update MoonPay description in transaction details
|
|
12
|
+
|
|
3
13
|
## 5.0.4
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -8,8 +8,7 @@ interface FunAssetAvatarProps {
|
|
|
8
8
|
chainId?: string | number;
|
|
9
9
|
prioritizeDefaults?: boolean;
|
|
10
10
|
hideIfUnknown?: boolean;
|
|
11
|
-
borderedChainIcon?: boolean;
|
|
12
11
|
largeChainIcon?: boolean;
|
|
13
12
|
}
|
|
14
|
-
export declare function FunAssetAvatar({ assetSrc, assetTicker, assetName, assetIconSize, chainId, prioritizeDefaults, hideIfUnknown,
|
|
13
|
+
export declare function FunAssetAvatar({ assetSrc, assetTicker, assetName, assetIconSize, chainId, prioritizeDefaults, hideIfUnknown, largeChainIcon, }: FunAssetAvatarProps): React.JSX.Element | null;
|
|
15
14
|
export {};
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
|
+
import { type BoxProps } from '../Box/Box';
|
|
3
|
+
interface PaymentMethodWrapperProps extends Pick<FunPaymentMethodItemProps, 'isActive' | 'isDisabled' | 'onClick'> {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
paddingY?: BoxProps['paddingY'];
|
|
6
|
+
}
|
|
7
|
+
export declare const PaymentMethodWrapper: ({ paddingY, isActive, isDisabled, onClick, children, }: PaymentMethodWrapperProps) => React.JSX.Element;
|
|
2
8
|
export interface FunPaymentMethodItemProps {
|
|
3
9
|
keyIcon?: ReactNode;
|
|
4
10
|
keyText: string;
|
|
@@ -10,8 +16,4 @@ export interface FunPaymentMethodItemProps {
|
|
|
10
16
|
isActive?: boolean;
|
|
11
17
|
}
|
|
12
18
|
export declare const FunPaymentMethodItem: ({ keyIcon, keyText, valueIcon, disclaimerText, onClick, isError, isDisabled, isActive, }: FunPaymentMethodItemProps) => React.JSX.Element;
|
|
13
|
-
interface SourcePaymentMethodItemProps extends Omit<FunPaymentMethodItemProps, 'valueIcon'> {
|
|
14
|
-
otherSourcesCount: number;
|
|
15
|
-
}
|
|
16
|
-
export declare const SourcePaymentMethodItem: ({ keyIcon, keyText, disclaimerText, onClick, otherSourcesCount, isError, isDisabled, isActive, }: SourcePaymentMethodItemProps) => React.JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { PaymentMethod, type PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
3
|
+
export declare const getDynamicValueIconComponent: () => React.JSX.Element;
|
|
3
4
|
interface ConnectedMeshPaymentMethodItemProps {
|
|
4
5
|
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
5
6
|
isSelected: boolean;
|
|
@@ -5,9 +5,9 @@ type FunSkeletonBlockProps = {
|
|
|
5
5
|
marginBottom?: BoxProps['marginBottom'];
|
|
6
6
|
marginTop?: BoxProps['marginTop'];
|
|
7
7
|
style?: BoxProps['style'];
|
|
8
|
-
height:
|
|
8
|
+
height: string;
|
|
9
9
|
/** Defaults to full width */
|
|
10
10
|
width?: BoxProps['width'];
|
|
11
11
|
};
|
|
12
|
-
export declare function FunSkeletonBlock({ width, borderRadius, ...props }: FunSkeletonBlockProps): React.JSX.Element;
|
|
12
|
+
export declare function FunSkeletonBlock({ width, borderRadius, height, ...props }: FunSkeletonBlockProps): React.JSX.Element;
|
|
13
13
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface QRCodeSkeletonLoaderProps {
|
|
3
|
+
/** Dictates what square will be rendered, eg. diagonalDimension = 4 will render a 4x4 skeleton loader with 4 rows and 4 columns, diagonalDimension = 12 will render a 12x12 skeleton loader with 12 rows and 12 columns */
|
|
4
|
+
diagonalDimension: number;
|
|
5
|
+
}
|
|
6
|
+
declare const QRCodeSkeletonLoader: ({ diagonalDimension, }: QRCodeSkeletonLoaderProps) => React.JSX.Element;
|
|
7
|
+
export default QRCodeSkeletonLoader;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type FunPaymentMethodItemProps } from '../FunPaymentMethodItem/FunPaymentMethodItem';
|
|
3
|
+
interface SourcePaymentMethodItemProps extends Omit<FunPaymentMethodItemProps, 'valueIcon'> {
|
|
4
|
+
otherSourcesCount: number;
|
|
5
|
+
}
|
|
6
|
+
export declare const SourcePaymentMethodItem: ({ keyIcon, keyText, disclaimerText, onClick, otherSourcesCount, isError, isDisabled, isActive, }: SourcePaymentMethodItemProps) => React.JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const mapFontLineHeightToNumberFlowHeight: Record<string, string>;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
+
import { type FunAddress } from '@funkit/api-base';
|
|
1
2
|
import { type CheckoutRefundState, CheckoutState } from '@funkit/api-base';
|
|
3
|
+
import type { GeneralWalletContextProps } from '~/providers/GeneralWalletProvider';
|
|
4
|
+
export declare const hasRisk: (apiKey: string, walletAddress: GeneralWalletContextProps["walletAddress"], customRecipient?: FunAddress) => Promise<boolean>;
|
|
2
5
|
export type CheckoutStatus = 'failed' | 'expired' | 'processing' | 'completed';
|
|
3
6
|
type CheckoutStateBooleans = {
|
|
4
7
|
isProcessing: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type CheckoutQuoteResponse } from '@funkit/api-base';
|
|
2
2
|
import type { Config } from 'wagmi';
|
|
3
3
|
import { LoginType } from '~/providers/GeneralWalletProvider';
|
|
4
|
-
import { PaymentMethod, type PaymentMethodInfo } from '../domains/paymentMethods';
|
|
5
4
|
import type { FunkitActiveCheckoutItem } from '../providers/FunkitCheckoutContext';
|
|
5
|
+
import { PaymentMethod, type PaymentMethodInfo } from './paymentMethods';
|
|
6
6
|
interface BaseCheckoutFees {
|
|
7
7
|
paymentMethod: PaymentMethod;
|
|
8
8
|
marketMakerFeeUsd: number;
|
|
@@ -2,7 +2,7 @@ import type { PreviewTransferResult } from '@funkit/api-base';
|
|
|
2
2
|
import type { MeshConnectionInfo } from '~/providers/FunkitMeshProvider';
|
|
3
3
|
/** Supported payment methods in FunkitConnect. **/
|
|
4
4
|
export declare enum PaymentMethod {
|
|
5
|
-
/**
|
|
5
|
+
/** MoonPay - Credit / Debit Card **/
|
|
6
6
|
CARD = "card",
|
|
7
7
|
/** Account Balance **/
|
|
8
8
|
ACCOUNT_BALANCE = "balance",
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Address } from 'viem';
|
|
|
3
3
|
import type { Config } from 'wagmi';
|
|
4
4
|
import type { FunkitActiveCheckoutItem } from '~/providers/FunkitCheckoutContext';
|
|
5
5
|
import type { LoginType } from '~/providers/GeneralWalletProvider';
|
|
6
|
-
import { type CheckoutFees } from './
|
|
6
|
+
import { type CheckoutFees } from './fees';
|
|
7
7
|
import { type PaymentMethodInfo } from './paymentMethods';
|
|
8
8
|
export interface FunkitCheckoutQuoteResult extends Omit<ApiFunkitCheckoutQuoteResult, 'finalFeesBreakdown'> {
|
|
9
9
|
finalSpreadUsd: string;
|
|
@@ -14,7 +14,6 @@ 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;
|
|
18
17
|
fee?: {
|
|
19
18
|
token?: string;
|
|
20
19
|
amount?: number;
|
|
@@ -22,6 +21,7 @@ export declare function useCheckoutAccountBalanceTransfer(): {
|
|
|
22
21
|
recipient: import("viem").Address;
|
|
23
22
|
} | undefined;
|
|
24
23
|
skipDBAction?: boolean | undefined;
|
|
24
|
+
logger?: import("@funkit/api-base").Logger | undefined;
|
|
25
25
|
};
|
|
26
26
|
} | {
|
|
27
27
|
rFunWallet: null;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { FunAddress } from '@funkit/api-base';
|
|
2
|
+
import type { GeneralWalletContextProps } from '~/providers/GeneralWalletProvider';
|
|
3
|
+
export declare const useIsBlacklisted: (walletAddress: GeneralWalletContextProps["walletAddress"], customRecipient?: FunAddress) => {
|
|
4
|
+
isWalletBlacklisted: boolean;
|
|
5
|
+
isCustomRecipientBlacklisted: boolean;
|
|
6
|
+
};
|
package/dist/index.css
CHANGED
|
@@ -6797,19 +6797,12 @@
|
|
|
6797
6797
|
outline-color: var(--rk-colors-tertiaryText);
|
|
6798
6798
|
}
|
|
6799
6799
|
|
|
6800
|
-
/* vanilla-extract-css-ns:src/components/FunAssetAvatar/FunAssetAvatar.css.ts.vanilla.css?source=
|
|
6800
|
+
/* vanilla-extract-css-ns:src/components/FunAssetAvatar/FunAssetAvatar.css.ts.vanilla.css?source=LnV3cmRjMjAgewogIHBvc2l0aW9uOiByZWxhdGl2ZTsKfQoudXdyZGMyMiB7CiAgcG9zaXRpb246IGFic29sdXRlOwp9 */
|
|
6801
6801
|
[data-rk] .uwrdc20 {
|
|
6802
6802
|
position: relative;
|
|
6803
6803
|
}
|
|
6804
|
-
[data-rk] .uwrdc21 {
|
|
6805
|
-
position: absolute;
|
|
6806
|
-
bottom: 0;
|
|
6807
|
-
right: 0;
|
|
6808
|
-
}
|
|
6809
6804
|
[data-rk] .uwrdc22 {
|
|
6810
6805
|
position: absolute;
|
|
6811
|
-
bottom: -2px;
|
|
6812
|
-
right: -2px;
|
|
6813
6806
|
}
|
|
6814
6807
|
|
|
6815
6808
|
/* vanilla-extract-css-ns:src/modals/ProfileDetails/FunProfileViews/Home/HomeCheckoutDisplayRow.css.ts.vanilla.css?source=LnVrY3Q0dDEgewogIG91dGxpbmU6IG5vbmU7Cn0KLnVrY3Q0dDE6Zm9jdXMgewogIG91dGxpbmU6IG5vbmU7Cn0= */
|
|
@@ -7003,8 +6996,8 @@
|
|
|
7003
6996
|
opacity: 0.5;
|
|
7004
6997
|
}
|
|
7005
6998
|
|
|
7006
|
-
/* vanilla-extract-css-ns:src/components/
|
|
7007
|
-
[data-rk] .
|
|
6999
|
+
/* vanilla-extract-css-ns:src/components/SourcePaymentMethodItem/SourcePaymentMethodItem.css.ts.vanilla.css?source=Ll8xeW9mZWZsMCB7CiAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjsKICBtaW4td2lkdGg6IDdweDsKfQ== */
|
|
7000
|
+
[data-rk] ._1yofefl0 {
|
|
7008
7001
|
display: inline-flex;
|
|
7009
7002
|
align-items: center;
|
|
7010
7003
|
justify-content: center;
|