@reown/appkit-controllers 1.8.14 → 1.8.15-23bb47b934ad6e2db0777e70bb49289c5630f47f.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.
Files changed (62) hide show
  1. package/dist/esm/exports/index.js +2 -0
  2. package/dist/esm/exports/index.js.map +1 -1
  3. package/dist/esm/exports/react.js +121 -2
  4. package/dist/esm/exports/react.js.map +1 -1
  5. package/dist/esm/src/controllers/AlertController.js +18 -2
  6. package/dist/esm/src/controllers/AlertController.js.map +1 -1
  7. package/dist/esm/src/controllers/ConnectionController.js +9 -0
  8. package/dist/esm/src/controllers/ConnectionController.js.map +1 -1
  9. package/dist/esm/src/controllers/ConnectorController.js +11 -7
  10. package/dist/esm/src/controllers/ConnectorController.js.map +1 -1
  11. package/dist/esm/src/controllers/PublicStateController.js +2 -1
  12. package/dist/esm/src/controllers/PublicStateController.js.map +1 -1
  13. package/dist/esm/src/controllers/TransactionsController.js +1 -1
  14. package/dist/esm/src/controllers/TransactionsController.js.map +1 -1
  15. package/dist/esm/src/utils/ApiControllerUtil.js +34 -0
  16. package/dist/esm/src/utils/ApiControllerUtil.js.map +1 -0
  17. package/dist/esm/src/utils/AssetUtil.js +42 -0
  18. package/dist/esm/src/utils/AssetUtil.js.map +1 -1
  19. package/dist/esm/src/utils/ConnectUtil.js +92 -0
  20. package/dist/esm/src/utils/ConnectUtil.js.map +1 -0
  21. package/dist/esm/src/utils/ConnectionControllerUtil.js +36 -0
  22. package/dist/esm/src/utils/ConnectionControllerUtil.js.map +1 -1
  23. package/dist/esm/src/utils/ConnectorUtil.js +314 -0
  24. package/dist/esm/src/utils/ConnectorUtil.js.map +1 -0
  25. package/dist/esm/src/utils/ConstantsUtil.js +21 -6
  26. package/dist/esm/src/utils/ConstantsUtil.js.map +1 -1
  27. package/dist/esm/src/utils/WalletUtil.js +161 -0
  28. package/dist/esm/src/utils/WalletUtil.js.map +1 -0
  29. package/dist/esm/tests/controllers/AlertController.test.js +62 -9
  30. package/dist/esm/tests/controllers/AlertController.test.js.map +1 -1
  31. package/dist/esm/tests/controllers/ConnectionController.test.js +5 -2
  32. package/dist/esm/tests/controllers/ConnectionController.test.js.map +1 -1
  33. package/dist/esm/tests/controllers/ConnectorController.test.js +8 -8
  34. package/dist/esm/tests/controllers/ConnectorController.test.js.map +1 -1
  35. package/dist/esm/tests/hooks/react.test.js +505 -3
  36. package/dist/esm/tests/hooks/react.test.js.map +1 -1
  37. package/dist/esm/tests/hooks/vue.test.js +8 -0
  38. package/dist/esm/tests/hooks/vue.test.js.map +1 -1
  39. package/dist/esm/tests/utils/ConnectorUtil.test.js +83 -0
  40. package/dist/esm/tests/utils/ConnectorUtil.test.js.map +1 -0
  41. package/dist/esm/tests/utils/ControllerUtil.test.js +500 -0
  42. package/dist/esm/tests/utils/ControllerUtil.test.js.map +1 -0
  43. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  44. package/dist/types/exports/index.d.ts +4 -1
  45. package/dist/types/exports/react.d.ts +69 -0
  46. package/dist/types/src/controllers/ConnectionController.d.ts +1 -0
  47. package/dist/types/src/controllers/ConnectorController.d.ts +6 -10
  48. package/dist/types/src/controllers/OptionsController.d.ts +3 -1
  49. package/dist/types/src/controllers/PublicStateController.d.ts +6 -0
  50. package/dist/types/src/utils/ApiControllerUtil.d.ts +8 -0
  51. package/dist/types/src/utils/AssetUtil.d.ts +18 -0
  52. package/dist/types/src/utils/ChainControllerUtil.d.ts +1 -1
  53. package/dist/types/src/utils/ConnectUtil.d.ts +54 -0
  54. package/dist/types/src/utils/ConnectionControllerUtil.d.ts +2 -0
  55. package/dist/types/src/utils/ConnectorUtil.d.ts +74 -0
  56. package/dist/types/src/utils/ConstantsUtil.d.ts +7 -1
  57. package/dist/types/src/utils/TypeUtil.d.ts +30 -2
  58. package/dist/types/src/utils/ViemUtil.d.ts +13 -13
  59. package/dist/types/src/utils/WalletUtil.d.ts +81 -0
  60. package/dist/types/tests/utils/ConnectorUtil.test.d.ts +1 -0
  61. package/dist/types/tests/utils/ControllerUtil.test.d.ts +1 -0
  62. package/package.json +7 -7
