@funkit/connect 5.5.14 → 5.5.16
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 +38 -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/fees.d.ts +1 -0
- package/dist/domains/paymentMethods.d.ts +1 -0
- package/dist/domains/quote.d.ts +1 -1
- package/dist/domains/relay.d.ts +5 -0
- package/dist/{modals/CheckoutModal/InputAmount → hooks}/useAssetPrice.d.ts +10 -6
- package/dist/hooks/usePaymentMethodIcon.d.ts +1 -6
- package/dist/index.css +4 -1
- package/dist/index.js +1361 -1176
- 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/providers/FunkitHistoryContext.d.ts +1 -1
- 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/flags/config.d.ts +5 -16
- package/dist/utils/moonpay.d.ts +2 -5
- 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 +47 -47
- 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 +6 -6
- 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,43 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 5.5.16
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- dd97dc2: feat: add feature flag to hide chains from withdrawal
|
|
8
|
+
- 1b38d78: feat: add token icon assets
|
|
9
|
+
- 5e1cbf8: feat(connect): update how we display fees for withdrawal
|
|
10
|
+
feat(fun-relay): update fee structure - remove variable LP
|
|
11
|
+
feat(frog): update fee structure - remove variable LP
|
|
12
|
+
- 09ac3b8: feat(relay): expose blockchain confirmation callback
|
|
13
|
+
- 4dfcaa3: skip gas estimate for withdrawal
|
|
14
|
+
- 4c4f24a: feat(connect, apps): Complete screen without scrollbar, change of hover color for Katana
|
|
15
|
+
- cc372b2: feat(connect): update how we are displaying fees to the user
|
|
16
|
+
- Updated dependencies [dd97dc2]
|
|
17
|
+
- Updated dependencies [5e1cbf8]
|
|
18
|
+
- Updated dependencies [c11a45a]
|
|
19
|
+
- Updated dependencies [f3aa50c]
|
|
20
|
+
- Updated dependencies [09ac3b8]
|
|
21
|
+
- Updated dependencies [09ac3b8]
|
|
22
|
+
- Updated dependencies [e273041]
|
|
23
|
+
- @funkit/utils@1.1.6
|
|
24
|
+
- @funkit/fun-relay@0.1.10
|
|
25
|
+
- @funkit/api-base@1.9.8
|
|
26
|
+
- @funkit/core@2.3.30
|
|
27
|
+
- @funkit/wagmi-tools@3.0.52
|
|
28
|
+
|
|
29
|
+
## 5.5.15
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- 9f6d124: fix react bug
|
|
34
|
+
- 890ef8f: add up all gas
|
|
35
|
+
- 4c208d4: feat(connect): swap meld deposit address from user to QR code address
|
|
36
|
+
- Updated dependencies [4c208d4]
|
|
37
|
+
- @funkit/api-base@1.9.7
|
|
38
|
+
- @funkit/core@2.3.29
|
|
39
|
+
- @funkit/wagmi-tools@3.0.51
|
|
40
|
+
|
|
3
41
|
## 5.5.14
|
|
4
42
|
|
|
5
43
|
### 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
|
};
|
package/dist/domains/fees.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ interface EvaluateFeeBreakdownItem {
|
|
|
46
46
|
wagmiConfig: Config;
|
|
47
47
|
apiKey: string;
|
|
48
48
|
loginType: LoginType;
|
|
49
|
+
isWithdrawal?: boolean;
|
|
49
50
|
}
|
|
50
51
|
export declare function evaluateFeeBreakdown(evalItem: EvaluateFeeBreakdownItem, enableFrogProxyServer?: boolean): Promise<{
|
|
51
52
|
fees: CheckoutFees;
|
|
@@ -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;
|
package/dist/domains/quote.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export interface FunkitCheckoutQuoteResult extends Omit<ApiFunkitCheckoutQuoteRe
|
|
|
11
11
|
finalFeesBreakdown: CheckoutFees;
|
|
12
12
|
}
|
|
13
13
|
export declare function getCheckoutBaseQuote(checkoutItem: FunkitActiveCheckoutItem, userId: string, walletAddress: Address, apiKey: string, sponsorInitialTransferGasLimit: number, wagmiConfig: Config, directExecutionInfo: FunkitDirectExecutionInfo, senderAddress?: Address, isWithdrawal?: boolean): Promise<CheckoutQuoteResponse>;
|
|
14
|
-
export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse, checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, wagmiConfig: Config, apiKey: string, loginType: LoginType, enableFrogProxyServer?: boolean): Promise<{
|
|
14
|
+
export declare function getQuoteFinalEstimation(baseQuote: CheckoutQuoteResponse, checkoutItem: FunkitActiveCheckoutItem, newPaymentMethodInfo: PaymentMethodInfo, wagmiConfig: Config, apiKey: string, loginType: LoginType, enableFrogProxyServer?: boolean, isWithdrawal?: boolean): Promise<{
|
|
15
15
|
finalEstimation: FunkitCheckoutQuoteResult;
|
|
16
16
|
brokerage?: BrokerageDetails;
|
|
17
17
|
}>;
|
package/dist/domains/relay.d.ts
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import type { RelayQuote } from '@funkit/fun-relay';
|
|
2
2
|
export declare const KATANA_BRIDGE_ALERT_THRESHOLD_PERCENT = 0.5;
|
|
3
|
+
export declare function calcCustomFees(relayQuote: RelayQuote['metadata']['relayQuote']): {
|
|
4
|
+
swapImpactUsd: number;
|
|
5
|
+
appFeeUsd: number;
|
|
6
|
+
totalImpactUsd: number;
|
|
7
|
+
};
|
|
3
8
|
export declare function extractRelayFeeInfo(relayQuote: RelayQuote['metadata']['relayQuote']): {
|
|
4
9
|
gasUsd: number;
|
|
5
10
|
fillCostUsd: number;
|
|
@@ -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
|
package/dist/index.css
CHANGED
|
@@ -8170,7 +8170,7 @@
|
|
|
8170
8170
|
}
|
|
8171
8171
|
}
|
|
8172
8172
|
|
|
8173
|
-
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#
|
|
8173
|
+
/* vanilla-extract-css-ns:src/components/Dialog/DialogContent.css.ts.vanilla.css?source=#H4sIAAAAAAAAE7WVy66bMBCG9+cpLHWTLBwREs7JIZuqz9B9NeAhWDE2sodAWuXdKy6hmCRqoqor5GG+fwbPhdWPdfmTtuFmzX69MVZAw3OUh5xiFoVR2ewHYy0F5TFbB8Gpbm3DeRsFrc/lbTXqxDm4xRdxFg0v4VygJu5qSWmOdnkT4/0jus+TOaLmZEG7DC0v4YC39C58QGcSiAskkOpVNDU6k7YAkka/zhalQsJXuVpSLizUoHimTP0MGfY+Ul8rs9kFfbX88wTZvI5sO6QEIaQ+cNsnE+wnNoVZb5pQkUclhsgUc5+PeTJSS5KgJumkoNJF13CMs01QNsv9/FoCd8p92Ve6J2hh3/YZPVB8oqOekvvsOHNC21aaNzHLpRCo91PrOWZQkWltLrVGqQQsP1REaGPmCBKF/rvhxirtkPxwccxrTI6S2ttIj130BNLjwZpKC54aZWzMTmAXnNtjf3a8MALUt9Ft+UhzzKDTFdKVCs5jHmMl3/s2+w9xOeVVkfRfZaxAyy0IWbmJdGuQvfLyuSwILUmw5+/YkJ8C/CWFf/vAx+px3vbGkzEcpkaLu/knfp0yhV1h2icX0mLabr2YpUZVRdeS10Zux9Bv5NQb8nEN3NsWE0p0VDeYso9lSkglnVmwCh1DcMil5qby2xhvMFCKBatohvjTF0bDfrsO1p9hm2hnN5M8ULfhtkO4IdY92a8FCgntaCJqBlqwxWTJfbzvyqZfHSv/xzv/ozJ2mTqFg9O97T3f3zN0c4tuwzk6Wi5vl99vlQlxEwgAAA== */
|
|
8174
8174
|
[data-rk] ._1pzt4231 {
|
|
8175
8175
|
max-height: 525px;
|
|
8176
8176
|
max-width: 100vw;
|
|
@@ -8188,6 +8188,9 @@
|
|
|
8188
8188
|
[data-rk] ._1pzt4231:has(#confirmation-page) {
|
|
8189
8189
|
max-height: 825px;
|
|
8190
8190
|
}
|
|
8191
|
+
[data-rk] ._1pzt4231:has(#complete-page) {
|
|
8192
|
+
max-height: 825px;
|
|
8193
|
+
}
|
|
8191
8194
|
[data-rk] ._1pzt4231:has(#withdrawal-flow) {
|
|
8192
8195
|
max-height: 825px;
|
|
8193
8196
|
}
|