@funkit/connect 8.0.0 → 8.2.0
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 +56 -0
- package/dist/__generated__/default_configs.d.ts +10 -6
- package/dist/{chunk-IVO7KGHT.js → chunk-JIC2XXGY.js} +7 -2
- package/dist/{chunk-5GV4UXWB.js → chunk-QHRAQNOB.js} +7 -2
- package/dist/{chunk-RJAD5CZH.js → chunk-WIDI2TYC.js} +28 -2
- package/dist/clients/fanatics.css +10067 -0
- package/dist/clients/fanatics.d.ts +31 -0
- package/dist/clients/fanatics.js +525 -0
- package/dist/components/Box/Box.d.ts +47 -46
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/FunBottomBar/FunBottomBar.d.ts +2 -1
- package/dist/components/FunButton/FunIconButton.d.ts +1 -1
- package/dist/components/FunInfoBanner/FunInfoBanner.d.ts +5 -1
- package/dist/components/FunInput/FunInput.d.ts +1 -0
- package/dist/components/FunOptionBox/FunOptionBox.css.d.ts +1 -1
- package/dist/components/FunOptionBox/FunOptionBox.d.ts +2 -1
- package/dist/components/Icons/BitcoinIcon.d.ts +4 -0
- package/dist/components/Icons/New/CashIcon.d.ts +4 -0
- package/dist/components/Tabs/Tabs.d.ts +10 -0
- package/dist/consts/customers.d.ts +1 -1
- package/dist/css/sprinkles.css.d.ts +136 -49
- package/dist/domains/relay.d.ts +0 -1
- package/dist/hooks/queries/useWithdrawalQuote.d.ts +2 -1
- package/dist/hooks/usePaymentSources.d.ts +4 -5
- package/dist/index.css +3710 -3090
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4274 -4117
- package/dist/modals/CheckoutModal/InputAmount/InputAmount.d.ts +1 -0
- package/dist/modals/CheckoutModal/InputAmount/InputAmountLoaded.d.ts +1 -1
- package/dist/modals/CheckoutModal/InputAmount/state.d.ts +3 -1
- package/dist/modals/CheckoutModal/InputAmount/useAmountInput.d.ts +1 -0
- package/dist/modals/CheckoutModal/SourceChange/CryptoCashToggle.d.ts +9 -0
- package/dist/modals/CheckoutModal/SourceChange/DefaultSourceList.d.ts +12 -0
- package/dist/modals/CheckoutModal/SourceChange/FanaticsSourceList.d.ts +15 -0
- package/dist/modals/CheckoutModal/SourceChange/PayPal.d.ts +2 -0
- package/dist/modals/CheckoutModal/SourceChange/SourceChange.d.ts +1 -1
- package/dist/modals/CheckoutModal/SourceChange/sourceChange.css.d.ts +1 -0
- package/dist/modals/CheckoutModal/stepTransition.d.ts +3 -1
- package/dist/providers/FunkitConfigContext.d.ts +43 -4
- package/dist/providers/FunkitThemeProvider.d.ts +132 -3
- package/dist/themes/baseTheme.d.ts +2 -1
- package/dist/themes/baseTheme.js +1 -1
- package/dist/themes/darkTheme.js +2 -2
- package/dist/themes/lightTheme.js +2 -2
- package/dist/utils/customer.d.ts +0 -6
- package/dist/utils/flags/config.d.ts +7 -28
- package/dist/utils/flags/resolver.d.ts +34 -0
- package/dist/utils/funLogger.d.ts +2 -1
- package/dist/wallets/walletConnectors/index.js +3 -3
- package/package.json +6 -5
- package/dist/modals/CheckoutModal/ConfirmationStep/KatanaBridgeAlert.d.ts +0 -2
- package/dist/utils/flags/patches/enable-bitcoin-patch.d.ts +0 -13
|
@@ -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", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG"];
|
|
11
11
|
}];
|
|
12
12
|
readonly value: "";
|
|
13
13
|
}];
|
|
@@ -23,7 +23,7 @@ export declare const flagConfig: {
|
|
|
23
23
|
readonly if_any: [{
|
|
24
24
|
readonly key: "apiKey";
|
|
25
25
|
readonly type: "isAnyOf";
|
|
26
|
-
readonly values: ["
|
|
26
|
+
readonly values: ["2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc"];
|
|
27
27
|
}];
|
|
28
28
|
readonly value: true;
|
|
29
29
|
}];
|
|
@@ -56,24 +56,17 @@ export declare const flagConfig: {
|
|
|
56
56
|
readonly type: "string";
|
|
57
57
|
readonly default_value: string;
|
|
58
58
|
readonly overrides: [{
|
|
59
|
-
readonly if_any: [{
|
|
60
|
-
readonly key: "userId";
|
|
61
|
-
readonly type: "isAnyOf";
|
|
62
|
-
readonly values: string[];
|
|
63
|
-
}];
|
|
64
|
-
readonly value: string;
|
|
65
|
-
}, {
|
|
66
59
|
readonly if_any: [{
|
|
67
60
|
readonly key: "apiKey";
|
|
68
61
|
readonly type: "isAnyOf";
|
|
69
|
-
readonly values: ["
|
|
62
|
+
readonly values: ["Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
|
|
70
63
|
}];
|
|
71
64
|
readonly value: string;
|
|
72
65
|
}, {
|
|
73
66
|
readonly if_any: [{
|
|
74
67
|
readonly key: "apiKey";
|
|
75
68
|
readonly type: "isAnyOf";
|
|
76
|
-
readonly values: ["
|
|
69
|
+
readonly values: ["M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
|
|
77
70
|
}];
|
|
78
71
|
readonly value: string;
|
|
79
72
|
}, {
|
|
@@ -94,7 +87,7 @@ export declare const flagConfig: {
|
|
|
94
87
|
readonly if_any: [{
|
|
95
88
|
readonly key: "apiKey";
|
|
96
89
|
readonly type: "isAnyOf";
|
|
97
|
-
readonly values: ["
|
|
90
|
+
readonly values: ["clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e"];
|
|
98
91
|
}];
|
|
99
92
|
readonly value: string;
|
|
100
93
|
}];
|
|
@@ -212,7 +205,7 @@ export declare const flagConfig: {
|
|
|
212
205
|
readonly if_any: [{
|
|
213
206
|
readonly key: "apiKey";
|
|
214
207
|
readonly type: "isAnyOf";
|
|
215
|
-
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "1QxzeJ4XKT78ba86whLct6sc7dW60Dl461UVWFdw", "ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT", "HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
|
|
208
|
+
readonly values: ["6TUi99Tq3O9MWj1IFX8Pv6spmPXzcvhy9NvBoeW2", "clDebbfo9edXq1GydZ0CahSAfSimPj616lFa9p8e", "57G91zNoew4nYxIoqSCpS1vWr8JT3gGVasNqMwgG", "M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um", "lI7amueGK94QtGa7sGGVf8n0XhIcn4sHFAZRu5Jj", "cGlmpTmNh657m8TiV5RFdwna6FG5pxM6ajiNHvw3", "1QxzeJ4XKT78ba86whLct6sc7dW60Dl461UVWFdw", "ODW4jUppoG3H87YcY9GZhoGj4hX5W0w9mr24LEU8", "pLQBJsA6zS9tg990rbdBD6UdABkWRv5O60vlrVcW", "lUzTaIRxs95iin3pCAafB1ChA5akBiuQ1tjhXnau", "di9ZSqn1Ya68Y2XpBPUV1rCtNGXh8Xe5MGWzb1Xe", "53OWivH0fK2VIAuMZTycr52EnSEnPWj97Jy3Dpiz", "AH7lRIhbsL167nptv6eub9xDJXVHnYUm2vL7FLjK", "1cRIX8XoWP801OILra02i13IJ08IARBP5B6ydcnp", "i6e1I8cfX625TTwRJlD2DshKyAoaUtO8aeoaR4i2", "2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "SMbBD7DS9b3EPcyBVg4a8az1rRWR9xB068chHoUN", "wQDLu86Qab61vbtru7thf8Yj0xaeqVUH4ohoXESu", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6", "iMTsSsgDdI2FC0FjeEejS9LMxuJgDhFO3OHlwVjT", "HKHvPSPDezaxsTohFgDuG4WpKW6hB4SFYyztm9vc", "5UzOrcAE2F3rcuMX2EeIlaYv5VUcDe6Lyh0PeZX2"];
|
|
216
209
|
}];
|
|
217
210
|
readonly value: true;
|
|
218
211
|
}];
|
|
@@ -274,21 +267,7 @@ export declare const flagConfig: {
|
|
|
274
267
|
readonly enable_bitcoin: {
|
|
275
268
|
readonly type: "boolean";
|
|
276
269
|
readonly default_value: false;
|
|
277
|
-
readonly overrides: [
|
|
278
|
-
readonly if_any: [{
|
|
279
|
-
readonly key: "apiKey";
|
|
280
|
-
readonly type: "isAnyOf";
|
|
281
|
-
readonly values: ["M3uox3cw0u8YCPV9cIREA6AugUMvPFTk6qOpm4um"];
|
|
282
|
-
}];
|
|
283
|
-
readonly value: false;
|
|
284
|
-
}, {
|
|
285
|
-
readonly if_any: [{
|
|
286
|
-
readonly key: "apiKey";
|
|
287
|
-
readonly type: "isAnyOf";
|
|
288
|
-
readonly values: ["2hicPxo2vy2NMHcg2cEU9crOeKtDpc14NEfMCthc", "Y53dikxXdT4E3afI1l8BMBSWgyhKvf65k6Dut1k6"];
|
|
289
|
-
}];
|
|
290
|
-
readonly value: false;
|
|
291
|
-
}];
|
|
270
|
+
readonly overrides: [];
|
|
292
271
|
};
|
|
293
272
|
readonly chain_info_banners: {
|
|
294
273
|
readonly type: "string";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
type BaseCondition = {
|
|
2
|
+
type: 'country';
|
|
3
|
+
countryCodes: string[];
|
|
4
|
+
};
|
|
5
|
+
type Condition = BaseCondition | {
|
|
6
|
+
type: 'all';
|
|
7
|
+
conditions: Condition[];
|
|
8
|
+
} | {
|
|
9
|
+
type: 'any';
|
|
10
|
+
conditions: Condition[];
|
|
11
|
+
};
|
|
12
|
+
interface Variant<T> {
|
|
13
|
+
condition?: Condition;
|
|
14
|
+
value: T;
|
|
15
|
+
}
|
|
16
|
+
interface VariantConfig<T> {
|
|
17
|
+
variants: Variant<T>[];
|
|
18
|
+
value: T;
|
|
19
|
+
}
|
|
20
|
+
interface EvaluationContext {
|
|
21
|
+
countryCode?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Type guard to check if a value is a VariantConfig
|
|
25
|
+
* (used to distinguish from simple static configs)
|
|
26
|
+
*/
|
|
27
|
+
export declare function isVariantConfig<T>(value: unknown): value is VariantConfig<T>;
|
|
28
|
+
/**
|
|
29
|
+
* Resolves the appropriate value from a VariantConfig based on runtime context.
|
|
30
|
+
* Evaluates variants in order and returns the first matching variant's value.
|
|
31
|
+
* Falls back to default value if no variants match.
|
|
32
|
+
*/
|
|
33
|
+
export declare function resolveValue<T>(config: VariantConfig<T>, ctx: EvaluationContext): T;
|
|
34
|
+
export {};
|
|
@@ -9,6 +9,7 @@ declare class FunLogger {
|
|
|
9
9
|
protected l2Address: string | null;
|
|
10
10
|
private isConfigured;
|
|
11
11
|
private logQueue;
|
|
12
|
+
private disableLogging;
|
|
12
13
|
constructor();
|
|
13
14
|
private getFunLogEnv;
|
|
14
15
|
private logDataDog;
|
|
@@ -32,7 +33,7 @@ declare class FunLogger {
|
|
|
32
33
|
*/
|
|
33
34
|
error(title: string, errorOrData: unknown, _data?: object): void;
|
|
34
35
|
private flushLogQueue;
|
|
35
|
-
configure(apiKey: string | null, isDebug: boolean, sdkVersion: string): void;
|
|
36
|
+
configure(apiKey: string | null, isDebug: boolean, sdkVersion: string, disableLogging?: boolean): void;
|
|
36
37
|
getUserId(): string | null;
|
|
37
38
|
getUserAddress(): string | null;
|
|
38
39
|
getUserName(): string | null;
|
|
@@ -92,12 +92,12 @@ import {
|
|
|
92
92
|
import {
|
|
93
93
|
imTokenWallet
|
|
94
94
|
} from "./chunk-COZ7MIQS.js";
|
|
95
|
-
import {
|
|
96
|
-
kresusWallet
|
|
97
|
-
} from "./chunk-MJXPRJZT.js";
|
|
98
95
|
import {
|
|
99
96
|
injectedWallet
|
|
100
97
|
} from "./chunk-MQSCN4BO.js";
|
|
98
|
+
import {
|
|
99
|
+
kresusWallet
|
|
100
|
+
} from "./chunk-MJXPRJZT.js";
|
|
101
101
|
import {
|
|
102
102
|
ledgerWallet
|
|
103
103
|
} from "./chunk-BRBKM4PW.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@funkit/connect",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": "./dist/index.js",
|
|
14
14
|
"./styles.css": "./dist/index.css",
|
|
15
|
-
"./wallets": "./dist/wallets/walletConnectors/index.js"
|
|
15
|
+
"./wallets": "./dist/wallets/walletConnectors/index.js",
|
|
16
|
+
"./clients/*": "./dist/clients/*.js"
|
|
16
17
|
},
|
|
17
18
|
"main": "./dist/index.js",
|
|
18
19
|
"types": "./dist/index.d.ts",
|
|
@@ -102,10 +103,10 @@
|
|
|
102
103
|
"ua-parser-js": "^1.0.37",
|
|
103
104
|
"use-debounce": "^10.0.5",
|
|
104
105
|
"uuid": "^9.0.1",
|
|
105
|
-
"@funkit/api-base": "2.
|
|
106
|
-
"@funkit/chains": "1.
|
|
106
|
+
"@funkit/api-base": "2.1.1",
|
|
107
|
+
"@funkit/chains": "1.1.0",
|
|
107
108
|
"@funkit/fun-relay": "2.2.2",
|
|
108
|
-
"@funkit/utils": "1.1.
|
|
109
|
+
"@funkit/utils": "1.1.24"
|
|
109
110
|
},
|
|
110
111
|
"repository": {
|
|
111
112
|
"type": "git",
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TODO: Delete once all customers are using @funkit/connect supporting bitcoin
|
|
3
|
-
*/
|
|
4
|
-
import { type FlagKey } from '@funkit/utils';
|
|
5
|
-
import type { FlagMiddleware } from '../../../providers/FunkitFlagsProvider';
|
|
6
|
-
/**
|
|
7
|
-
* Adds {8253038: ["BTC"]} to the newTokens if not already present
|
|
8
|
-
*/
|
|
9
|
-
export declare const addBitcoinToNewTokens: FlagMiddleware<FlagKey.TokenTransferNewTokens>;
|
|
10
|
-
/**
|
|
11
|
-
* Adds {8253038: ["BTC"]} to the sourceChainsAndAssets if not already present
|
|
12
|
-
*/
|
|
13
|
-
export declare const addBitcoinToSourceChainsAndAssets: FlagMiddleware<FlagKey.TokenTransferSourceChainsAndAssets>;
|