@funkit/connect 6.14.0-next.3 → 6.14.1
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 +66 -0
- package/dist/{chunk-AYZ7Y4HD.js → chunk-4WTYVVDI.js} +8 -4
- package/dist/{chunk-H2VLM4QU.js → chunk-CSLMZ5KJ.js} +8 -4
- package/dist/{chunk-65VC5BJ7.js → chunk-WCUXJAGT.js} +9 -4
- package/dist/components/Box/Box.d.ts +29 -29
- package/dist/css/sprinkles.css.d.ts +37 -29
- package/dist/domains/asset.d.ts +1 -1
- package/dist/index.css +2969 -2861
- package/dist/index.d.ts +1 -1
- package/dist/index.js +199 -151
- package/dist/modals/CheckoutModal/ConfirmationStep/useCheckoutQuote.d.ts +2 -1
- package/dist/modals/WithdrwalModal/useWithdrawal.d.ts +1 -1
- package/dist/providers/FunkitCheckoutContext.d.ts +8 -7
- package/dist/providers/FunkitThemeProvider.d.ts +12 -0
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/flags/config.d.ts +14 -2
- package/dist/wallets/walletConnectors/index.js +35 -35
- package/package.json +7 -7
|
@@ -3,6 +3,7 @@ interface TriggerNewQuoteOptions {
|
|
|
3
3
|
maxRetries: number;
|
|
4
4
|
}
|
|
5
5
|
interface UseCheckoutQuoteOptions {
|
|
6
|
+
targetAssetunitPrice: number;
|
|
6
7
|
onFailure: (error: CheckoutQuoteError) => void;
|
|
7
8
|
onSuccess?: () => void;
|
|
8
9
|
}
|
|
@@ -12,5 +13,5 @@ interface UseCheckoutQuoteResult {
|
|
|
12
13
|
step: string | null;
|
|
13
14
|
triggerNewQuote: (options: TriggerNewQuoteOptions) => void;
|
|
14
15
|
}
|
|
15
|
-
export declare function useCheckoutQuote({ onFailure, onSuccess, }: UseCheckoutQuoteOptions): UseCheckoutQuoteResult;
|
|
16
|
+
export declare function useCheckoutQuote({ targetAssetunitPrice, onFailure, onSuccess, }: UseCheckoutQuoteOptions): UseCheckoutQuoteResult;
|
|
16
17
|
export {};
|
|
@@ -7,9 +7,11 @@ import type { AssetHoldingsItem } from '../utils/assets';
|
|
|
7
7
|
import type { WithdrawalClient } from '../wallets/Wallet';
|
|
8
8
|
import { type FunkitCheckoutQuoteResult } from './FunkitHistoryContext';
|
|
9
9
|
export type FunkitCheckoutActionParams = ApiFunkitCheckoutActionParams;
|
|
10
|
-
export interface
|
|
10
|
+
export interface TokenInfo {
|
|
11
11
|
tokenAddress: Address;
|
|
12
12
|
tokenChainId: string;
|
|
13
|
+
}
|
|
14
|
+
export interface DynamicTargetAssetCandidate extends TokenInfo {
|
|
13
15
|
iconSrc: string;
|
|
14
16
|
tokenSymbol: string;
|
|
15
17
|
isDefault?: boolean;
|
|
@@ -53,17 +55,14 @@ export interface FunkitCheckoutConfig extends Omit<ApiFunkitCheckoutConfig, 'gen
|
|
|
53
55
|
/** Address of the source token on the source chain. Required if startingStep is set to FunCheckoutStartingStep.CONFIRMATION. */
|
|
54
56
|
sourceTokenAddress?: Address;
|
|
55
57
|
/** Address list of the tokens that cannot be used as source. e.g. tokens for staking vault */
|
|
56
|
-
disabledSourceTokens?:
|
|
57
|
-
tokenAddress: Address;
|
|
58
|
-
tokenChainId: string;
|
|
59
|
-
}[];
|
|
58
|
+
disabledSourceTokens?: TokenInfo[];
|
|
60
59
|
/** *****************************
|
|
61
60
|
* Miscellaneous configurations *
|
|
62
61
|
********************************/
|
|
63
62
|
/** a list of candidate assets to be chosen dynamically */
|
|
64
63
|
dynamicTargetAssetCandidates?: DynamicTargetAssetCandidate[];
|
|
65
|
-
/** minimal
|
|
66
|
-
|
|
64
|
+
/** minimal USD needed to deposit */
|
|
65
|
+
getMinDepositUSD?: (asset: TokenInfo) => number;
|
|
67
66
|
/** For Checkout with Custom Action, QRCode needs special action type
|
|
68
67
|
* to specify the onchain action to execute after deposit */
|
|
69
68
|
qrcodeActionType?: string;
|
|
@@ -82,6 +81,8 @@ export interface WithdrawalConfigBase {
|
|
|
82
81
|
sourceTokenAddress: Address;
|
|
83
82
|
/** Disable connected option for email login user */
|
|
84
83
|
disableConnectedWallet?: boolean;
|
|
84
|
+
/** minimal USD needed to withdraw */
|
|
85
|
+
getMinWithdrawalUSD?: (asset: TokenInfo) => number;
|
|
85
86
|
}
|
|
86
87
|
export interface WalletWithdrawalConfig extends WithdrawalConfigBase {
|
|
87
88
|
/** Wallet instance used to execute the quote */
|
|
@@ -72,6 +72,7 @@ export declare const useActiveTheme: () => {
|
|
|
72
72
|
transparent: string;
|
|
73
73
|
buttonBackgroundTertiary: string;
|
|
74
74
|
buttonBackgroundHoverTertiary: string;
|
|
75
|
+
buttonBackgroundDisabledTertiary: string;
|
|
75
76
|
buttonTextTertiary: string;
|
|
76
77
|
buttonTextDisabledTertiary: string;
|
|
77
78
|
buttonBackground: string;
|
|
@@ -214,6 +215,7 @@ export declare const useActiveTheme: () => {
|
|
|
214
215
|
tooltip: string;
|
|
215
216
|
dropdown: string;
|
|
216
217
|
dropdownItem: string;
|
|
218
|
+
modalTopbarIcon: string;
|
|
217
219
|
};
|
|
218
220
|
borderWidths: {
|
|
219
221
|
activeOptionBorderWidth: string;
|
|
@@ -228,6 +230,8 @@ export declare const useActiveTheme: () => {
|
|
|
228
230
|
qrCode: string;
|
|
229
231
|
buttonFocusedShadow: string;
|
|
230
232
|
buttonHoverShadow: string;
|
|
233
|
+
buttonFocusedShadowTertiary: string;
|
|
234
|
+
buttonHoverShadowTertiary: string;
|
|
231
235
|
buttonDisabledShadow: string;
|
|
232
236
|
selectedDropdownItem: string;
|
|
233
237
|
};
|
|
@@ -297,6 +301,7 @@ export declare const useActiveTheme: () => {
|
|
|
297
301
|
transparent: string;
|
|
298
302
|
buttonBackgroundTertiary: string;
|
|
299
303
|
buttonBackgroundHoverTertiary: string;
|
|
304
|
+
buttonBackgroundDisabledTertiary: string;
|
|
300
305
|
buttonTextTertiary: string;
|
|
301
306
|
buttonTextDisabledTertiary: string;
|
|
302
307
|
buttonBackground: string;
|
|
@@ -439,6 +444,7 @@ export declare const useActiveTheme: () => {
|
|
|
439
444
|
tooltip: string;
|
|
440
445
|
dropdown: string;
|
|
441
446
|
dropdownItem: string;
|
|
447
|
+
modalTopbarIcon: string;
|
|
442
448
|
};
|
|
443
449
|
borderWidths: {
|
|
444
450
|
activeOptionBorderWidth: string;
|
|
@@ -453,6 +459,8 @@ export declare const useActiveTheme: () => {
|
|
|
453
459
|
qrCode: string;
|
|
454
460
|
buttonFocusedShadow: string;
|
|
455
461
|
buttonHoverShadow: string;
|
|
462
|
+
buttonFocusedShadowTertiary: string;
|
|
463
|
+
buttonHoverShadowTertiary: string;
|
|
456
464
|
buttonDisabledShadow: string;
|
|
457
465
|
selectedDropdownItem: string;
|
|
458
466
|
};
|
|
@@ -520,6 +528,7 @@ export declare const useActiveTheme: () => {
|
|
|
520
528
|
transparent: string;
|
|
521
529
|
buttonBackgroundTertiary: string;
|
|
522
530
|
buttonBackgroundHoverTertiary: string;
|
|
531
|
+
buttonBackgroundDisabledTertiary: string;
|
|
523
532
|
buttonTextTertiary: string;
|
|
524
533
|
buttonTextDisabledTertiary: string;
|
|
525
534
|
buttonBackground: string;
|
|
@@ -662,6 +671,7 @@ export declare const useActiveTheme: () => {
|
|
|
662
671
|
tooltip: string;
|
|
663
672
|
dropdown: string;
|
|
664
673
|
dropdownItem: string;
|
|
674
|
+
modalTopbarIcon: string;
|
|
665
675
|
};
|
|
666
676
|
borderWidths: {
|
|
667
677
|
activeOptionBorderWidth: string;
|
|
@@ -676,6 +686,8 @@ export declare const useActiveTheme: () => {
|
|
|
676
686
|
qrCode: string;
|
|
677
687
|
buttonFocusedShadow: string;
|
|
678
688
|
buttonHoverShadow: string;
|
|
689
|
+
buttonFocusedShadowTertiary: string;
|
|
690
|
+
buttonHoverShadowTertiary: string;
|
|
679
691
|
buttonDisabledShadow: string;
|
|
680
692
|
selectedDropdownItem: string;
|
|
681
693
|
};
|
package/dist/themes/baseTheme.js
CHANGED
package/dist/themes/darkTheme.js
CHANGED
|
@@ -17,7 +17,7 @@ export declare const flagConfig: {
|
|
|
17
17
|
readonly if_any: [{
|
|
18
18
|
readonly key: "apiKey";
|
|
19
19
|
readonly type: "isAnyOf";
|
|
20
|
-
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4"];
|
|
20
|
+
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "KEd0ZxJc4n1QBER8yBcKH8wWwfgjjdjO42riuq86"];
|
|
21
21
|
}];
|
|
22
22
|
readonly value: "";
|
|
23
23
|
}];
|
|
@@ -187,7 +187,7 @@ export declare const flagConfig: {
|
|
|
187
187
|
readonly if_any: [{
|
|
188
188
|
readonly key: "apiKey";
|
|
189
189
|
readonly type: "isAnyOf";
|
|
190
|
-
readonly values: ["OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4"];
|
|
190
|
+
readonly values: ["OXLUmejkh9PlNDS4gSvi9gcEWacOpTz2KUVepVf4", "KEd0ZxJc4n1QBER8yBcKH8wWwfgjjdjO42riuq86"];
|
|
191
191
|
}];
|
|
192
192
|
readonly value: false;
|
|
193
193
|
}];
|
|
@@ -266,5 +266,17 @@ export declare const flagConfig: {
|
|
|
266
266
|
readonly type: "string";
|
|
267
267
|
readonly default_value: string;
|
|
268
268
|
};
|
|
269
|
+
readonly permit2_tokens: {
|
|
270
|
+
readonly type: "string";
|
|
271
|
+
readonly default_value: string;
|
|
272
|
+
readonly overrides: [{
|
|
273
|
+
readonly if_any: [{
|
|
274
|
+
readonly key: "apiKey";
|
|
275
|
+
readonly type: "isAnyOf";
|
|
276
|
+
readonly values: ["clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e"];
|
|
277
|
+
}];
|
|
278
|
+
readonly value: string;
|
|
279
|
+
}];
|
|
280
|
+
};
|
|
269
281
|
};
|
|
270
282
|
export type FlagConfig = typeof flagConfig;
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import {
|
|
3
3
|
walletConnectWallet
|
|
4
4
|
} from "./chunk-NP5QGWNL.js";
|
|
5
|
-
import {
|
|
6
|
-
zealWallet
|
|
7
|
-
} from "./chunk-RNBEDQHF.js";
|
|
8
5
|
import {
|
|
9
6
|
zerionWallet
|
|
10
7
|
} from "./chunk-SULRQO27.js";
|
|
8
|
+
import {
|
|
9
|
+
zealWallet
|
|
10
|
+
} from "./chunk-RNBEDQHF.js";
|
|
11
11
|
import {
|
|
12
12
|
subWallet
|
|
13
13
|
} from "./chunk-JWFF4AAL.js";
|
|
@@ -18,68 +18,68 @@ import {
|
|
|
18
18
|
tokenPocketWallet
|
|
19
19
|
} from "./chunk-2L43XSW3.js";
|
|
20
20
|
import {
|
|
21
|
-
|
|
22
|
-
} from "./chunk-
|
|
21
|
+
uniswapWallet
|
|
22
|
+
} from "./chunk-LH7BMNFZ.js";
|
|
23
23
|
import {
|
|
24
24
|
tokenaryWallet
|
|
25
25
|
} from "./chunk-D6AOOO5F.js";
|
|
26
|
+
import {
|
|
27
|
+
talismanWallet
|
|
28
|
+
} from "./chunk-DRO6WYMM.js";
|
|
26
29
|
import {
|
|
27
30
|
trustWallet
|
|
28
31
|
} from "./chunk-VYBAYMP3.js";
|
|
29
|
-
import {
|
|
30
|
-
uniswapWallet
|
|
31
|
-
} from "./chunk-LH7BMNFZ.js";
|
|
32
32
|
import {
|
|
33
33
|
xdefiWallet
|
|
34
34
|
} from "./chunk-BOU4WKRZ.js";
|
|
35
35
|
import {
|
|
36
|
-
|
|
37
|
-
} from "./chunk-
|
|
38
|
-
import {
|
|
39
|
-
rabbyWallet
|
|
40
|
-
} from "./chunk-BBOM42DL.js";
|
|
36
|
+
phantomWallet
|
|
37
|
+
} from "./chunk-362NXNTM.js";
|
|
41
38
|
import {
|
|
42
39
|
rainbowWallet
|
|
43
40
|
} from "./chunk-2KUBG3S6.js";
|
|
44
|
-
import {
|
|
45
|
-
ramperWallet
|
|
46
|
-
} from "./chunk-BYXPFMI7.js";
|
|
47
41
|
import {
|
|
48
42
|
roninWallet
|
|
49
43
|
} from "./chunk-NWIQNBJU.js";
|
|
50
44
|
import {
|
|
51
|
-
|
|
52
|
-
} from "./chunk-
|
|
45
|
+
rabbyWallet
|
|
46
|
+
} from "./chunk-BBOM42DL.js";
|
|
47
|
+
import {
|
|
48
|
+
ramperWallet
|
|
49
|
+
} from "./chunk-BYXPFMI7.js";
|
|
53
50
|
import {
|
|
54
51
|
safeheronWallet
|
|
55
52
|
} from "./chunk-RZIO5TFF.js";
|
|
56
53
|
import {
|
|
57
54
|
safepalWallet
|
|
58
55
|
} from "./chunk-NT2HYJKW.js";
|
|
56
|
+
import {
|
|
57
|
+
safeWallet
|
|
58
|
+
} from "./chunk-BQQQL6UD.js";
|
|
59
59
|
import {
|
|
60
60
|
ledgerWallet
|
|
61
61
|
} from "./chunk-BRBKM4PW.js";
|
|
62
|
-
import {
|
|
63
|
-
kresusWallet
|
|
64
|
-
} from "./chunk-MJXPRJZT.js";
|
|
65
|
-
import {
|
|
66
|
-
mewWallet
|
|
67
|
-
} from "./chunk-OL5ZO7E4.js";
|
|
68
62
|
import {
|
|
69
63
|
oktoWallet
|
|
70
64
|
} from "./chunk-ADIXAKUL.js";
|
|
65
|
+
import {
|
|
66
|
+
metaMaskWallet
|
|
67
|
+
} from "./chunk-2HYNUNAS.js";
|
|
71
68
|
import {
|
|
72
69
|
okxWallet
|
|
73
70
|
} from "./chunk-TDIEHTMB.js";
|
|
71
|
+
import {
|
|
72
|
+
mewWallet
|
|
73
|
+
} from "./chunk-OL5ZO7E4.js";
|
|
74
|
+
import {
|
|
75
|
+
oneKeyWallet
|
|
76
|
+
} from "./chunk-SHBUZ7U7.js";
|
|
74
77
|
import {
|
|
75
78
|
omniWallet
|
|
76
79
|
} from "./chunk-7CUY5G6R.js";
|
|
77
80
|
import {
|
|
78
81
|
oneInchWallet
|
|
79
82
|
} from "./chunk-OESTDX6I.js";
|
|
80
|
-
import {
|
|
81
|
-
phantomWallet
|
|
82
|
-
} from "./chunk-362NXNTM.js";
|
|
83
83
|
import {
|
|
84
84
|
foxWallet
|
|
85
85
|
} from "./chunk-7QONTUXT.js";
|
|
@@ -99,20 +99,20 @@ import {
|
|
|
99
99
|
injectedWallet
|
|
100
100
|
} from "./chunk-XWUJE7MW.js";
|
|
101
101
|
import {
|
|
102
|
-
|
|
103
|
-
} from "./chunk-
|
|
102
|
+
kresusWallet
|
|
103
|
+
} from "./chunk-MJXPRJZT.js";
|
|
104
104
|
import {
|
|
105
105
|
bybitWallet
|
|
106
106
|
} from "./chunk-2STUC6QL.js";
|
|
107
107
|
import {
|
|
108
108
|
clvWallet
|
|
109
109
|
} from "./chunk-M3NZ6R2E.js";
|
|
110
|
-
import {
|
|
111
|
-
coinbaseWallet
|
|
112
|
-
} from "./chunk-H4IRCEZN.js";
|
|
113
110
|
import {
|
|
114
111
|
coin98Wallet
|
|
115
112
|
} from "./chunk-OBOVHCEI.js";
|
|
113
|
+
import {
|
|
114
|
+
coinbaseWallet
|
|
115
|
+
} from "./chunk-H4IRCEZN.js";
|
|
116
116
|
import {
|
|
117
117
|
coreWallet
|
|
118
118
|
} from "./chunk-VR4TBQ6S.js";
|
|
@@ -131,15 +131,15 @@ import {
|
|
|
131
131
|
import {
|
|
132
132
|
bifrostWallet
|
|
133
133
|
} from "./chunk-A5N6B5UW.js";
|
|
134
|
-
import {
|
|
135
|
-
bitgetWallet
|
|
136
|
-
} from "./chunk-TDAVGY5F.js";
|
|
137
134
|
import {
|
|
138
135
|
bitskiWallet
|
|
139
136
|
} from "./chunk-HS3C7OQV.js";
|
|
140
137
|
import {
|
|
141
138
|
bitverseWallet
|
|
142
139
|
} from "./chunk-3HZRRP4Y.js";
|
|
140
|
+
import {
|
|
141
|
+
bitgetWallet
|
|
142
|
+
} from "./chunk-TDAVGY5F.js";
|
|
143
143
|
import {
|
|
144
144
|
bloomWallet
|
|
145
145
|
} from "./chunk-S27IADFU.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "6.14.
|
|
3
|
+
"version": "6.14.1",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"ua-parser-js": "^1.0.37",
|
|
93
93
|
"use-debounce": "^10.0.5",
|
|
94
94
|
"uuid": "^9.0.1",
|
|
95
|
-
"@funkit/api-base": "1.12.3
|
|
96
|
-
"@funkit/
|
|
97
|
-
"@funkit/
|
|
98
|
-
"@funkit/
|
|
99
|
-
"@funkit/
|
|
100
|
-
"@funkit/
|
|
95
|
+
"@funkit/api-base": "1.12.3",
|
|
96
|
+
"@funkit/core": "2.3.48",
|
|
97
|
+
"@funkit/wagmi-tools": "3.0.71",
|
|
98
|
+
"@funkit/chains": "0.4.0",
|
|
99
|
+
"@funkit/fun-relay": "2.0.3",
|
|
100
|
+
"@funkit/utils": "1.1.11"
|
|
101
101
|
},
|
|
102
102
|
"repository": {
|
|
103
103
|
"type": "git",
|