@dynamic-labs/wallet-book 1.2.0-alpha.1 → 2.0.0-alpha.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 +7 -0
- package/package.json +4 -4
- package/src/build/index.d.ts +0 -1
- package/src/build/sources/walletConnect/index.d.ts +10 -11
- package/src/build/sources/walletConnectOverrides/index.d.ts +0 -72
- package/src/helpers/getBrandIconUrl.cjs +0 -3
- package/src/helpers/getBrandIconUrl.js +0 -3
- package/src/schemas/walletGroup.cjs +1 -13
- package/src/schemas/walletGroup.d.ts +4 -51
- package/src/schemas/walletGroup.js +1 -13
- package/src/schemas/walletSchema.cjs +1 -14
- package/src/schemas/walletSchema.d.ts +2 -32
- package/src/schemas/walletSchema.js +1 -14
- package/wallet-book-fallbacks.cjs +5 -5
- package/wallet-book-fallbacks.js +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
|
|
2
|
+
## [2.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v1.2.0-alpha.1...v2.0.0-alpha.0) (2024-02-12)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* use recommended wallets when using wallet list tabs ([#4662](https://github.com/dynamic-labs/DynamicAuth/issues/4662)) ([eae0318](https://github.com/dynamic-labs/DynamicAuth/commit/eae0318b30fa61d0b30f733ff0d632dfde132181))
|
|
8
|
+
|
|
2
9
|
## [1.2.0-alpha.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.2.0-alpha.0...v1.2.0-alpha.1) (2024-02-09)
|
|
3
10
|
|
|
4
11
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dynamic-labs/wallet-book",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/dynamic-labs/DynamicAuth.git",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"zod": "3.22.4",
|
|
29
|
-
"@dynamic-labs/iconic": "
|
|
30
|
-
"@dynamic-labs/logger": "
|
|
31
|
-
"@dynamic-labs/utils": "
|
|
29
|
+
"@dynamic-labs/iconic": "2.0.0-alpha.0",
|
|
30
|
+
"@dynamic-labs/logger": "2.0.0-alpha.0",
|
|
31
|
+
"@dynamic-labs/utils": "2.0.0-alpha.0",
|
|
32
32
|
"util": "0.12.5"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
package/src/build/index.d.ts
CHANGED
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
export declare const walletConnectSourceData: Record<string, {
|
|
2
|
-
id: string;
|
|
3
|
-
metadata: {
|
|
4
|
-
shortName: string | null;
|
|
5
|
-
colors: {
|
|
6
|
-
primary: string | null;
|
|
7
|
-
secondary: string | null;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
2
|
name: string;
|
|
11
3
|
chains: string[];
|
|
12
4
|
desktop: {
|
|
@@ -36,6 +28,7 @@ export declare const walletConnectSourceData: Record<string, {
|
|
|
36
28
|
category: string | null;
|
|
37
29
|
description: string | null;
|
|
38
30
|
homepage: string;
|
|
31
|
+
id: string;
|
|
39
32
|
image_id: string;
|
|
40
33
|
image_url: {
|
|
41
34
|
lg: string;
|
|
@@ -46,22 +39,28 @@ export declare const walletConnectSourceData: Record<string, {
|
|
|
46
39
|
injected_id: string;
|
|
47
40
|
namespace: string;
|
|
48
41
|
}[] | null;
|
|
42
|
+
metadata: {
|
|
43
|
+
shortName: string | null;
|
|
44
|
+
colors: {
|
|
45
|
+
primary: string | null;
|
|
46
|
+
secondary: string | null;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
49
|
slug: string;
|
|
50
50
|
updatedAt: string;
|
|
51
51
|
versions: string[];
|
|
52
52
|
supported_standards?: {
|
|
53
53
|
id: string;
|
|
54
|
-
title: string;
|
|
55
|
-
url: string;
|
|
56
54
|
standard_id: number;
|
|
57
55
|
standard_prefix: string;
|
|
56
|
+
title: string;
|
|
57
|
+
url: string;
|
|
58
58
|
}[] | undefined;
|
|
59
59
|
}>;
|
|
60
60
|
export declare const walletConnectTransformedData: Promise<Record<string, {
|
|
61
61
|
name: string;
|
|
62
62
|
brand?: {
|
|
63
63
|
alt?: string | undefined;
|
|
64
|
-
imageId?: string | undefined;
|
|
65
64
|
primaryColor?: string | undefined;
|
|
66
65
|
spriteId?: string | undefined;
|
|
67
66
|
} | undefined;
|
|
@@ -12,14 +12,6 @@ export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
|
12
12
|
value: null;
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
|
-
dawn: {
|
|
16
|
-
brand: {
|
|
17
|
-
imageId: {
|
|
18
|
-
action: string;
|
|
19
|
-
value: null;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
15
|
exodus: {
|
|
24
16
|
group: {
|
|
25
17
|
action: string;
|
|
@@ -52,21 +44,7 @@ export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
|
52
44
|
value: boolean;
|
|
53
45
|
};
|
|
54
46
|
};
|
|
55
|
-
lilico: {
|
|
56
|
-
brand: {
|
|
57
|
-
imageId: {
|
|
58
|
-
action: string;
|
|
59
|
-
value: null;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
47
|
metamask: {
|
|
64
|
-
brand: {
|
|
65
|
-
imageId: {
|
|
66
|
-
action: string;
|
|
67
|
-
value: null;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
48
|
walletConnect: {
|
|
71
49
|
sdks: {
|
|
72
50
|
action: string;
|
|
@@ -75,12 +53,6 @@ export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
|
75
53
|
};
|
|
76
54
|
};
|
|
77
55
|
okxwallet: {
|
|
78
|
-
brand: {
|
|
79
|
-
imageId: {
|
|
80
|
-
action: string;
|
|
81
|
-
value: null;
|
|
82
|
-
};
|
|
83
|
-
};
|
|
84
56
|
desktop: {
|
|
85
57
|
action: string;
|
|
86
58
|
value: {
|
|
@@ -96,10 +68,6 @@ export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
|
96
68
|
};
|
|
97
69
|
rainbow: {
|
|
98
70
|
brand: {
|
|
99
|
-
imageId: {
|
|
100
|
-
action: string;
|
|
101
|
-
value: null;
|
|
102
|
-
};
|
|
103
71
|
spriteId: {
|
|
104
72
|
action: string;
|
|
105
73
|
value: string;
|
|
@@ -146,10 +114,6 @@ export declare const applyOverrides: (sourceData: any, overrides?: {
|
|
|
146
114
|
};
|
|
147
115
|
zengo: {
|
|
148
116
|
brand: {
|
|
149
|
-
imageId: {
|
|
150
|
-
action: string;
|
|
151
|
-
value: null;
|
|
152
|
-
};
|
|
153
117
|
primaryColor: {
|
|
154
118
|
action: string;
|
|
155
119
|
value: string;
|
|
@@ -182,14 +146,6 @@ export declare const walletConnectOverrides: {
|
|
|
182
146
|
value: null;
|
|
183
147
|
};
|
|
184
148
|
};
|
|
185
|
-
dawn: {
|
|
186
|
-
brand: {
|
|
187
|
-
imageId: {
|
|
188
|
-
action: string;
|
|
189
|
-
value: null;
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
};
|
|
193
149
|
exodus: {
|
|
194
150
|
group: {
|
|
195
151
|
action: string;
|
|
@@ -222,21 +178,7 @@ export declare const walletConnectOverrides: {
|
|
|
222
178
|
value: boolean;
|
|
223
179
|
};
|
|
224
180
|
};
|
|
225
|
-
lilico: {
|
|
226
|
-
brand: {
|
|
227
|
-
imageId: {
|
|
228
|
-
action: string;
|
|
229
|
-
value: null;
|
|
230
|
-
};
|
|
231
|
-
};
|
|
232
|
-
};
|
|
233
181
|
metamask: {
|
|
234
|
-
brand: {
|
|
235
|
-
imageId: {
|
|
236
|
-
action: string;
|
|
237
|
-
value: null;
|
|
238
|
-
};
|
|
239
|
-
};
|
|
240
182
|
walletConnect: {
|
|
241
183
|
sdks: {
|
|
242
184
|
action: string;
|
|
@@ -245,12 +187,6 @@ export declare const walletConnectOverrides: {
|
|
|
245
187
|
};
|
|
246
188
|
};
|
|
247
189
|
okxwallet: {
|
|
248
|
-
brand: {
|
|
249
|
-
imageId: {
|
|
250
|
-
action: string;
|
|
251
|
-
value: null;
|
|
252
|
-
};
|
|
253
|
-
};
|
|
254
190
|
desktop: {
|
|
255
191
|
action: string;
|
|
256
192
|
value: {
|
|
@@ -266,10 +202,6 @@ export declare const walletConnectOverrides: {
|
|
|
266
202
|
};
|
|
267
203
|
rainbow: {
|
|
268
204
|
brand: {
|
|
269
|
-
imageId: {
|
|
270
|
-
action: string;
|
|
271
|
-
value: null;
|
|
272
|
-
};
|
|
273
205
|
spriteId: {
|
|
274
206
|
action: string;
|
|
275
207
|
value: string;
|
|
@@ -316,10 +248,6 @@ export declare const walletConnectOverrides: {
|
|
|
316
248
|
};
|
|
317
249
|
zengo: {
|
|
318
250
|
brand: {
|
|
319
|
-
imageId: {
|
|
320
|
-
action: string;
|
|
321
|
-
value: null;
|
|
322
|
-
};
|
|
323
251
|
primaryColor: {
|
|
324
252
|
action: string;
|
|
325
253
|
value: string;
|
|
@@ -8,9 +8,6 @@ const getBrandIconUrl = (brand) => {
|
|
|
8
8
|
if (brand.spriteId) {
|
|
9
9
|
return renderTemplate.renderTemplate('iconicUrl', brand.spriteId);
|
|
10
10
|
}
|
|
11
|
-
if (brand.imageId) {
|
|
12
|
-
return renderTemplate.renderTemplate('walletConnectUrl', brand.imageId);
|
|
13
|
-
}
|
|
14
11
|
return '';
|
|
15
12
|
};
|
|
16
13
|
|
|
@@ -14,22 +14,10 @@ const walletGroupSchema = zod.z.object({
|
|
|
14
14
|
brand: zod.z
|
|
15
15
|
.object({
|
|
16
16
|
alt: nonEmptyString.nonEmptyString,
|
|
17
|
-
imageId: nonEmptyString.nonEmptyString,
|
|
18
17
|
primaryColor: nonEmptyString.nonEmptyString,
|
|
19
18
|
spriteId: nonEmptyString.nonEmptyString,
|
|
20
19
|
})
|
|
21
|
-
.optional()
|
|
22
|
-
.refine((val) => {
|
|
23
|
-
if (!val)
|
|
24
|
-
return true;
|
|
25
|
-
if (!(val.spriteId && val.imageId) && (val.spriteId || val.imageId)) {
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
return false;
|
|
29
|
-
}, {
|
|
30
|
-
message: 'Only one of spriteId or imageId can be defined',
|
|
31
|
-
path: ['brand'],
|
|
32
|
-
}),
|
|
20
|
+
.optional(),
|
|
33
21
|
key: zod.z.string(),
|
|
34
22
|
name: zod.z.string(),
|
|
35
23
|
walletOverrides: zod.z.record(WalletOverrideEntrySchema).optional(),
|
|
@@ -1,28 +1,15 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
declare const WalletOverrideEntrySchema: z.ZodObject<{
|
|
3
|
-
brand: z.ZodOptional<z.
|
|
3
|
+
brand: z.ZodOptional<z.ZodObject<{
|
|
4
4
|
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
5
|
-
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
6
5
|
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
7
6
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
8
7
|
}, "strip", z.ZodTypeAny, {
|
|
9
8
|
alt?: string | undefined;
|
|
10
|
-
imageId?: string | undefined;
|
|
11
9
|
primaryColor?: string | undefined;
|
|
12
10
|
spriteId?: string | undefined;
|
|
13
11
|
}, {
|
|
14
12
|
alt?: unknown;
|
|
15
|
-
imageId?: unknown;
|
|
16
|
-
primaryColor?: unknown;
|
|
17
|
-
spriteId?: unknown;
|
|
18
|
-
}>, {
|
|
19
|
-
alt?: string | undefined;
|
|
20
|
-
imageId?: string | undefined;
|
|
21
|
-
primaryColor?: string | undefined;
|
|
22
|
-
spriteId?: string | undefined;
|
|
23
|
-
}, {
|
|
24
|
-
alt?: unknown;
|
|
25
|
-
imageId?: unknown;
|
|
26
13
|
primaryColor?: unknown;
|
|
27
14
|
spriteId?: unknown;
|
|
28
15
|
}>>;
|
|
@@ -30,7 +17,6 @@ declare const WalletOverrideEntrySchema: z.ZodObject<{
|
|
|
30
17
|
}, "strip", z.ZodTypeAny, {
|
|
31
18
|
brand?: {
|
|
32
19
|
alt?: string | undefined;
|
|
33
|
-
imageId?: string | undefined;
|
|
34
20
|
primaryColor?: string | undefined;
|
|
35
21
|
spriteId?: string | undefined;
|
|
36
22
|
} | undefined;
|
|
@@ -38,65 +24,38 @@ declare const WalletOverrideEntrySchema: z.ZodObject<{
|
|
|
38
24
|
}, {
|
|
39
25
|
brand?: {
|
|
40
26
|
alt?: unknown;
|
|
41
|
-
imageId?: unknown;
|
|
42
27
|
primaryColor?: unknown;
|
|
43
28
|
spriteId?: unknown;
|
|
44
29
|
} | undefined;
|
|
45
30
|
name?: unknown;
|
|
46
31
|
}>;
|
|
47
32
|
export declare const walletGroupSchema: z.ZodObject<{
|
|
48
|
-
brand: z.
|
|
33
|
+
brand: z.ZodOptional<z.ZodObject<{
|
|
49
34
|
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
50
|
-
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
51
35
|
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
52
36
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
53
37
|
}, "strip", z.ZodTypeAny, {
|
|
54
38
|
alt?: string | undefined;
|
|
55
|
-
imageId?: string | undefined;
|
|
56
39
|
primaryColor?: string | undefined;
|
|
57
40
|
spriteId?: string | undefined;
|
|
58
41
|
}, {
|
|
59
42
|
alt?: unknown;
|
|
60
|
-
imageId?: unknown;
|
|
61
43
|
primaryColor?: unknown;
|
|
62
44
|
spriteId?: unknown;
|
|
63
|
-
}
|
|
64
|
-
alt?: string | undefined;
|
|
65
|
-
imageId?: string | undefined;
|
|
66
|
-
primaryColor?: string | undefined;
|
|
67
|
-
spriteId?: string | undefined;
|
|
68
|
-
} | undefined, {
|
|
69
|
-
alt?: unknown;
|
|
70
|
-
imageId?: unknown;
|
|
71
|
-
primaryColor?: unknown;
|
|
72
|
-
spriteId?: unknown;
|
|
73
|
-
} | undefined>;
|
|
45
|
+
}>>;
|
|
74
46
|
key: z.ZodString;
|
|
75
47
|
name: z.ZodString;
|
|
76
48
|
walletOverrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
77
|
-
brand: z.ZodOptional<z.
|
|
49
|
+
brand: z.ZodOptional<z.ZodObject<{
|
|
78
50
|
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
79
|
-
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
80
51
|
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
81
52
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
82
53
|
}, "strip", z.ZodTypeAny, {
|
|
83
54
|
alt?: string | undefined;
|
|
84
|
-
imageId?: string | undefined;
|
|
85
|
-
primaryColor?: string | undefined;
|
|
86
|
-
spriteId?: string | undefined;
|
|
87
|
-
}, {
|
|
88
|
-
alt?: unknown;
|
|
89
|
-
imageId?: unknown;
|
|
90
|
-
primaryColor?: unknown;
|
|
91
|
-
spriteId?: unknown;
|
|
92
|
-
}>, {
|
|
93
|
-
alt?: string | undefined;
|
|
94
|
-
imageId?: string | undefined;
|
|
95
55
|
primaryColor?: string | undefined;
|
|
96
56
|
spriteId?: string | undefined;
|
|
97
57
|
}, {
|
|
98
58
|
alt?: unknown;
|
|
99
|
-
imageId?: unknown;
|
|
100
59
|
primaryColor?: unknown;
|
|
101
60
|
spriteId?: unknown;
|
|
102
61
|
}>>;
|
|
@@ -104,7 +63,6 @@ export declare const walletGroupSchema: z.ZodObject<{
|
|
|
104
63
|
}, "strip", z.ZodTypeAny, {
|
|
105
64
|
brand?: {
|
|
106
65
|
alt?: string | undefined;
|
|
107
|
-
imageId?: string | undefined;
|
|
108
66
|
primaryColor?: string | undefined;
|
|
109
67
|
spriteId?: string | undefined;
|
|
110
68
|
} | undefined;
|
|
@@ -112,7 +70,6 @@ export declare const walletGroupSchema: z.ZodObject<{
|
|
|
112
70
|
}, {
|
|
113
71
|
brand?: {
|
|
114
72
|
alt?: unknown;
|
|
115
|
-
imageId?: unknown;
|
|
116
73
|
primaryColor?: unknown;
|
|
117
74
|
spriteId?: unknown;
|
|
118
75
|
} | undefined;
|
|
@@ -123,14 +80,12 @@ export declare const walletGroupSchema: z.ZodObject<{
|
|
|
123
80
|
key: string;
|
|
124
81
|
brand?: {
|
|
125
82
|
alt?: string | undefined;
|
|
126
|
-
imageId?: string | undefined;
|
|
127
83
|
primaryColor?: string | undefined;
|
|
128
84
|
spriteId?: string | undefined;
|
|
129
85
|
} | undefined;
|
|
130
86
|
walletOverrides?: Record<string, {
|
|
131
87
|
brand?: {
|
|
132
88
|
alt?: string | undefined;
|
|
133
|
-
imageId?: string | undefined;
|
|
134
89
|
primaryColor?: string | undefined;
|
|
135
90
|
spriteId?: string | undefined;
|
|
136
91
|
} | undefined;
|
|
@@ -141,14 +96,12 @@ export declare const walletGroupSchema: z.ZodObject<{
|
|
|
141
96
|
key: string;
|
|
142
97
|
brand?: {
|
|
143
98
|
alt?: unknown;
|
|
144
|
-
imageId?: unknown;
|
|
145
99
|
primaryColor?: unknown;
|
|
146
100
|
spriteId?: unknown;
|
|
147
101
|
} | undefined;
|
|
148
102
|
walletOverrides?: Record<string, {
|
|
149
103
|
brand?: {
|
|
150
104
|
alt?: unknown;
|
|
151
|
-
imageId?: unknown;
|
|
152
105
|
primaryColor?: unknown;
|
|
153
106
|
spriteId?: unknown;
|
|
154
107
|
} | undefined;
|
|
@@ -10,22 +10,10 @@ const walletGroupSchema = z.object({
|
|
|
10
10
|
brand: z
|
|
11
11
|
.object({
|
|
12
12
|
alt: nonEmptyString,
|
|
13
|
-
imageId: nonEmptyString,
|
|
14
13
|
primaryColor: nonEmptyString,
|
|
15
14
|
spriteId: nonEmptyString,
|
|
16
15
|
})
|
|
17
|
-
.optional()
|
|
18
|
-
.refine((val) => {
|
|
19
|
-
if (!val)
|
|
20
|
-
return true;
|
|
21
|
-
if (!(val.spriteId && val.imageId) && (val.spriteId || val.imageId)) {
|
|
22
|
-
return true;
|
|
23
|
-
}
|
|
24
|
-
return false;
|
|
25
|
-
}, {
|
|
26
|
-
message: 'Only one of spriteId or imageId can be defined',
|
|
27
|
-
path: ['brand'],
|
|
28
|
-
}),
|
|
16
|
+
.optional(),
|
|
29
17
|
key: z.string(),
|
|
30
18
|
name: z.string(),
|
|
31
19
|
walletOverrides: z.record(WalletOverrideEntrySchema).optional(),
|
|
@@ -45,23 +45,10 @@ const injectedConfigSchema = zod.z.object({
|
|
|
45
45
|
path: ['config'],
|
|
46
46
|
}),
|
|
47
47
|
});
|
|
48
|
-
const brandSchema = zod.z
|
|
49
|
-
.object({
|
|
48
|
+
const brandSchema = zod.z.object({
|
|
50
49
|
alt: nonEmptyString.nonEmptyString,
|
|
51
|
-
imageId: nonEmptyString.nonEmptyString,
|
|
52
50
|
primaryColor: nonEmptyString.nonEmptyString,
|
|
53
51
|
spriteId: nonEmptyString.nonEmptyString,
|
|
54
|
-
})
|
|
55
|
-
.refine((val) => {
|
|
56
|
-
if (!val)
|
|
57
|
-
return true;
|
|
58
|
-
if (!(val.spriteId && val.imageId) && (val.spriteId || val.imageId)) {
|
|
59
|
-
return true;
|
|
60
|
-
}
|
|
61
|
-
return false;
|
|
62
|
-
}, {
|
|
63
|
-
message: 'Only one of spriteId or imageId can be defined',
|
|
64
|
-
path: ['brand'],
|
|
65
52
|
});
|
|
66
53
|
const walletSchema = zod.z
|
|
67
54
|
.preprocess((val) => val, zod.z.object({
|
|
@@ -57,56 +57,30 @@ declare const injectedConfigSchema: z.ZodObject<{
|
|
|
57
57
|
} | undefined;
|
|
58
58
|
windowLocations?: string[] | undefined;
|
|
59
59
|
}>;
|
|
60
|
-
export declare const brandSchema: z.
|
|
60
|
+
export declare const brandSchema: z.ZodObject<{
|
|
61
61
|
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
62
|
-
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
63
62
|
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
64
63
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
65
64
|
}, "strip", z.ZodTypeAny, {
|
|
66
65
|
alt?: string | undefined;
|
|
67
|
-
imageId?: string | undefined;
|
|
68
66
|
primaryColor?: string | undefined;
|
|
69
67
|
spriteId?: string | undefined;
|
|
70
68
|
}, {
|
|
71
69
|
alt?: unknown;
|
|
72
|
-
imageId?: unknown;
|
|
73
|
-
primaryColor?: unknown;
|
|
74
|
-
spriteId?: unknown;
|
|
75
|
-
}>, {
|
|
76
|
-
alt?: string | undefined;
|
|
77
|
-
imageId?: string | undefined;
|
|
78
|
-
primaryColor?: string | undefined;
|
|
79
|
-
spriteId?: string | undefined;
|
|
80
|
-
}, {
|
|
81
|
-
alt?: unknown;
|
|
82
|
-
imageId?: unknown;
|
|
83
70
|
primaryColor?: unknown;
|
|
84
71
|
spriteId?: unknown;
|
|
85
72
|
}>;
|
|
86
73
|
export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
87
|
-
brand: z.ZodOptional<z.
|
|
74
|
+
brand: z.ZodOptional<z.ZodObject<{
|
|
88
75
|
alt: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
89
|
-
imageId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
90
76
|
primaryColor: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
91
77
|
spriteId: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, unknown>;
|
|
92
78
|
}, "strip", z.ZodTypeAny, {
|
|
93
79
|
alt?: string | undefined;
|
|
94
|
-
imageId?: string | undefined;
|
|
95
|
-
primaryColor?: string | undefined;
|
|
96
|
-
spriteId?: string | undefined;
|
|
97
|
-
}, {
|
|
98
|
-
alt?: unknown;
|
|
99
|
-
imageId?: unknown;
|
|
100
|
-
primaryColor?: unknown;
|
|
101
|
-
spriteId?: unknown;
|
|
102
|
-
}>, {
|
|
103
|
-
alt?: string | undefined;
|
|
104
|
-
imageId?: string | undefined;
|
|
105
80
|
primaryColor?: string | undefined;
|
|
106
81
|
spriteId?: string | undefined;
|
|
107
82
|
}, {
|
|
108
83
|
alt?: unknown;
|
|
109
|
-
imageId?: unknown;
|
|
110
84
|
primaryColor?: unknown;
|
|
111
85
|
spriteId?: unknown;
|
|
112
86
|
}>>;
|
|
@@ -280,7 +254,6 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
280
254
|
name: string;
|
|
281
255
|
brand?: {
|
|
282
256
|
alt?: string | undefined;
|
|
283
|
-
imageId?: string | undefined;
|
|
284
257
|
primaryColor?: string | undefined;
|
|
285
258
|
spriteId?: string | undefined;
|
|
286
259
|
} | undefined;
|
|
@@ -333,7 +306,6 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
333
306
|
name: string;
|
|
334
307
|
brand?: {
|
|
335
308
|
alt?: unknown;
|
|
336
|
-
imageId?: unknown;
|
|
337
309
|
primaryColor?: unknown;
|
|
338
310
|
spriteId?: unknown;
|
|
339
311
|
} | undefined;
|
|
@@ -386,7 +358,6 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
386
358
|
name: string;
|
|
387
359
|
brand?: {
|
|
388
360
|
alt?: string | undefined;
|
|
389
|
-
imageId?: string | undefined;
|
|
390
361
|
primaryColor?: string | undefined;
|
|
391
362
|
spriteId?: string | undefined;
|
|
392
363
|
} | undefined;
|
|
@@ -439,7 +410,6 @@ export declare const walletSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
|
439
410
|
name: string;
|
|
440
411
|
brand?: {
|
|
441
412
|
alt?: string | undefined;
|
|
442
|
-
imageId?: string | undefined;
|
|
443
413
|
primaryColor?: string | undefined;
|
|
444
414
|
spriteId?: string | undefined;
|
|
445
415
|
} | undefined;
|
|
@@ -41,23 +41,10 @@ const injectedConfigSchema = z.object({
|
|
|
41
41
|
path: ['config'],
|
|
42
42
|
}),
|
|
43
43
|
});
|
|
44
|
-
const brandSchema = z
|
|
45
|
-
.object({
|
|
44
|
+
const brandSchema = z.object({
|
|
46
45
|
alt: nonEmptyString,
|
|
47
|
-
imageId: nonEmptyString,
|
|
48
46
|
primaryColor: nonEmptyString,
|
|
49
47
|
spriteId: nonEmptyString,
|
|
50
|
-
})
|
|
51
|
-
.refine((val) => {
|
|
52
|
-
if (!val)
|
|
53
|
-
return true;
|
|
54
|
-
if (!(val.spriteId && val.imageId) && (val.spriteId || val.imageId)) {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
return false;
|
|
58
|
-
}, {
|
|
59
|
-
message: 'Only one of spriteId or imageId can be defined',
|
|
60
|
-
path: ['brand'],
|
|
61
48
|
});
|
|
62
49
|
const walletSchema = z
|
|
63
50
|
.preprocess((val) => val, z.object({
|
|
@@ -6,8 +6,8 @@ var groups = {
|
|
|
6
6
|
argentx: {
|
|
7
7
|
brand: {
|
|
8
8
|
alt: "ArgentX",
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
primaryColor: "#FF875B",
|
|
10
|
+
spriteId: "argentx"
|
|
11
11
|
},
|
|
12
12
|
key: "argentx",
|
|
13
13
|
name: "ArgentX"
|
|
@@ -461,8 +461,8 @@ var wallets = {
|
|
|
461
461
|
trust: {
|
|
462
462
|
brand: {
|
|
463
463
|
alt: "Trust Wallet",
|
|
464
|
-
|
|
465
|
-
|
|
464
|
+
primaryColor: "#0500FF",
|
|
465
|
+
spriteId: "7677b54f-3486-46e2-4e37-bf8747814f00"
|
|
466
466
|
},
|
|
467
467
|
chains: [
|
|
468
468
|
"eip155:1"
|
|
@@ -700,7 +700,7 @@ var wallets = {
|
|
|
700
700
|
exodus: {
|
|
701
701
|
brand: {
|
|
702
702
|
alt: "Exodus Wallet",
|
|
703
|
-
|
|
703
|
+
spriteId: "4c16cad4-cac9-4643-6726-c696efaf5200"
|
|
704
704
|
},
|
|
705
705
|
chainGroup: "exodus",
|
|
706
706
|
chains: [
|
package/wallet-book-fallbacks.js
CHANGED
|
@@ -2,8 +2,8 @@ var groups = {
|
|
|
2
2
|
argentx: {
|
|
3
3
|
brand: {
|
|
4
4
|
alt: "ArgentX",
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
primaryColor: "#FF875B",
|
|
6
|
+
spriteId: "argentx"
|
|
7
7
|
},
|
|
8
8
|
key: "argentx",
|
|
9
9
|
name: "ArgentX"
|
|
@@ -457,8 +457,8 @@ var wallets = {
|
|
|
457
457
|
trust: {
|
|
458
458
|
brand: {
|
|
459
459
|
alt: "Trust Wallet",
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
primaryColor: "#0500FF",
|
|
461
|
+
spriteId: "7677b54f-3486-46e2-4e37-bf8747814f00"
|
|
462
462
|
},
|
|
463
463
|
chains: [
|
|
464
464
|
"eip155:1"
|
|
@@ -696,7 +696,7 @@ var wallets = {
|
|
|
696
696
|
exodus: {
|
|
697
697
|
brand: {
|
|
698
698
|
alt: "Exodus Wallet",
|
|
699
|
-
|
|
699
|
+
spriteId: "4c16cad4-cac9-4643-6726-c696efaf5200"
|
|
700
700
|
},
|
|
701
701
|
chainGroup: "exodus",
|
|
702
702
|
chains: [
|