@funkit/connect 9.0.0 → 9.0.2
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 +24 -0
- package/dist/components/FunButton/FunLinkButton.d.ts +2 -1
- package/dist/components/FunNotificationBanner/FunNotificationBanner.d.ts +2 -2
- package/dist/components/Icons/CryptoTransferQRIcon.d.ts +4 -0
- package/dist/components/Icons/ExchangeIcon.d.ts +4 -0
- package/dist/consts/customers.d.ts +0 -1
- package/dist/consts/quote.d.ts +6 -5
- package/dist/hooks/track/CheckoutModalEvent.d.ts +6 -0
- package/dist/hooks/useCheckoutQuoteNotification.d.ts +1 -1
- package/dist/hooks/useSwappedPreload.d.ts +1 -1
- package/dist/index.js +2729 -2445
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +2 -1
- package/dist/modals/CheckoutModal/SourceChange/FormOfPaymentsList.d.ts +8 -0
- package/dist/providers/FunkitQuoteContext.d.ts +1 -1
- package/dist/providers/SwappedProvider.d.ts +0 -1
- package/dist/utils/flags/config.d.ts +10 -3
- package/dist/utils/swapped.d.ts +20 -8
- package/dist/wallets/walletConnectors/index.js +33 -33
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @funkit/connect
|
|
2
2
|
|
|
3
|
+
## 9.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1cd5f08: Pass abort signal to direct execution quote requests (getCheckoutQuoteV2) so in-flight quotes can be cancelled when navigating away from the confirmation step
|
|
8
|
+
- e3c8fa3: feat(connect): add contact us links to error messages
|
|
9
|
+
- c47429b: Remove Hyperbeat customer integration
|
|
10
|
+
- 8be2cc2: new source global icons
|
|
11
|
+
- 4bcd313: feat(connect): swapped iframe pool prioritizes popular
|
|
12
|
+
- Updated dependencies [c47429b]
|
|
13
|
+
- @funkit/api-base@2.3.2
|
|
14
|
+
- @funkit/fun-relay@2.6.2
|
|
15
|
+
|
|
16
|
+
## 9.0.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 7506ab8: feat(connect): swapped statsig step events
|
|
21
|
+
- 0e2bc9d: feat(connect): swapped iframe event metadata
|
|
22
|
+
- c1fed6a: fix: swapped box paddings
|
|
23
|
+
- 9b87e81: replace postmessage wildcard origin for swapped
|
|
24
|
+
- c5d7c00: feat: resolve css variable values before sending theme to swapped
|
|
25
|
+
- f863de4: feat(connect): add timeout error logs
|
|
26
|
+
|
|
3
27
|
## 9.0.0
|
|
4
28
|
|
|
5
29
|
### Major Changes
|
|
@@ -16,6 +16,7 @@ interface FunLinkButtonProps {
|
|
|
16
16
|
export declare function FunLinkButton({ inline, href, onClick, text, size, weight, variant, }: FunLinkButtonProps): React.JSX.Element;
|
|
17
17
|
interface ContactSupportLinkProps extends Omit<FunLinkButtonProps, 'text'> {
|
|
18
18
|
text?: string;
|
|
19
|
+
children?: string;
|
|
19
20
|
}
|
|
20
|
-
export declare const ContactSupportLink: ({ text, size, inline, href, ...rest }: ContactSupportLinkProps) => React.JSX.Element;
|
|
21
|
+
export declare const ContactSupportLink: ({ text, children, size, weight, inline, href, ...rest }: ContactSupportLinkProps) => React.JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React, { type ReactNode } from 'react';
|
|
2
2
|
import { type FunNotificationBannerIconProps } from './FunNotificationBannerIcon';
|
|
3
3
|
interface FunNotificationBannerProps extends FunNotificationBannerIconProps {
|
|
4
|
-
title:
|
|
5
|
-
description:
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
description: ReactNode;
|
|
6
6
|
/** Additional text-like content clarifying the description */
|
|
7
7
|
disclaimer?: ReactNode;
|
|
8
8
|
children?: ReactNode;
|
|
@@ -4,7 +4,6 @@ export declare function isOstiumCustomer(apiKey: string): apiKey is "SMbBD7DS9b3
|
|
|
4
4
|
export declare function isBankrCustomer(apiKey: string): apiKey is "vWe20Dfyui2ouvfOhtSTY3Czeo8lFdbo5xXQBALZ";
|
|
5
5
|
export declare function isBsxCustomer(apiKey: string): apiKey is "zN1zrkmLQn4oZtLUW9Qt02uuBI3Jvrgj8Ni40Gf1";
|
|
6
6
|
export declare function isEtherealCustomer(apiKey: string): apiKey is "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um";
|
|
7
|
-
export declare function isHyperbeatCustomer(apiKey: string): apiKey is "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau";
|
|
8
7
|
export declare function isHyperdashCustomer(apiKey: string): apiKey is "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe";
|
|
9
8
|
export declare function isMonadCustomer(apiKey: string): apiKey is "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc";
|
|
10
9
|
export declare function isMonkeyTiltCustomer(apiKey: string): apiKey is "2SrxurU07T2XPDxCAItjj4yYEMXlwV8K2kJB78AX";
|
package/dist/consts/quote.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { TFunction } from 'i18next';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
export declare enum PendingQuoteMessage {
|
|
3
4
|
PREPARING = 0,
|
|
4
5
|
VERIFYING_PROVIDER = 1,
|
|
@@ -11,14 +12,14 @@ export declare const getPendingQuoteMessageGenerator: (t: TFunction) => {
|
|
|
11
12
|
2: () => string;
|
|
12
13
|
3: () => string;
|
|
13
14
|
};
|
|
14
|
-
export declare const
|
|
15
|
+
export declare const getQuoteApiErrorDisplayInfo: (t: TFunction) => {
|
|
15
16
|
0: {
|
|
16
17
|
check: string;
|
|
17
|
-
display:
|
|
18
|
+
display: ReactNode;
|
|
18
19
|
};
|
|
19
20
|
1: {
|
|
20
21
|
check: string;
|
|
21
|
-
display:
|
|
22
|
+
display: ReactNode;
|
|
22
23
|
};
|
|
23
24
|
6: {
|
|
24
25
|
check: string;
|
|
@@ -47,7 +48,7 @@ export declare enum QuoteCustomErrorType {
|
|
|
47
48
|
INSUFFICIENT_BALANCE_POST_CHECK = 2,
|
|
48
49
|
INSUFFICIENT_AMOUNT_POST_CHECK = 3
|
|
49
50
|
}
|
|
50
|
-
export declare const
|
|
51
|
+
export declare const getQuoteCustomErrorDisplayInfo: (t: TFunction) => {
|
|
51
52
|
0: {
|
|
52
53
|
check: string;
|
|
53
54
|
display: string;
|
|
@@ -65,4 +66,4 @@ export declare const getQuoteCustomErrorStringInfo: (t: TFunction) => {
|
|
|
65
66
|
display: string;
|
|
66
67
|
};
|
|
67
68
|
};
|
|
68
|
-
export declare function generateQuoteApiErrorForDisplay(err: Error, t: TFunction):
|
|
69
|
+
export declare function generateQuoteApiErrorForDisplay(err: Error, t: TFunction): ReactNode;
|
|
@@ -32,6 +32,8 @@ export declare enum CheckoutModalEvent {
|
|
|
32
32
|
READY_TRANSFER_TOKEN = "fc::ready::transfer_token",
|
|
33
33
|
READY_LOADING_ACCOUNT = "fc::ready::loading_account",
|
|
34
34
|
READY_SWAPPED_IFRAME = "fc::ready::swapped_iframe",
|
|
35
|
+
SOURCE_CHANGE_CRYPTO_TAB = "fc::source_change::crypto_tab",
|
|
36
|
+
SOURCE_CHANGE_CASH_TAB = "fc::source_change::cash_tab",
|
|
35
37
|
QUERY_FROG_SUB_ACCOUNTS = "fc::query::frog_sub_accounts",
|
|
36
38
|
QUERY_UDA_ADDRESS = "fc::query::uda_address",
|
|
37
39
|
QUERY_WALLET_ASSETS = "fc::query::wallet_assets",
|
|
@@ -44,6 +46,10 @@ export declare enum CheckoutModalEvent {
|
|
|
44
46
|
BLUVO_WITHDRAWAL_COMPLETED = "fc::success::bluvo_withdrawal_completed",
|
|
45
47
|
QUICK_OPTION_SELECTED = "fc::input_amount::quick_option_selected",
|
|
46
48
|
SWAPPED_IFRAME_NAVIGATION = "fc::swapped_iframe::navigation",
|
|
49
|
+
SWAPPED_IFRAME_NAVIGATION_INITIAL = "fc::swapped_iframe::navigation::initial",
|
|
50
|
+
SWAPPED_IFRAME_NAVIGATION_KYC = "fc::swapped_iframe::navigation::kyc",
|
|
51
|
+
SWAPPED_IFRAME_NAVIGATION_PAYMENT = "fc::swapped_iframe::navigation::payment",
|
|
52
|
+
SWAPPED_IFRAME_NAVIGATION_CONFIRMATION = "fc::swapped_iframe::navigation::confirmation",
|
|
47
53
|
SWAPPED_IFRAME_COMPLETE = "fc::swapped_iframe::complete",
|
|
48
54
|
SWAPPED_IFRAME_ERROR = "fc::swapped_iframe::error",
|
|
49
55
|
SWAPPED_IFRAME_BACK = "fc::swapped_iframe::back",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function useCheckoutQuoteNotification(): {
|
|
2
2
|
quoteNotification: {
|
|
3
3
|
readonly messageType: "error";
|
|
4
|
-
readonly quoteMessage: string
|
|
4
|
+
readonly quoteMessage: string | number | bigint | true | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | import("react").ReactPortal | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<import("react").ReactNode> | null | undefined>;
|
|
5
5
|
} | {
|
|
6
6
|
readonly messageType: "step";
|
|
7
7
|
readonly quoteMessage: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { GetFopsResponse } from '@funkit/api-base';
|
|
2
2
|
/**
|
|
3
3
|
* Feeds fops data into the SwappedProvider iframe pool.
|
|
4
|
-
* Extracts iframe URLs in priority order (
|
|
4
|
+
* Extracts iframe URLs in priority order (matching FormOfPaymentsList component)
|
|
5
5
|
* and passes them to the pool for background preloading.
|
|
6
6
|
*/
|
|
7
7
|
export declare function useSwappedPreload(fopsData: GetFopsResponse | undefined): void;
|