@funkit/connect 3.4.5 → 3.4.8
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 +21 -0
- package/dist/components/FunPayments/FunPaymentMethods.d.ts +16 -23
- package/dist/components/FunTransactionSummary/PaymentMethodSummary.d.ts +21 -0
- package/dist/consts/customers.d.ts +2 -0
- package/dist/domains/asset.d.ts +2 -0
- package/dist/domains/clientMetadata.d.ts +0 -1
- package/dist/domains/wallet.d.ts +18 -0
- package/dist/hooks/useMesh.d.ts +1 -2
- package/dist/index.js +4781 -4794
- package/dist/modals/CheckoutModal/LoadingAccount.d.ts +1 -1
- package/dist/modals/CheckoutModal/stepTransition.d.ts +2 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +0 -4
- package/dist/utils/assets.d.ts +2 -19
- package/dist/utils/flags/config.d.ts +3 -0
- package/dist/wallets/walletConnectors/chunk-25VW5TZP.js +92 -0
- package/dist/wallets/walletConnectors/chunk-2EMZOYQI.js +101 -0
- package/dist/wallets/walletConnectors/chunk-57UUMOOZ.js +95 -0
- package/dist/wallets/walletConnectors/chunk-5K4DIMYR.js +95 -0
- package/dist/wallets/walletConnectors/chunk-AUVBWDIK.js +102 -0
- package/dist/wallets/walletConnectors/chunk-AXPQHNUI.js +71 -0
- package/dist/wallets/walletConnectors/chunk-B7FHT3CB.js +94 -0
- package/dist/wallets/walletConnectors/chunk-EFIENLEE.js +98 -0
- package/dist/wallets/walletConnectors/chunk-FLTQRYFS.js +27 -0
- package/dist/wallets/walletConnectors/chunk-HCKLWBE5.js +98 -0
- package/dist/wallets/walletConnectors/chunk-IR3YKU2N.js +103 -0
- package/dist/wallets/walletConnectors/chunk-J2BF4L2V.js +87 -0
- package/dist/wallets/walletConnectors/chunk-L7QI6PBN.js +108 -0
- package/dist/wallets/walletConnectors/chunk-OKUX4BC4.js +66 -0
- package/dist/wallets/walletConnectors/chunk-QP2BIVXD.js +73 -0
- package/dist/wallets/walletConnectors/chunk-UWZQZY4S.js +149 -0
- package/dist/wallets/walletConnectors/chunk-UZEMNN3Q.js +96 -0
- package/dist/wallets/walletConnectors/chunk-WAMHUVNP.js +96 -0
- package/dist/wallets/walletConnectors/chunk-ZCKNEKQQ.js +110 -0
- package/dist/wallets/walletConnectors/index.js +38 -38
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 3.4.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- a049958: feat: token_transfer_additional_disclaimer flag
|
|
8
|
+
|
|
9
|
+
## 3.4.7
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fa1d0e9: feat: use token transfer as first page
|
|
14
|
+
- fa1d0e9: refactor: powered copy changes
|
|
15
|
+
|
|
16
|
+
## 3.4.6
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- e5fc8cf: refactor: powered copy changes
|
|
21
|
+
- 401f013: feat: remove wrongly indicated error state in brokerage balance fetching
|
|
22
|
+
- e3cfedb: fix: special title cases
|
|
23
|
+
|
|
3
24
|
## 3.4.5
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -1,10 +1,19 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { PaymentMethod,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
import { PaymentMethod, PaymentMethodBrokerageInfo } from '../../domains/paymentMethods';
|
|
3
|
+
interface ConnectedMeshPaymentMethodItemProps {
|
|
4
|
+
paymentMethodInfo: PaymentMethodBrokerageInfo;
|
|
5
|
+
isSelected: boolean;
|
|
6
|
+
onSelect: () => void;
|
|
7
|
+
targetChainId: string;
|
|
8
|
+
}
|
|
9
|
+
/** it is different from BrokeragePaymentMethodItem
|
|
10
|
+
* this component is for connected mesh brokerage like robinhood
|
|
11
|
+
* the other one is for connecting new brokerage button
|
|
12
|
+
* */
|
|
13
|
+
export declare const ConnectedMeshPaymentMethodItem: ({ paymentMethodInfo, isSelected, onSelect, targetChainId, }: ConnectedMeshPaymentMethodItemProps) => React.JSX.Element;
|
|
14
|
+
export declare const AccountBalancePaymentMethodItem: ({ isActive, isSource, customValueIcon, onClick, targetChainId, }: BasePaymentMethodItemProps & {
|
|
15
|
+
targetChainId: string;
|
|
16
|
+
}) => React.JSX.Element;
|
|
8
17
|
type BasePaymentMethodItemProps = {
|
|
9
18
|
isActive: boolean;
|
|
10
19
|
onClick: () => void;
|
|
@@ -12,24 +21,8 @@ type BasePaymentMethodItemProps = {
|
|
|
12
21
|
isSource?: boolean;
|
|
13
22
|
customValueIcon?: ReactNode;
|
|
14
23
|
};
|
|
15
|
-
export declare function AddPaymentMethodItem({ paymentMethod, isClickable, isActive, onClick, isSource,
|
|
24
|
+
export declare function AddPaymentMethodItem({ paymentMethod, isClickable, isActive, onClick, isSource, customValueIcon, }: BasePaymentMethodItemProps & {
|
|
16
25
|
paymentMethod: PaymentMethod;
|
|
17
26
|
dynamicLimit?: string;
|
|
18
27
|
}): React.JSX.Element | undefined;
|
|
19
|
-
interface PaymentMethodSummaryProps {
|
|
20
|
-
paymentMethodInfo: PaymentMethodInfo;
|
|
21
|
-
walletAddress: string | undefined;
|
|
22
|
-
customRecipient: string | undefined;
|
|
23
|
-
isLoading: boolean;
|
|
24
|
-
estimatedTime: number;
|
|
25
|
-
customizationConfig?: FunkitUiCustomRecipientConfig;
|
|
26
|
-
}
|
|
27
|
-
export declare function PaymentMethodSummary({ paymentMethodInfo, walletAddress, customRecipient, estimatedTime, isLoading, customizationConfig, }: PaymentMethodSummaryProps): React.JSX.Element;
|
|
28
|
-
interface PaymentAmountSummaryProps {
|
|
29
|
-
isLoading: boolean;
|
|
30
|
-
targetChainId: string;
|
|
31
|
-
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
32
|
-
textCustomizations: FunkitTextCustomizationsConfig['confirmationScreen'];
|
|
33
|
-
}
|
|
34
|
-
export declare function PaymentAmountSummary({ isLoading, targetChainId, checkoutItem, textCustomizations, }: PaymentAmountSummaryProps): React.JSX.Element;
|
|
35
28
|
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { PaymentMethodInfo } from '../../domains/paymentMethods';
|
|
3
|
+
import { FunkitActiveCheckoutItem } from '../../providers/FunkitCheckoutContext';
|
|
4
|
+
import { FunkitTextCustomizationsConfig, FunkitUiCustomRecipientConfig } from '../../providers/FunkitConfigContext';
|
|
5
|
+
interface PaymentMethodSummaryProps {
|
|
6
|
+
paymentMethodInfo: PaymentMethodInfo;
|
|
7
|
+
walletAddress: string | undefined;
|
|
8
|
+
customRecipient: string | undefined;
|
|
9
|
+
isLoading: boolean;
|
|
10
|
+
estimatedTime: number;
|
|
11
|
+
customizationConfig?: FunkitUiCustomRecipientConfig;
|
|
12
|
+
}
|
|
13
|
+
export declare function PaymentMethodSummary({ paymentMethodInfo, walletAddress, customRecipient, estimatedTime, isLoading, customizationConfig, }: PaymentMethodSummaryProps): React.JSX.Element;
|
|
14
|
+
interface PaymentAmountSummaryProps {
|
|
15
|
+
isLoading: boolean;
|
|
16
|
+
targetChainId: string;
|
|
17
|
+
checkoutItem: FunkitActiveCheckoutItem | null;
|
|
18
|
+
textCustomizations: FunkitTextCustomizationsConfig['confirmationScreen'];
|
|
19
|
+
}
|
|
20
|
+
export declare function PaymentAmountSummary({ isLoading, targetChainId, checkoutItem, textCustomizations, }: PaymentAmountSummaryProps): React.JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const DYDX_API_KEY = "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
|
2
2
|
export declare const POLYMARKET_API_KEY = "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
|
|
3
|
+
export declare function isDydxCustomer(apiKey: string): apiKey is "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5";
|
|
4
|
+
export declare function isPolymarketCustomer(apiKey: string): apiKey is "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
|
|
3
5
|
export declare function isImportantCustomer(apiKey: string): apiKey is "NJq0CGrsE19xBbP1vHyBOp8xJvzYo9kayJHqDFP5" | "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6";
|
package/dist/domains/asset.d.ts
CHANGED
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { Address } from 'viem';
|
|
2
|
+
import { AssetHoldingsItem } from '~/utils/assets';
|
|
2
3
|
export declare function isNativeTokenAddress(address: Address): boolean;
|
|
4
|
+
export declare function isDefaultToken(asset: AssetHoldingsItem, targetChainId: string, targetAsset: string): boolean;
|
|
@@ -19,7 +19,6 @@ export type ServerCheckoutConfig = Omit<FunkitCheckoutConfig, 'generateActionsPa
|
|
|
19
19
|
export interface HistoricalCheckoutItem {
|
|
20
20
|
id: FunkitActiveCheckoutItem['id'];
|
|
21
21
|
startTimestampMs: FunkitActiveCheckoutItem['startTimestampMs'];
|
|
22
|
-
draftDollarValue: FunkitActiveCheckoutItem['draftDollarValue'];
|
|
23
22
|
finalDollarValue: FunkitActiveCheckoutItem['finalDollarValue'];
|
|
24
23
|
latestQuote: FunkitActiveCheckoutItem['latestQuote'];
|
|
25
24
|
depositAddress: FunkitActiveCheckoutItem['depositAddress'];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export interface AssetHoldingsItem {
|
|
2
|
+
iconSrc: string | undefined;
|
|
3
|
+
symbol: string;
|
|
4
|
+
amount: number;
|
|
5
|
+
tokenAddress: `0x${string}`;
|
|
6
|
+
usdAmount: null | number;
|
|
7
|
+
pickedChainId: string;
|
|
8
|
+
chainSymbolKey: string;
|
|
9
|
+
}
|
|
10
|
+
export interface KnownAssetHoldingsItem extends AssetHoldingsItem {
|
|
11
|
+
usdAmount: number;
|
|
12
|
+
}
|
|
13
|
+
export interface AssetHoldingsMap {
|
|
14
|
+
[symbol: string]: AssetHoldingsItem;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* @returns formatted max usable USD balance from a given assets map */
|
|
18
|
+
export declare function getTotalAssetBalance(assets: AssetHoldingsMap): number;
|
package/dist/hooks/useMesh.d.ts
CHANGED
|
@@ -20,5 +20,4 @@ export declare const useMeshActiveNetworkInfo: (chainId: string | undefined, exc
|
|
|
20
20
|
meshSupportedTokens: string[];
|
|
21
21
|
meshNetworkId: string | undefined;
|
|
22
22
|
} | null;
|
|
23
|
-
export declare function
|
|
24
|
-
export declare function useMeshAccountHoldings(targetChain: string, connection: LinkPayload | null): import("@tanstack/react-query").UseQueryResult<import("../utils/assets").AssetHoldingsMap, Error>;
|
|
23
|
+
export declare function useMeshAccountHoldings(targetChain: string, connection: LinkPayload | null): import("@tanstack/react-query").UseQueryResult<import("../domains/wallet").AssetHoldingsMap, Error>;
|