@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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
1
2
|
import type { CheckoutQuoteError } from '../../../providers/FunkitQuoteContext';
|
|
2
3
|
interface TriggerNewQuoteOptions {
|
|
3
4
|
maxRetries: number;
|
|
@@ -8,7 +9,7 @@ interface UseCheckoutQuoteOptions {
|
|
|
8
9
|
onSuccess?: () => void;
|
|
9
10
|
}
|
|
10
11
|
interface UseCheckoutQuoteResult {
|
|
11
|
-
error:
|
|
12
|
+
error: ReactNode;
|
|
12
13
|
isQuoting: boolean;
|
|
13
14
|
step: string | null;
|
|
14
15
|
triggerNewQuote: (options: TriggerNewQuoteOptions) => void;
|
|
@@ -6,5 +6,13 @@ interface FormOfPaymentsListProps {
|
|
|
6
6
|
selectedFop?: SwappedFormOfPayment | null;
|
|
7
7
|
onFopSelect: (fop: SwappedFormOfPayment) => void;
|
|
8
8
|
}
|
|
9
|
+
interface FormOfPaymentSection {
|
|
10
|
+
items: SwappedFormOfPayment[];
|
|
11
|
+
labelKey: 'sourceChange.mostPopular' | 'sourceChange.savedPaymentMethods' | 'sourceChange.moreOptions' | 'sourceChange.otherOptions';
|
|
12
|
+
}
|
|
13
|
+
export declare function getFormOfPaymentSections(fopsData: GetFopsResponse): {
|
|
14
|
+
primary: FormOfPaymentSection;
|
|
15
|
+
secondary: FormOfPaymentSection;
|
|
16
|
+
};
|
|
9
17
|
export declare function FormOfPaymentsList({ fopsData, isLoading, selectedFop, onFopSelect, }: FormOfPaymentsListProps): React.JSX.Element;
|
|
10
18
|
export {};
|
|
@@ -32,7 +32,7 @@ interface CheckoutQuoteState {
|
|
|
32
32
|
/** The quotation step message **/
|
|
33
33
|
quoteStepMessage: string;
|
|
34
34
|
/** Error messages associated with checkout quote **/
|
|
35
|
-
quoteErrorMessage:
|
|
35
|
+
quoteErrorMessage: ReactNode;
|
|
36
36
|
}
|
|
37
37
|
interface FunkitQuoteContextInterface extends CheckoutQuoteState {
|
|
38
38
|
clearCheckoutQuoteMessages: () => void;
|
|
@@ -7,7 +7,7 @@ export declare const flagConfig: {
|
|
|
7
7
|
readonly if_any: [{
|
|
8
8
|
readonly key: "apiKey";
|
|
9
9
|
readonly type: "isAnyOf";
|
|
10
|
-
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "
|
|
10
|
+
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG"];
|
|
11
11
|
}];
|
|
12
12
|
readonly value: "";
|
|
13
13
|
}];
|
|
@@ -90,6 +90,13 @@ export declare const flagConfig: {
|
|
|
90
90
|
readonly values: ["clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e"];
|
|
91
91
|
}];
|
|
92
92
|
readonly value: string;
|
|
93
|
+
}, {
|
|
94
|
+
readonly if_any: [{
|
|
95
|
+
readonly key: "apiKey";
|
|
96
|
+
readonly type: "isAnyOf";
|
|
97
|
+
readonly values: ["5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
|
|
98
|
+
}];
|
|
99
|
+
readonly value: string;
|
|
93
100
|
}];
|
|
94
101
|
};
|
|
95
102
|
readonly withdrawal_chains_and_assets: {
|
|
@@ -205,7 +212,7 @@ export declare const flagConfig: {
|
|
|
205
212
|
readonly if_any: [{
|
|
206
213
|
readonly key: "apiKey";
|
|
207
214
|
readonly type: "isAnyOf";
|
|
208
|
-
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "lI7amueGK94QtGa7sGGVf8n0XhIcn4sHFAZRu5Jj", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0", "vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0", "ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "
|
|
215
|
+
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "lI7amueGK94QtGa7sGGVf8n0XhIcn4sHFAZRu5Jj", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0", "vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0", "ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT", "HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
|
|
209
216
|
}];
|
|
210
217
|
readonly value: true;
|
|
211
218
|
}];
|
|
@@ -224,7 +231,7 @@ export declare const flagConfig: {
|
|
|
224
231
|
readonly if_any: [{
|
|
225
232
|
readonly key: "apiKey";
|
|
226
233
|
readonly type: "isAnyOf";
|
|
227
|
-
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "Tkp90bAf246UQXfou5uHY9UHN7AUV6xK1tgEWKke", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0", "vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0", "ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "
|
|
234
|
+
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "Tkp90bAf246UQXfou5uHY9UHN7AUV6xK1tgEWKke", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "USyZhcp7kB2mMsbRsaHDs3i52cE6srZw8KD8jZd0", "vte0gvTFGH7hPyPED46oV8TyJlyE8p6D7Q73TSx0", "ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "TY2G63jFfd7H29aHiJIzg5RqdXNdog2Q5jgb8tr7", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT", "HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
|
|
228
235
|
}];
|
|
229
236
|
readonly value: true;
|
|
230
237
|
}, {
|
package/dist/utils/swapped.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { SavedFormOfPayment, SwappedFormOfPayment } from '@funkit/api-base';
|
|
2
2
|
import type { ThemeVars } from '../css/sprinkles.css';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare function isSwappedOrigin(origin: string): boolean;
|
|
3
|
+
/**
|
|
4
|
+
* Ref: https://www.notion.so/Fun-Parameter-Styling-Guide-312966ea6e398011bbc6c14e976e281d#63dcdd77ea2d488084a980cda4c63d08
|
|
5
|
+
*/
|
|
7
6
|
export interface SwappedTheme {
|
|
8
7
|
colors: Record<string, string>;
|
|
9
8
|
radii: Record<string, string>;
|
|
@@ -12,7 +11,9 @@ export interface SwappedTheme {
|
|
|
12
11
|
buttonFontWeight: string;
|
|
13
12
|
modalBottomBarButtonHeight: string;
|
|
14
13
|
iframeBackground: string;
|
|
15
|
-
paddingPrimary
|
|
14
|
+
paddingPrimary?: string;
|
|
15
|
+
paddingPrimaryX?: string;
|
|
16
|
+
paddingPrimaryY?: string;
|
|
16
17
|
paddingSecondary: string;
|
|
17
18
|
paddingTertiary: string;
|
|
18
19
|
baseFont?: string;
|
|
@@ -23,8 +24,19 @@ export interface SwappedTheme {
|
|
|
23
24
|
topbarTextFontSize?: string;
|
|
24
25
|
contentPadding?: string;
|
|
25
26
|
boxPaddingY?: string;
|
|
27
|
+
boxPaddingX?: string;
|
|
26
28
|
}
|
|
27
|
-
export declare
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
export declare const isSavedFormOfPaymentType: (fop: SwappedFormOfPayment) => fop is SavedFormOfPayment;
|
|
30
|
+
export declare const getSavedFormOfPaymentDisplayName: (fop: SavedFormOfPayment) => string;
|
|
31
|
+
export declare const getSavedFormOfPaymentIcon: (fop: SavedFormOfPayment) => string;
|
|
32
|
+
export declare function getSwappedOrigin(url: string): string | null;
|
|
33
|
+
export declare function isSwappedOrigin(origin: string): boolean;
|
|
34
|
+
export declare function resolveCssValue(value: string): string;
|
|
35
|
+
export declare function resolveObjectCssVars<T extends object>(obj: T): T;
|
|
36
|
+
export declare function buildSwappedTheme(theme: ThemeVars & {
|
|
37
|
+
customFontFamily?: {
|
|
38
|
+
primary?: string;
|
|
39
|
+
secondary?: string;
|
|
40
|
+
};
|
|
30
41
|
}): SwappedTheme;
|
|
42
|
+
export declare function buildSwappedThemeQueryParams(activeTheme: ThemeVars): Record<string, string>;
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
zerionWallet
|
|
4
4
|
} from "./chunk-TTHM3WUR.js";
|
|
5
5
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
6
|
+
xdefiWallet
|
|
7
|
+
} from "./chunk-O7RSASRH.js";
|
|
8
8
|
import {
|
|
9
9
|
talismanWallet
|
|
10
10
|
} from "./chunk-6MFOL6EB.js";
|
|
@@ -14,21 +14,21 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
tokenaryWallet
|
|
16
16
|
} from "./chunk-34LO6Q7A.js";
|
|
17
|
-
import {
|
|
18
|
-
safeheronWallet
|
|
19
|
-
} from "./chunk-4R4AARTG.js";
|
|
20
17
|
import {
|
|
21
18
|
trustWallet
|
|
22
19
|
} from "./chunk-KO56HCTI.js";
|
|
23
20
|
import {
|
|
24
|
-
|
|
25
|
-
} from "./chunk-
|
|
21
|
+
subWallet
|
|
22
|
+
} from "./chunk-XBLHZICW.js";
|
|
26
23
|
import {
|
|
27
24
|
uniswapWallet
|
|
28
25
|
} from "./chunk-NHLG5PVD.js";
|
|
29
26
|
import {
|
|
30
|
-
|
|
31
|
-
} from "./chunk-
|
|
27
|
+
walletConnectWallet
|
|
28
|
+
} from "./chunk-J34FG3W4.js";
|
|
29
|
+
import {
|
|
30
|
+
zealWallet
|
|
31
|
+
} from "./chunk-HE2LMIPD.js";
|
|
32
32
|
import {
|
|
33
33
|
rabbyWallet
|
|
34
34
|
} from "./chunk-WFNPWKU3.js";
|
|
@@ -44,36 +44,36 @@ import {
|
|
|
44
44
|
import {
|
|
45
45
|
safeWallet
|
|
46
46
|
} from "./chunk-YKVWTGU7.js";
|
|
47
|
+
import {
|
|
48
|
+
safeheronWallet
|
|
49
|
+
} from "./chunk-4R4AARTG.js";
|
|
47
50
|
import {
|
|
48
51
|
safepalWallet
|
|
49
52
|
} from "./chunk-IICWJWGZ.js";
|
|
50
|
-
import {
|
|
51
|
-
subWallet
|
|
52
|
-
} from "./chunk-XBLHZICW.js";
|
|
53
53
|
import {
|
|
54
54
|
tahoWallet
|
|
55
55
|
} from "./chunk-4BMUFNMT.js";
|
|
56
|
-
import {
|
|
57
|
-
ledgerWallet
|
|
58
|
-
} from "./chunk-WKCCLGHJ.js";
|
|
59
56
|
import {
|
|
60
57
|
mewWallet
|
|
61
58
|
} from "./chunk-HKVDCVCG.js";
|
|
59
|
+
import {
|
|
60
|
+
metaMaskWallet
|
|
61
|
+
} from "./chunk-HETS3KKI.js";
|
|
62
62
|
import {
|
|
63
63
|
oktoWallet
|
|
64
64
|
} from "./chunk-BVX22N7L.js";
|
|
65
65
|
import {
|
|
66
66
|
okxWallet
|
|
67
67
|
} from "./chunk-LI6QY2B5.js";
|
|
68
|
-
import {
|
|
69
|
-
omniWallet
|
|
70
|
-
} from "./chunk-INNF7G5X.js";
|
|
71
68
|
import {
|
|
72
69
|
oneInchWallet
|
|
73
70
|
} from "./chunk-RVWLP4IM.js";
|
|
74
71
|
import {
|
|
75
72
|
oneKeyWallet
|
|
76
73
|
} from "./chunk-HE5J5T7X.js";
|
|
74
|
+
import {
|
|
75
|
+
omniWallet
|
|
76
|
+
} from "./chunk-INNF7G5X.js";
|
|
77
77
|
import {
|
|
78
78
|
phantomWallet
|
|
79
79
|
} from "./chunk-XMNVOYSJ.js";
|
|
@@ -86,12 +86,12 @@ import {
|
|
|
86
86
|
import {
|
|
87
87
|
frontierWallet
|
|
88
88
|
} from "./chunk-CJJT7LMT.js";
|
|
89
|
-
import {
|
|
90
|
-
gateWallet
|
|
91
|
-
} from "./chunk-7OARWILZ.js";
|
|
92
89
|
import {
|
|
93
90
|
imTokenWallet
|
|
94
91
|
} from "./chunk-IUVO4IN3.js";
|
|
92
|
+
import {
|
|
93
|
+
gateWallet
|
|
94
|
+
} from "./chunk-7OARWILZ.js";
|
|
95
95
|
import {
|
|
96
96
|
injectedWallet
|
|
97
97
|
} from "./chunk-W6MXINYY.js";
|
|
@@ -99,20 +99,17 @@ import {
|
|
|
99
99
|
kresusWallet
|
|
100
100
|
} from "./chunk-G4V5B6YC.js";
|
|
101
101
|
import {
|
|
102
|
-
|
|
103
|
-
} from "./chunk-
|
|
104
|
-
import {
|
|
105
|
-
bybitWallet
|
|
106
|
-
} from "./chunk-6UCI7GM6.js";
|
|
102
|
+
ledgerWallet
|
|
103
|
+
} from "./chunk-WKCCLGHJ.js";
|
|
107
104
|
import {
|
|
108
105
|
clvWallet
|
|
109
106
|
} from "./chunk-GVOQTORD.js";
|
|
107
|
+
import {
|
|
108
|
+
bloomWallet
|
|
109
|
+
} from "./chunk-UB2SSFH7.js";
|
|
110
110
|
import {
|
|
111
111
|
coin98Wallet
|
|
112
112
|
} from "./chunk-6YO27XOM.js";
|
|
113
|
-
import {
|
|
114
|
-
coinbaseWallet
|
|
115
|
-
} from "./chunk-RZXMOPIV.js";
|
|
116
113
|
import {
|
|
117
114
|
coreWallet
|
|
118
115
|
} from "./chunk-GH4M6FTK.js";
|
|
@@ -122,6 +119,9 @@ import {
|
|
|
122
119
|
import {
|
|
123
120
|
desigWallet
|
|
124
121
|
} from "./chunk-JYVLYSH3.js";
|
|
122
|
+
import {
|
|
123
|
+
coinbaseWallet
|
|
124
|
+
} from "./chunk-RZXMOPIV.js";
|
|
125
125
|
import {
|
|
126
126
|
enkryptWallet
|
|
127
127
|
} from "./chunk-W6TXXLCO.js";
|
|
@@ -140,13 +140,13 @@ import {
|
|
|
140
140
|
import {
|
|
141
141
|
bitverseWallet
|
|
142
142
|
} from "./chunk-GROWFRGP.js";
|
|
143
|
-
import {
|
|
144
|
-
bloomWallet
|
|
145
|
-
} from "./chunk-UB2SSFH7.js";
|
|
146
|
-
import "./chunk-MAPXJUOO.js";
|
|
147
143
|
import {
|
|
148
144
|
braveWallet
|
|
149
145
|
} from "./chunk-ZRNBHLUU.js";
|
|
146
|
+
import {
|
|
147
|
+
bybitWallet
|
|
148
|
+
} from "./chunk-6UCI7GM6.js";
|
|
149
|
+
import "./chunk-MAPXJUOO.js";
|
|
150
150
|
import "./chunk-BAVE62IL.js";
|
|
151
151
|
import "./chunk-KV4HGYM3.js";
|
|
152
152
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "9.0.
|
|
3
|
+
"version": "9.0.2",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -102,10 +102,10 @@
|
|
|
102
102
|
"ua-parser-js": "^1.0.37",
|
|
103
103
|
"use-debounce": "^10.0.5",
|
|
104
104
|
"uuid": "^9.0.1",
|
|
105
|
+
"@funkit/api-base": "2.3.2",
|
|
105
106
|
"@funkit/chains": "1.1.0",
|
|
106
|
-
"@funkit/api-base": "2.3.1",
|
|
107
107
|
"@funkit/utils": "1.2.3",
|
|
108
|
-
"@funkit/fun-relay": "2.6.
|
|
108
|
+
"@funkit/fun-relay": "2.6.2"
|
|
109
109
|
},
|
|
110
110
|
"repository": {
|
|
111
111
|
"type": "git",
|