@@ -0,0 +1,500 @@
1
+ import { beforeEach, describe, expect, it, vi } from 'vitest';
2
+ import { ConstantsUtil } from '@reown/appkit-common';
3
+ import {} from '@reown/appkit-controllers';
4
+ import { ApiController as ApiControllerRelative } from '../../src/controllers/ApiController.js';
5
+ import { ConnectionController as ConnectionControllerRelative } from '../../src/controllers/ConnectionController.js';
6
+ import { ConnectorController as ConnectorControllerRelative } from '../../src/controllers/ConnectorController.js';
7
+ import { OptionsController as OptionsControllerRelative } from '../../src/controllers/OptionsController.js';
8
+ import { ConnectorUtil } from '../../src/utils/ConnectorUtil';
9
+ import { CoreHelperUtil } from '../../src/utils/CoreHelperUtil.js';
10
+ import { OptionsUtil } from '../../src/utils/OptionsUtil.js';
11
+ import { WalletUtil } from '../../src/utils/WalletUtil';
12
+ const INJECTED = { id: 'injected' };
13
+ const RECENT = { id: 'recent' };
14
+ const FEATURED = { id: 'featured' };
15
+ const CUSTOM = { id: 'custom' };
16
+ const EXTERNAL = { id: 'external' };
17
+ const MULTI_CHAIN = { id: 'multiChain' };
18
+ const INJECTED_CONNECTOR = {
19
+ id: 'injected',
20
+ type: 'INJECTED',
21
+ info: { rdns: 'browser.wallet' },
22
+ name: 'Browser Wallet',
23
+ chain: { id: 'eip155:1' }
24
+ };
25
+ const ANNOUNCED_CONNECTOR = {
26
+ id: 'announced',
27
+ type: 'ANNOUNCED',
28
+ info: { rdns: 'announced.wallet' },
29
+ name: 'Announced Wallet',
30
+ chain: { id: 'eip155:1' }
31
+ };
32
+ describe('ConnectorUtil', () => {
33
+ beforeEach(() => {
34
+ vi.clearAllMocks();
35
+ });
36
+ describe('getConnectorTypeOrder', () => {
37
+ it('should return connector positions in order of overriddenConnectors first then enabled connectors', () => {
38
+ vi.spyOn(ConnectorUtil, 'getIsConnectedWithWC').mockReturnValue(false);
39
+ const result = ConnectorUtil.getConnectorTypeOrder({
40
+ recommended: [],
41
+ featured: [FEATURED],
42
+ custom: [CUSTOM],
43
+ recent: [RECENT],
44
+ announced: [INJECTED],
45
+ injected: [INJECTED],
46
+ multiChain: [MULTI_CHAIN],
47
+ external: [EXTERNAL],
48
+ overriddenConnectors: ['featured', 'walletConnect', 'injected']
49
+ });
50
+ expect(result).toEqual([
51
+ 'featured',
52
+ 'walletConnect',
53
+ 'injected',
54
+ 'recent',
55
+ 'custom',
56
+ 'external'
57
+ ]);
58
+ });
59
+ it('should use default connectorPosition from OptionsController when overriddenConnectors not provided', () => {
60
+ vi.spyOn(ConnectorUtil, 'getIsConnectedWithWC').mockReturnValue(false);
61
+ const originalFeatures = OptionsControllerRelative.state.features;
62
+ OptionsControllerRelative.state.features = {
63
+ ...originalFeatures,
64
+ connectorTypeOrder: ['injected', 'walletConnect']
65
+ };
66
+ const result = ConnectorUtil.getConnectorTypeOrder({
67
+ recommended: [],
68
+ featured: [FEATURED],
69
+ custom: [CUSTOM],
70
+ recent: [RECENT],
71
+ announced: [INJECTED],
72
+ injected: [INJECTED],
73
+ multiChain: [MULTI_CHAIN],
74
+ external: [EXTERNAL]
75
+ });
76
+ OptionsControllerRelative.state.features = originalFeatures;
77
+ expect(result).toEqual([
78
+ 'injected',
79
+ 'walletConnect',
80
+ 'recent',
81
+ 'featured',
82
+ 'custom',
83
+ 'external'
84
+ ]);
85
+ });
86
+ it('should only include enabled connectors', () => {
87
+ vi.spyOn(ConnectorUtil, 'getIsConnectedWithWC').mockReturnValue(false);
88
+ const originalFeatures = OptionsControllerRelative.state.features;
89
+ OptionsControllerRelative.state.features = {
90
+ ...originalFeatures,
91
+ connectorTypeOrder: ['injected', 'recommended']
92
+ };
93
+ const result = ConnectorUtil.getConnectorTypeOrder({
94
+ recommended: [],
95
+ featured: [FEATURED],
96
+ custom: [CUSTOM],
97
+ recent: [RECENT],
98
+ announced: [],
99
+ injected: [],
100
+ multiChain: [],
101
+ external: [EXTERNAL]
102
+ });
103
+ OptionsControllerRelative.state.features = originalFeatures;
104
+ expect(result).toEqual(['walletConnect', 'recent', 'featured', 'custom', 'external']);
105
+ expect(result).not.toContain('injected');
106
+ });
107
+ });
108
+ describe('showConnector', () => {
109
+ beforeEach(() => {
110
+ vi.clearAllMocks();
111
+ });
112
+ it('should hide browser wallet on desktop', () => {
113
+ vi.spyOn(CoreHelperUtil, 'isMobile').mockReturnValue(false);
114
+ expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(false);
115
+ });
116
+ it('should show browser wallet on mobile', () => {
117
+ vi.spyOn(CoreHelperUtil, 'isMobile').mockReturnValue(true);
118
+ vi.spyOn(ConnectionControllerRelative, 'checkInstalled').mockReturnValue(true);
119
+ ApiControllerRelative.state.excludedWallets = [];
120
+ expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(true);
121
+ });
122
+ it('should hide injected connector when not installed and no rdns', () => {
123
+ vi.spyOn(ConnectionControllerRelative, 'checkInstalled').mockReturnValue(false);
124
+ expect(ConnectorUtil.showConnector({ ...INJECTED_CONNECTOR, info: undefined })).toBe(false);
125
+ });
126
+ it('should hide connector when rdns is excluded', () => {
127
+ ApiControllerRelative.state.excludedWallets = [
128
+ { rdns: 'browser.wallet', name: 'Test Wallet' }
129
+ ];
130
+ expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(false);
131
+ });
132
+ it('should hide connector when name is excluded', () => {
133
+ ApiControllerRelative.state.excludedWallets = [
134
+ { name: 'Browser Wallet', rdns: 'test.wallet' }
135
+ ];
136
+ expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(false);
137
+ });
138
+ it('should hide announced connector when excluded with rdns', () => {
139
+ ApiControllerRelative.state.excludedWallets = [
140
+ { rdns: 'announced.wallet', name: 'Announced Wallet' }
141
+ ];
142
+ expect(ConnectorUtil.showConnector(ANNOUNCED_CONNECTOR)).toBe(false);
143
+ });
144
+ it('should hide announced connector when excluded with name', () => {
145
+ ApiControllerRelative.state.excludedWallets = [
146
+ { name: 'Announced Wallet', rdns: 'announced' }
147
+ ];
148
+ expect(ConnectorUtil.showConnector(ANNOUNCED_CONNECTOR)).toBe(false);
149
+ });
150
+ it('should show injected connector when not excluded', () => {
151
+ ApiControllerRelative.state.excludedWallets = [];
152
+ vi.spyOn(CoreHelperUtil, 'isMobile').mockReturnValue(true);
153
+ vi.spyOn(ConnectionControllerRelative, 'checkInstalled').mockReturnValue(true);
154
+ expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(true);
155
+ });
156
+ it('should show announced connector when not excluded', () => {
157
+ ApiControllerRelative.state.excludedWallets = [];
158
+ expect(ConnectorUtil.showConnector(ANNOUNCED_CONNECTOR)).toBe(true);
159
+ });
160
+ });
161
+ describe('getAuthName', () => {
162
+ it('should return socialUsername when provided and not discord ending with 0', () => {
163
+ const result = ConnectorUtil.getAuthName({
164
+ email: 'test@example.com',
165
+ socialUsername: 'john_doe',
166
+ socialProvider: 'github'
167
+ });
168
+ expect(result).toBe('john_doe');
169
+ });
170
+ it('should return socialUsername without last character when discord provider and ends with 0', () => {
171
+ const result = ConnectorUtil.getAuthName({
172
+ email: 'test@example.com',
173
+ socialUsername: 'john_doe0',
174
+ socialProvider: 'discord'
175
+ });
176
+ expect(result).toBe('john_doe');
177
+ });
178
+ it('should return socialUsername as-is when discord provider but does not end with 0', () => {
179
+ const result = ConnectorUtil.getAuthName({
180
+ email: 'test@example.com',
181
+ socialUsername: 'john_doe1',
182
+ socialProvider: 'discord'
183
+ });
184
+ expect(result).toBe('john_doe1');
185
+ });
186
+ it('should return socialUsername when provided and socialProvider is null', () => {
187
+ const result = ConnectorUtil.getAuthName({
188
+ email: 'test@example.com',
189
+ socialUsername: 'john_doe',
190
+ socialProvider: null
191
+ });
192
+ expect(result).toBe('john_doe');
193
+ });
194
+ it('should return email when socialUsername is not provided', () => {
195
+ const result = ConnectorUtil.getAuthName({
196
+ email: 'test@example.com'
197
+ });
198
+ expect(result).toBe('test@example.com');
199
+ });
200
+ it('should return email when socialUsername is null', () => {
201
+ const result = ConnectorUtil.getAuthName({
202
+ email: 'test@example.com',
203
+ socialUsername: null
204
+ });
205
+ expect(result).toBe('test@example.com');
206
+ });
207
+ it('should return email when socialUsername is empty string', () => {
208
+ const result = ConnectorUtil.getAuthName({
209
+ email: 'test@example.com',
210
+ socialUsername: ''
211
+ });
212
+ expect(result).toBe('test@example.com');
213
+ });
214
+ it('should truncate email when longer than 30 characters', () => {
215
+ const longEmail = 'verylongemailaddress@verylongdomain.com';
216
+ const result = ConnectorUtil.getAuthName({
217
+ email: longEmail
218
+ });
219
+ expect(result).toBe(`${longEmail.slice(0, -3)}...`);
220
+ expect(result).toBe('verylongemailaddress@verylongdomain....');
221
+ });
222
+ it('should return full email when exactly 30 characters', () => {
223
+ const email = 'test12345@example12345678.com';
224
+ const result = ConnectorUtil.getAuthName({
225
+ email
226
+ });
227
+ expect(result).toBe(email);
228
+ });
229
+ it('should return full email when less than 30 characters', () => {
230
+ const shortEmail = 'short@test.com';
231
+ const result = ConnectorUtil.getAuthName({
232
+ email: shortEmail
233
+ });
234
+ expect(result).toBe(shortEmail);
235
+ });
236
+ });
237
+ describe('fetchProviderData', () => {
238
+ const mockProvider = {
239
+ request: vi.fn()
240
+ };
241
+ const mockConnector = {
242
+ name: 'Test Wallet',
243
+ id: 'test-connector',
244
+ provider: mockProvider
245
+ };
246
+ beforeEach(() => {
247
+ vi.clearAllMocks();
248
+ mockProvider.request.mockClear();
249
+ });
250
+ it('should return empty data for Browser Wallet on desktop', async () => {
251
+ vi.spyOn(CoreHelperUtil, 'isMobile').mockReturnValue(false);
252
+ const browserWalletConnector = {
253
+ ...mockConnector,
254
+ name: 'Browser Wallet'
255
+ };
256
+ const result = await ConnectorUtil.fetchProviderData(browserWalletConnector);
257
+ expect(result).toEqual({ accounts: [], chainId: undefined });
258
+ expect(mockProvider.request).not.toHaveBeenCalled();
259
+ });
260
+ it('should return empty data for AUTH connector', async () => {
261
+ const authConnector = {
262
+ ...mockConnector,
263
+ id: ConstantsUtil.CONNECTOR_ID.AUTH
264
+ };
265
+ const result = await ConnectorUtil.fetchProviderData(authConnector);
266
+ expect(result).toEqual({ accounts: [], chainId: undefined });
267
+ expect(mockProvider.request).not.toHaveBeenCalled();
268
+ });
269
+ it('should fetch accounts and chainId successfully', async () => {
270
+ const mockAccounts = ['0x123', '0x456'];
271
+ const mockChainId = '0x1';
272
+ mockProvider.request.mockResolvedValueOnce(mockAccounts).mockResolvedValueOnce(mockChainId);
273
+ const result = await ConnectorUtil.fetchProviderData(mockConnector);
274
+ expect(result).toEqual({
275
+ accounts: mockAccounts,
276
+ chainId: 1
277
+ });
278
+ expect(mockProvider.request).toHaveBeenCalledTimes(2);
279
+ expect(mockProvider.request).toHaveBeenNthCalledWith(1, { method: 'eth_accounts' });
280
+ expect(mockProvider.request).toHaveBeenNthCalledWith(2, { method: 'eth_chainId' });
281
+ });
282
+ it('should return empty data when provider is undefined', async () => {
283
+ const connectorWithoutProvider = {
284
+ ...mockConnector,
285
+ provider: undefined
286
+ };
287
+ const result = await ConnectorUtil.fetchProviderData(connectorWithoutProvider);
288
+ expect(result).toEqual({ accounts: undefined, chainId: undefined });
289
+ });
290
+ it('should handle eth_accounts request failure gracefully', async () => {
291
+ mockProvider.request
292
+ .mockRejectedValueOnce(new Error('eth_accounts failed'))
293
+ .mockResolvedValueOnce('0x1');
294
+ const result = await ConnectorUtil.fetchProviderData(mockConnector);
295
+ expect(result).toEqual({ accounts: [], chainId: undefined });
296
+ });
297
+ it('should handle eth_chainId request failure gracefully', async () => {
298
+ mockProvider.request
299
+ .mockResolvedValueOnce(['0x123'])
300
+ .mockRejectedValueOnce(new Error('eth_chainId failed'));
301
+ const result = await ConnectorUtil.fetchProviderData(mockConnector);
302
+ expect(result).toEqual({ accounts: [], chainId: undefined });
303
+ });
304
+ it('should handle both requests failing gracefully', async () => {
305
+ mockProvider.request
306
+ .mockRejectedValueOnce(new Error('eth_accounts failed'))
307
+ .mockRejectedValueOnce(new Error('eth_chainId failed'));
308
+ const result = await ConnectorUtil.fetchProviderData(mockConnector);
309
+ expect(result).toEqual({ accounts: [], chainId: undefined });
310
+ });
311
+ it('should convert various hex chainId formats correctly', async () => {
312
+ const testCases = [
313
+ { hex: '0x1', expected: 1 },
314
+ { hex: '0xa', expected: 10 },
315
+ { hex: '0x38', expected: 56 },
316
+ { hex: '0x89', expected: 137 },
317
+ { hex: '0xa4b1', expected: 42161 }
318
+ ];
319
+ for (const { hex, expected } of testCases) {
320
+ mockProvider.request.mockClear();
321
+ mockProvider.request.mockResolvedValueOnce(['0x123']).mockResolvedValueOnce(hex);
322
+ const result = await ConnectorUtil.fetchProviderData(mockConnector);
323
+ expect(result.chainId).toBe(expected);
324
+ }
325
+ });
326
+ it('should handle Browser Wallet on mobile correctly', async () => {
327
+ vi.spyOn(CoreHelperUtil, 'isMobile').mockReturnValue(true);
328
+ const browserWalletConnector = {
329
+ ...mockConnector,
330
+ name: 'Browser Wallet'
331
+ };
332
+ const mockAccounts = ['0x789'];
333
+ const mockChainId = '0x1';
334
+ mockProvider.request.mockResolvedValueOnce(mockAccounts).mockResolvedValueOnce(mockChainId);
335
+ const result = await ConnectorUtil.fetchProviderData(browserWalletConnector);
336
+ expect(result).toEqual({
337
+ accounts: mockAccounts,
338
+ chainId: 1
339
+ });
340
+ expect(mockProvider.request).toHaveBeenCalledTimes(2);
341
+ expect(mockProvider.request).toHaveBeenNthCalledWith(1, { method: 'eth_accounts' });
342
+ expect(mockProvider.request).toHaveBeenNthCalledWith(2, { method: 'eth_chainId' });
343
+ });
344
+ });
345
+ describe('getCappedRecommendedWallets', () => {
346
+ beforeEach(() => {
347
+ vi.clearAllMocks();
348
+ });
349
+ it('should return empty when no wc connector, no injected connectors, and no custom wallets', () => {
350
+ const originalConnectors = ConnectorControllerRelative.state.connectors;
351
+ const originalCustomWallets = OptionsControllerRelative.state.customWallets;
352
+ const originalFeaturedWalletIds = OptionsControllerRelative.state.featuredWalletIds;
353
+ ConnectorControllerRelative.state.connectors = [];
354
+ OptionsControllerRelative.state.customWallets = undefined;
355
+ OptionsControllerRelative.state.featuredWalletIds = [];
356
+ const recommended = [{ id: 'w1', name: 'Wallet 1' }];
357
+ const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
358
+ ConnectorControllerRelative.state.connectors = originalConnectors;
359
+ OptionsControllerRelative.state.customWallets = originalCustomWallets;
360
+ OptionsControllerRelative.state.featuredWalletIds = originalFeaturedWalletIds;
361
+ expect(result).toEqual([]);
362
+ });
363
+ it('should cap recommended to fill remaining slots up to 4', () => {
364
+ const WC = {
365
+ id: 'walletConnect',
366
+ type: 'EXTERNAL',
367
+ name: 'WalletConnect',
368
+ chain: { id: 'eip155:1' }
369
+ };
370
+ const originalConnectors = ConnectorControllerRelative.state.connectors;
371
+ const originalCustomWallets = OptionsControllerRelative.state.customWallets;
372
+ const originalFeaturedWalletIds = OptionsControllerRelative.state.featuredWalletIds;
373
+ ConnectorControllerRelative.state.connectors = [WC];
374
+ OptionsControllerRelative.state.customWallets = [{ id: 'c1' }];
375
+ OptionsControllerRelative.state.featuredWalletIds = ['f1'];
376
+ vi.spyOn(OptionsUtil, 'isEmailEnabled').mockReturnValue(false);
377
+ vi.spyOn(OptionsUtil, 'isSocialsEnabled').mockReturnValue(false);
378
+ vi.spyOn(WalletUtil, 'filterOutDuplicateWallets').mockImplementation(w => w);
379
+ const recommended = [
380
+ { id: 'w1', name: 'Wallet 1' },
381
+ { id: 'w2', name: 'Wallet 2' },
382
+ { id: 'w3', name: 'Wallet 3' }
383
+ ];
384
+ // featured(1) + custom(1) + injected(0) + email(0) + social(0) = 2 => slice 2
385
+ const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
386
+ ConnectorControllerRelative.state.connectors = originalConnectors;
387
+ OptionsControllerRelative.state.customWallets = originalCustomWallets;
388
+ OptionsControllerRelative.state.featuredWalletIds = originalFeaturedWalletIds;
389
+ expect(result.map(w => w.id)).toEqual(['w1', 'w2']);
390
+ });
391
+ it('should return empty when displayed wallets are already 4 or more', () => {
392
+ const WC = {
393
+ id: 'walletConnect',
394
+ type: 'EXTERNAL',
395
+ name: 'WalletConnect',
396
+ chain: { id: 'eip155:1' }
397
+ };
398
+ const INJECTED_ONE = {
399
+ id: 'inj-1',
400
+ type: 'INJECTED',
401
+ name: 'Injected One',
402
+ chain: { id: 'eip155:1' }
403
+ };
404
+ const originalConnectors = ConnectorControllerRelative.state.connectors;
405
+ const originalCustomWallets = OptionsControllerRelative.state.customWallets;
406
+ const originalFeaturedWalletIds = OptionsControllerRelative.state.featuredWalletIds;
407
+ ConnectorControllerRelative.state.connectors = [WC, INJECTED_ONE];
408
+ OptionsControllerRelative.state.customWallets = [{ id: 'c1' }];
409
+ OptionsControllerRelative.state.featuredWalletIds = ['f1'];
410
+ vi.spyOn(OptionsUtil, 'isEmailEnabled').mockReturnValue(true);
411
+ vi.spyOn(OptionsUtil, 'isSocialsEnabled').mockReturnValue(true);
412
+ const filterSpy = vi.spyOn(WalletUtil, 'filterOutDuplicateWallets');
413
+ const recommended = [
414
+ { id: 'w1', name: 'Wallet 1' },
415
+ { id: 'w2', name: 'Wallet 2' }
416
+ ];
417
+ // featured(1) + custom(1) + injected(1) + email(1) + social(1) = 5 => slice 0
418
+ const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
419
+ ConnectorControllerRelative.state.connectors = originalConnectors;
420
+ OptionsControllerRelative.state.customWallets = originalCustomWallets;
421
+ OptionsControllerRelative.state.featuredWalletIds = originalFeaturedWalletIds;
422
+ expect(result).toEqual([]);
423
+ expect(filterSpy).not.toHaveBeenCalled();
424
+ });
425
+ it('should ignore Browser Wallet and WalletConnect in injected count', () => {
426
+ const WC = {
427
+ id: 'walletConnect',
428
+ type: 'EXTERNAL',
429
+ name: 'WalletConnect',
430
+ chain: { id: 'eip155:1' }
431
+ };
432
+ const BROWSER_WALLET = {
433
+ id: 'inj-browser',
434
+ type: 'INJECTED',
435
+ name: 'Browser Wallet',
436
+ chain: { id: 'eip155:1' }
437
+ };
438
+ const WC_INJECTED = {
439
+ id: 'walletConnect',
440
+ type: 'INJECTED',
441
+ name: 'WalletConnect',
442
+ chain: { id: 'eip155:1' }
443
+ };
444
+ const originalConnectors = ConnectorControllerRelative.state.connectors;
445
+ const originalCustomWallets = OptionsControllerRelative.state.customWallets;
446
+ const originalFeaturedWalletIds = OptionsControllerRelative.state.featuredWalletIds;
447
+ ConnectorControllerRelative.state.connectors = [WC, BROWSER_WALLET, WC_INJECTED];
448
+ OptionsControllerRelative.state.customWallets = [];
449
+ OptionsControllerRelative.state.featuredWalletIds = [];
450
+ vi.spyOn(OptionsUtil, 'isEmailEnabled').mockReturnValue(false);
451
+ vi.spyOn(OptionsUtil, 'isSocialsEnabled').mockReturnValue(false);
452
+ vi.spyOn(WalletUtil, 'filterOutDuplicateWallets').mockImplementation(w => w);
453
+ const recommended = [
454
+ { id: 'w1', name: 'Wallet 1' },
455
+ { id: 'w2', name: 'Wallet 2' },
456
+ { id: 'w3', name: 'Wallet 3' }
457
+ ];
458
+ // injected connectors include only Browser Wallet and WalletConnect => injected count = 0
459
+ // featured(0) + custom(0) + injected(0) + email(0) + social(0) = 0 => slice 4
460
+ const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
461
+ ConnectorControllerRelative.state.connectors = originalConnectors;
462
+ OptionsControllerRelative.state.customWallets = originalCustomWallets;
463
+ OptionsControllerRelative.state.featuredWalletIds = originalFeaturedWalletIds;
464
+ expect(result.map(w => w.id)).toEqual(['w1', 'w2', 'w3']);
465
+ });
466
+ it('should slice after duplicate filtering', () => {
467
+ const WC = {
468
+ id: 'walletConnect',
469
+ type: 'EXTERNAL',
470
+ name: 'WalletConnect',
471
+ chain: { id: 'eip155:1' }
472
+ };
473
+ const originalConnectors = ConnectorControllerRelative.state.connectors;
474
+ const originalCustomWallets = OptionsControllerRelative.state.customWallets;
475
+ const originalFeaturedWalletIds = OptionsControllerRelative.state.featuredWalletIds;
476
+ ConnectorControllerRelative.state.connectors = [WC];
477
+ OptionsControllerRelative.state.customWallets = [{ id: 'c1' }];
478
+ OptionsControllerRelative.state.featuredWalletIds = [];
479
+ vi.spyOn(OptionsUtil, 'isEmailEnabled').mockReturnValue(false);
480
+ vi.spyOn(OptionsUtil, 'isSocialsEnabled').mockReturnValue(false);
481
+ // Simulate duplicates being removed so only one remains before slice
482
+ vi.spyOn(WalletUtil, 'filterOutDuplicateWallets').mockReturnValue([
483
+ { id: 'w1', name: 'Wallet 1' }
484
+ ]);
485
+ const recommended = [
486
+ { id: 'w1', name: 'Wallet 1' },
487
+ { id: 'w2', name: 'Wallet 2' },
488
+ { id: 'w3', name: 'Wallet 3' }
489
+ ];
490
+ // featured(0) + custom(1) + injected(0) + email(0) + social(0) = 1 => slice 3
491
+ // but filtered list has length 1, result should be that single wallet
492
+ const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
493
+ ConnectorControllerRelative.state.connectors = originalConnectors;
494
+ OptionsControllerRelative.state.customWallets = originalCustomWallets;
495
+ OptionsControllerRelative.state.featuredWalletIds = originalFeaturedWalletIds;
496
+ expect(result.map(w => w.id)).toEqual(['w1']);
497
+ });
498
+ });
499
+ });
500
+ //# sourceMappingURL=ControllerUtil.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ControllerUtil.test.js","sourceRoot":"","sources":["../../../../tests/utils/ControllerUtil.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AACpD,OAAO,EAIN,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,wCAAwC,CAAA;AAC/F,OAAO,EAAE,oBAAoB,IAAI,4BAA4B,EAAE,MAAM,+CAA+C,CAAA;AACpH,OAAO,EAAE,mBAAmB,IAAI,2BAA2B,EAAE,MAAM,8CAA8C,C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