@funkit/connect 5.5.14 → 5.5.15
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 +12 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +8 -8
- package/dist/components/Icons/EtherFiIcon.d.ts +4 -0
- package/dist/components/ReceiveAmount/ReceiveAmount.d.ts +10 -0
- package/dist/consts/customers.d.ts +1 -0
- package/dist/domains/asset.d.ts +2 -1
- package/dist/domains/paymentMethods.d.ts +1 -0
- package/dist/{modals/CheckoutModal/InputAmount → hooks}/useAssetPrice.d.ts +10 -6
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -6
- package/dist/index.js +1209 -1071
- package/dist/modals/CheckoutModal/ConfirmationStep/CheckoutPrimaryInfo.d.ts +2 -3
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +4 -4
- package/dist/modals/CheckoutModal/SourceChange/DefiPurchaseSection.d.ts +7 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +4 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +2 -0
- package/dist/themes/darkTheme.js +1 -1
- package/dist/themes/lightTheme.js +1 -1
- package/dist/utils/assets.d.ts +0 -1
- package/dist/utils/moonpay.d.ts +2 -5
- package/dist/wallets/walletConnectors/index.js +24 -24
- package/package.json +5 -5
- package/dist/{chunk-ICCAQZHZ.js → chunk-DMCSGHKQ.js} +1 -1
- package/dist/{chunk-RN4I4Y57.js → chunk-UQVBCTN3.js} +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 5.5.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9f6d124: fix react bug
|
|
8
|
+
- 890ef8f: add up all gas
|
|
9
|
+
- 4c208d4: feat(connect): swap meld deposit address from user to QR code address
|
|
10
|
+
- Updated dependencies [4c208d4]
|
|
11
|
+
- @funkit/api-base@1.9.7
|
|
12
|
+
- @funkit/core@2.3.29
|
|
13
|
+
- @funkit/wagmi-tools@3.0.51
|
|
14
|
+
|
|
3
15
|
## 5.5.14
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -5,22 +5,22 @@ export declare function PaymentMethodIcon({ paymentIcon, keyIconSize, }: {
|
|
|
5
5
|
paymentIcon: ReactNode;
|
|
6
6
|
keyIconSize: number;
|
|
7
7
|
}): React.JSX.Element;
|
|
8
|
-
interface ConnectedMeshPaymentMethodItemProps {
|
|
8
|
+
interface ConnectedMeshPaymentMethodItemProps extends ConnectedPaymentMethodItemProps {
|
|
9
9
|
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
10
|
-
isActive: boolean;
|
|
11
|
-
onSelect: () => void;
|
|
12
10
|
onBrokerageError?: () => void;
|
|
13
|
-
targetChainId: string;
|
|
14
|
-
customValueIcon?: ReactNode;
|
|
15
11
|
}
|
|
16
12
|
/** it is different from BrokeragePaymentMethodItem
|
|
17
13
|
* this component is for connected mesh brokerage like robinhood
|
|
18
14
|
* the other one is for connecting new brokerage button
|
|
19
15
|
* */
|
|
20
|
-
export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo,
|
|
21
|
-
|
|
16
|
+
export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo, isSelected, onSelect, onBrokerageError, targetChainId, showSelectedCheckmark, }: ConnectedMeshPaymentMethodItemProps) => React.JSX.Element;
|
|
17
|
+
interface ConnectedPaymentMethodItemProps {
|
|
18
|
+
isSelected: boolean;
|
|
19
|
+
showSelectedCheckmark?: boolean;
|
|
20
|
+
onSelect: () => void;
|
|
22
21
|
targetChainId: string;
|
|
23
|
-
}
|
|
22
|
+
}
|
|
23
|
+
export declare const AccountBalancePaymentMethodItem: ({ isSelected, showSelectedCheckmark, onSelect, targetChainId, }: ConnectedPaymentMethodItemProps) => React.JSX.Element;
|
|
24
24
|
export declare const ActiveFiatAccountPaymentMethodItem: ({ isActive, onClick, paymentMethodInfo, customValueIcon, }: BasePaymentMethodItemProps & {
|
|
25
25
|
paymentMethodInfo: PaymentMethodVirtualBankInfo;
|
|
26
26
|
}) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ServerCheckoutConfig } from '~/domains/clientMetadata';
|
|
3
|
+
import type { FunkitCheckoutConfig } from '~/providers/FunkitCheckoutContext';
|
|
4
|
+
interface ReceiveAmountProps {
|
|
5
|
+
config: ServerCheckoutConfig | FunkitCheckoutConfig;
|
|
6
|
+
/** To override the default icon if custom one is needed */
|
|
7
|
+
icon?: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const ReceiveAmount: ({ config, icon }: ReceiveAmountProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -5,3 +5,4 @@ export declare function isBankrCustomer(apiKey: string): apiKey is "vWe20Dfyui2o
|
|
|
5
5
|
export declare function isBsxCustomer(apiKey: string): apiKey is "zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1";
|
|
6
6
|
export declare function isEtherealCustomer(apiKey: string): apiKey is "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
|
|
7
7
|
export declare function isKatanaCustomer(apiKey: string): apiKey is "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4";
|
|
8
|
+
export declare function isEtherFiCustomer(apiKey: string): apiKey is "GyJMyQ3juDarKooebGRu16Ncogwhm59h2DIjCu1p";
|
package/dist/domains/asset.d.ts
CHANGED
|
@@ -18,8 +18,9 @@ interface AssetUsableToPayParms {
|
|
|
18
18
|
assetUsdAmount: number | null;
|
|
19
19
|
loginType: LoginType;
|
|
20
20
|
isAllowedForCheckout: boolean;
|
|
21
|
+
minValueThreshold?: number;
|
|
21
22
|
}
|
|
22
|
-
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, loginType, isAllowedForCheckout, }: AssetUsableToPayParms) => {
|
|
23
|
+
export declare const isAssetUsableToPayForCheckout: ({ config, payerAddress, paymentMethod, targetChainId, targetTokenAddress, assetChainId, assetTokenAddress, assetUsdAmount, loginType, isAllowedForCheckout, minValueThreshold, }: AssetUsableToPayParms) => {
|
|
23
24
|
isUsable: boolean;
|
|
24
25
|
reason: string;
|
|
25
26
|
};
|
|
@@ -45,6 +45,7 @@ export interface PaymentMethodVirtualBankInfo extends PaymentMethodVirtualBankIn
|
|
|
45
45
|
matchingFiatAccount: BridgeVirtualBankAccount;
|
|
46
46
|
}
|
|
47
47
|
export type ConnectablePaymentMethodInfo = PaymentMethodAccountInfo | PaymentMethodBrokerageInfo | PaymentMethodVirtualBankInfo;
|
|
48
|
+
export declare function isConnectablePaymentMethodInfo(value: unknown): value is ConnectablePaymentMethodInfo;
|
|
48
49
|
export type PaymentMethodInfo = PaymentMethodCardInfo | PaymentMethodBrokerageInfo | PaymentMethodAccountInfo | PaymentMethodTokenTransferInfo | PaymentMethodVirtualBankIncompleteInfo;
|
|
49
50
|
interface CardPaymentMethodParams {
|
|
50
51
|
paymentMethod: PaymentMethod.CARD;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
1
|
import { type Erc20AssetInfo } from '@funkit/api-base';
|
|
2
2
|
import type { Address } from 'viem';
|
|
3
|
+
interface UseAssetAddressPriceParams {
|
|
4
|
+
chainId: string | undefined;
|
|
5
|
+
assetTokenAddress: Address | undefined;
|
|
6
|
+
refetchInterval?: number;
|
|
7
|
+
/** defaults to 1 hence price returned is unit price */
|
|
8
|
+
amount?: number;
|
|
9
|
+
}
|
|
3
10
|
type AssetPriceResult = {
|
|
4
11
|
error: Error | null;
|
|
5
12
|
isLoading: boolean;
|
|
6
|
-
|
|
13
|
+
/** unit price if custom amount is not provided */
|
|
14
|
+
price: number | undefined;
|
|
7
15
|
};
|
|
8
|
-
export declare function useAssetAddressPrice({ chainId, assetTokenAddress, refetchInterval, }:
|
|
9
|
-
chainId: string | undefined;
|
|
10
|
-
assetTokenAddress: Address | undefined;
|
|
11
|
-
refetchInterval?: number;
|
|
12
|
-
}): AssetPriceResult;
|
|
16
|
+
export declare function useAssetAddressPrice({ chainId, assetTokenAddress, amount, refetchInterval, }: UseAssetAddressPriceParams): AssetPriceResult;
|
|
13
17
|
type AssetSymbolPriceParams = {
|
|
14
18
|
chainId: string | undefined;
|
|
15
19
|
symbol: string | undefined;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { PaymentMethod, type PaymentMethodInfo } from '../domains/paymentMethods';
|
|
3
|
-
export declare const PAYMENT_METHOD_ICONS:
|
|
4
|
-
brokerage: (size: number) => React.JSX.Element;
|
|
5
|
-
card: (size: number) => React.JSX.Element;
|
|
6
|
-
token_transfer: (size: number) => React.JSX.Element;
|
|
7
|
-
virtual_bank: (size: number) => React.JSX.Element;
|
|
8
|
-
};
|
|
3
|
+
export declare const PAYMENT_METHOD_ICONS: Record<Exclude<PaymentMethod, PaymentMethod.ACCOUNT_BALANCE>, (size: number) => ReactNode>;
|
|
9
4
|
/**
|
|
10
5
|
Reference ENG-716
|
|
11
6
|
* web2 users -> social icon
|