@reown/appkit-scaffold-ui 1.8.14-signet-fix.0 → 1.8.14-wallet-button-fix.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/dist/esm/exports/utils.js +0 -2
- package/dist/esm/exports/utils.js.map +1 -1
- package/dist/esm/src/partials/w3m-account-wallet-features-widget/index.js +1 -2
- package/dist/esm/src/partials/w3m-account-wallet-features-widget/index.js.map +1 -1
- package/dist/esm/src/partials/w3m-all-wallets-list/index.js +3 -35
- package/dist/esm/src/partials/w3m-all-wallets-list/index.js.map +1 -1
- package/dist/esm/src/partials/w3m-all-wallets-search/index.js +1 -2
- package/dist/esm/src/partials/w3m-all-wallets-search/index.js.map +1 -1
- package/dist/esm/src/partials/w3m-connecting-wc-mobile/index.js +2 -32
- package/dist/esm/src/partials/w3m-connecting-wc-mobile/index.js.map +1 -1
- package/dist/esm/src/partials/w3m-connector-list/index.js +3 -84
- package/dist/esm/src/partials/w3m-connector-list/index.js.map +1 -1
- package/dist/esm/src/utils/ConnectionUtil.js +1 -2
- package/dist/esm/src/utils/ConnectionUtil.js.map +1 -1
- package/dist/esm/src/utils/ConstantsUtil.js +0 -1
- package/dist/esm/src/utils/ConstantsUtil.js.map +1 -1
- package/dist/esm/src/views/w3m-connect-view/index.js +1 -2
- package/dist/esm/src/views/w3m-connect-view/index.js.map +1 -1
- package/dist/esm/test/WalletUtil.test.js +1 -2
- package/dist/esm/test/WalletUtil.test.js.map +1 -1
- package/dist/esm/test/partials/w3m-connecting-wc-mobile.test.js +9 -3
- package/dist/esm/test/partials/w3m-connecting-wc-mobile.test.js.map +1 -1
- package/dist/esm/test/partials/w3m-connector-list.test.js +10 -2
- package/dist/esm/test/partials/w3m-connector-list.test.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/dist/types/exports/utils.d.ts +0 -2
- package/dist/types/src/partials/w3m-all-wallets-list/index.d.ts +0 -4
- package/dist/types/src/partials/w3m-connector-list/index.d.ts +0 -4
- package/dist/types/src/utils/ConstantsUtil.d.ts +0 -2
- package/package.json +6 -6
- package/dist/esm/src/utils/ConnectorUtil.js +0 -190
- package/dist/esm/src/utils/ConnectorUtil.js.map +0 -1
- package/dist/esm/src/utils/WalletUtil.js +0 -131
- package/dist/esm/src/utils/WalletUtil.js.map +0 -1
- package/dist/esm/test/utils/ConnectorUtil.test.js +0 -490
- package/dist/esm/test/utils/ConnectorUtil.test.js.map +0 -1
- package/dist/types/src/utils/ConnectorUtil.d.ts +0 -43
- package/dist/types/src/utils/WalletUtil.d.ts +0 -39
- package/dist/types/test/utils/ConnectorUtil.test.d.ts +0 -1
|
@@ -1,490 +0,0 @@
|
|
|
1
|
-
import { beforeEach, describe, expect, it, vi } from 'vitest';
|
|
2
|
-
import { ConstantsUtil } from '@reown/appkit-common';
|
|
3
|
-
import { ApiController, ConnectionController, ConnectorController, CoreHelperUtil, OptionsController, OptionsUtil } from '@reown/appkit-controllers';
|
|
4
|
-
import { ConnectorUtil } from '../../src/utils/ConnectorUtil';
|
|
5
|
-
import { WalletUtil } from '../../src/utils/WalletUtil';
|
|
6
|
-
const INJECTED = { id: 'injected' };
|
|
7
|
-
const RECENT = { id: 'recent' };
|
|
8
|
-
const FEATURED = { id: 'featured' };
|
|
9
|
-
const CUSTOM = { id: 'custom' };
|
|
10
|
-
const EXTERNAL = { id: 'external' };
|
|
11
|
-
const MULTI_CHAIN = { id: 'multiChain' };
|
|
12
|
-
const INJECTED_CONNECTOR = {
|
|
13
|
-
id: 'injected',
|
|
14
|
-
type: 'INJECTED',
|
|
15
|
-
info: { rdns: 'browser.wallet' },
|
|
16
|
-
name: 'Browser Wallet',
|
|
17
|
-
chain: { id: 'eip155:1' }
|
|
18
|
-
};
|
|
19
|
-
const ANNOUNCED_CONNECTOR = {
|
|
20
|
-
id: 'announced',
|
|
21
|
-
type: 'ANNOUNCED',
|
|
22
|
-
info: { rdns: 'announced.wallet' },
|
|
23
|
-
name: 'Announced Wallet',
|
|
24
|
-
chain: { id: 'eip155:1' }
|
|
25
|
-
};
|
|
26
|
-
describe('ConnectorUtil', () => {
|
|
27
|
-
beforeEach(() => {
|
|
28
|
-
vi.clearAllMocks();
|
|
29
|
-
});
|
|
30
|
-
describe('getConnectorTypeOrder', () => {
|
|
31
|
-
it('should return connector positions in order of overriddenConnectors first then enabled connectors', () => {
|
|
32
|
-
vi.spyOn(ConnectorUtil, 'getIsConnectedWithWC').mockReturnValue(false);
|
|
33
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
34
|
-
...OptionsController.state,
|
|
35
|
-
features: {
|
|
36
|
-
connectorTypeOrder: ['injected', 'walletConnect']
|
|
37
|
-
}
|
|
38
|
-
});
|
|
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
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
62
|
-
...OptionsController.state,
|
|
63
|
-
features: {
|
|
64
|
-
connectorTypeOrder: ['injected', 'walletConnect']
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
const result = ConnectorUtil.getConnectorTypeOrder({
|
|
68
|
-
recommended: [],
|
|
69
|
-
featured: [FEATURED],
|
|
70
|
-
custom: [CUSTOM],
|
|
71
|
-
recent: [RECENT],
|
|
72
|
-
announced: [INJECTED],
|
|
73
|
-
injected: [INJECTED],
|
|
74
|
-
multiChain: [MULTI_CHAIN],
|
|
75
|
-
external: [EXTERNAL]
|
|
76
|
-
});
|
|
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
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
89
|
-
...OptionsController.state,
|
|
90
|
-
features: {
|
|
91
|
-
connectorTypeOrder: ['injected', 'recommended']
|
|
92
|
-
}
|
|
93
|
-
});
|
|
94
|
-
const result = ConnectorUtil.getConnectorTypeOrder({
|
|
95
|
-
recommended: [],
|
|
96
|
-
featured: [FEATURED],
|
|
97
|
-
custom: [CUSTOM],
|
|
98
|
-
recent: [RECENT],
|
|
99
|
-
announced: [],
|
|
100
|
-
injected: [],
|
|
101
|
-
multiChain: [],
|
|
102
|
-
external: [EXTERNAL]
|
|
103
|
-
});
|
|
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(ConnectionController, 'checkInstalled').mockReturnValue(true);
|
|
119
|
-
expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(true);
|
|
120
|
-
});
|
|
121
|
-
it('should hide injected connector when not installed and no rdns', () => {
|
|
122
|
-
vi.spyOn(ConnectionController, 'checkInstalled').mockReturnValue(false);
|
|
123
|
-
expect(ConnectorUtil.showConnector({ ...INJECTED_CONNECTOR, info: undefined })).toBe(false);
|
|
124
|
-
});
|
|
125
|
-
it('should hide connector when rdns is excluded', () => {
|
|
126
|
-
vi.spyOn(ApiController.state, 'excludedWallets', 'get').mockReturnValue([
|
|
127
|
-
{ rdns: 'browser.wallet', name: 'Test Wallet' }
|
|
128
|
-
]);
|
|
129
|
-
expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(false);
|
|
130
|
-
});
|
|
131
|
-
it('should hide connector when name is excluded', () => {
|
|
132
|
-
vi.spyOn(ApiController.state, 'excludedWallets', 'get').mockReturnValue([
|
|
133
|
-
{ name: 'Browser Wallet', rdns: 'test.wallet' }
|
|
134
|
-
]);
|
|
135
|
-
expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(false);
|
|
136
|
-
});
|
|
137
|
-
it('should hide announced connector when excluded with rdns', () => {
|
|
138
|
-
vi.spyOn(ApiController.state, 'excludedWallets', 'get').mockReturnValue([
|
|
139
|
-
{ rdns: 'announced.wallet', name: 'Announced Wallet' }
|
|
140
|
-
]);
|
|
141
|
-
expect(ConnectorUtil.showConnector(ANNOUNCED_CONNECTOR)).toBe(false);
|
|
142
|
-
});
|
|
143
|
-
it('should hide announced connector when excluded with name', () => {
|
|
144
|
-
vi.spyOn(ApiController.state, 'excludedWallets', 'get').mockReturnValue([
|
|
145
|
-
{ name: 'Announced Wallet', rdns: 'announced' }
|
|
146
|
-
]);
|
|
147
|
-
expect(ConnectorUtil.showConnector(ANNOUNCED_CONNECTOR)).toBe(false);
|
|
148
|
-
});
|
|
149
|
-
it('should show injected connector when not excluded', () => {
|
|
150
|
-
vi.spyOn(ApiController.state, 'excludedWallets', 'get').mockReturnValue([]);
|
|
151
|
-
expect(ConnectorUtil.showConnector(INJECTED_CONNECTOR)).toBe(true);
|
|
152
|
-
});
|
|
153
|
-
it('should show announced connector when not excluded', () => {
|
|
154
|
-
vi.spyOn(ApiController.state, 'excludedWallets', 'get').mockReturnValue([]);
|
|
155
|
-
expect(ConnectorUtil.showConnector(ANNOUNCED_CONNECTOR)).toBe(true);
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
describe('getAuthName', () => {
|
|
159
|
-
it('should return socialUsername when provided and not discord ending with 0', () => {
|
|
160
|
-
const result = ConnectorUtil.getAuthName({
|
|
161
|
-
email: 'test@example.com',
|
|
162
|
-
socialUsername: 'john_doe',
|
|
163
|
-
socialProvider: 'github'
|
|
164
|
-
});
|
|
165
|
-
expect(result).toBe('john_doe');
|
|
166
|
-
});
|
|
167
|
-
it('should return socialUsername without last character when discord provider and ends with 0', () => {
|
|
168
|
-
const result = ConnectorUtil.getAuthName({
|
|
169
|
-
email: 'test@example.com',
|
|
170
|
-
socialUsername: 'john_doe0',
|
|
171
|
-
socialProvider: 'discord'
|
|
172
|
-
});
|
|
173
|
-
expect(result).toBe('john_doe');
|
|
174
|
-
});
|
|
175
|
-
it('should return socialUsername as-is when discord provider but does not end with 0', () => {
|
|
176
|
-
const result = ConnectorUtil.getAuthName({
|
|
177
|
-
email: 'test@example.com',
|
|
178
|
-
socialUsername: 'john_doe1',
|
|
179
|
-
socialProvider: 'discord'
|
|
180
|
-
});
|
|
181
|
-
expect(result).toBe('john_doe1');
|
|
182
|
-
});
|
|
183
|
-
it('should return socialUsername when provided and socialProvider is null', () => {
|
|
184
|
-
const result = ConnectorUtil.getAuthName({
|
|
185
|
-
email: 'test@example.com',
|
|
186
|
-
socialUsername: 'john_doe',
|
|
187
|
-
socialProvider: null
|
|
188
|
-
});
|
|
189
|
-
expect(result).toBe('john_doe');
|
|
190
|
-
});
|
|
191
|
-
it('should return email when socialUsername is not provided', () => {
|
|
192
|
-
const result = ConnectorUtil.getAuthName({
|
|
193
|
-
email: 'test@example.com'
|
|
194
|
-
});
|
|
195
|
-
expect(result).toBe('test@example.com');
|
|
196
|
-
});
|
|
197
|
-
it('should return email when socialUsername is null', () => {
|
|
198
|
-
const result = ConnectorUtil.getAuthName({
|
|
199
|
-
email: 'test@example.com',
|
|
200
|
-
socialUsername: null
|
|
201
|
-
});
|
|
202
|
-
expect(result).toBe('test@example.com');
|
|
203
|
-
});
|
|
204
|
-
it('should return email when socialUsername is empty string', () => {
|
|
205
|
-
const result = ConnectorUtil.getAuthName({
|
|
206
|
-
email: 'test@example.com',
|
|
207
|
-
socialUsername: ''
|
|
208
|
-
});
|
|
209
|
-
expect(result).toBe('test@example.com');
|
|
210
|
-
});
|
|
211
|
-
it('should truncate email when longer than 30 characters', () => {
|
|
212
|
-
const longEmail = 'verylongemailaddress@verylongdomain.com';
|
|
213
|
-
const result = ConnectorUtil.getAuthName({
|
|
214
|
-
email: longEmail
|
|
215
|
-
});
|
|
216
|
-
expect(result).toBe(`${longEmail.slice(0, -3)}...`);
|
|
217
|
-
expect(result).toBe('verylongemailaddress@verylongdomain....');
|
|
218
|
-
});
|
|
219
|
-
it('should return full email when exactly 30 characters', () => {
|
|
220
|
-
const email = 'test12345@example12345678.com';
|
|
221
|
-
const result = ConnectorUtil.getAuthName({
|
|
222
|
-
email
|
|
223
|
-
});
|
|
224
|
-
expect(result).toBe(email);
|
|
225
|
-
});
|
|
226
|
-
it('should return full email when less than 30 characters', () => {
|
|
227
|
-
const shortEmail = 'short@test.com';
|
|
228
|
-
const result = ConnectorUtil.getAuthName({
|
|
229
|
-
email: shortEmail
|
|
230
|
-
});
|
|
231
|
-
expect(result).toBe(shortEmail);
|
|
232
|
-
});
|
|
233
|
-
});
|
|
234
|
-
describe('fetchProviderData', () => {
|
|
235
|
-
const mockProvider = {
|
|
236
|
-
request: vi.fn()
|
|
237
|
-
};
|
|
238
|
-
const mockConnector = {
|
|
239
|
-
name: 'Test Wallet',
|
|
240
|
-
id: 'test-connector',
|
|
241
|
-
provider: mockProvider
|
|
242
|
-
};
|
|
243
|
-
beforeEach(() => {
|
|
244
|
-
vi.clearAllMocks();
|
|
245
|
-
mockProvider.request.mockClear();
|
|
246
|
-
});
|
|
247
|
-
it('should return empty data for Browser Wallet on desktop', async () => {
|
|
248
|
-
vi.spyOn(CoreHelperUtil, 'isMobile').mockReturnValue(false);
|
|
249
|
-
const browserWalletConnector = {
|
|
250
|
-
...mockConnector,
|
|
251
|
-
name: 'Browser Wallet'
|
|
252
|
-
};
|
|
253
|
-
const result = await ConnectorUtil.fetchProviderData(browserWalletConnector);
|
|
254
|
-
expect(result).toEqual({ accounts: [], chainId: undefined });
|
|
255
|
-
expect(mockProvider.request).not.toHaveBeenCalled();
|
|
256
|
-
});
|
|
257
|
-
it('should return empty data for AUTH connector', async () => {
|
|
258
|
-
const authConnector = {
|
|
259
|
-
...mockConnector,
|
|
260
|
-
id: ConstantsUtil.CONNECTOR_ID.AUTH
|
|
261
|
-
};
|
|
262
|
-
const result = await ConnectorUtil.fetchProviderData(authConnector);
|
|
263
|
-
expect(result).toEqual({ accounts: [], chainId: undefined });
|
|
264
|
-
expect(mockProvider.request).not.toHaveBeenCalled();
|
|
265
|
-
});
|
|
266
|
-
it('should fetch accounts and chainId successfully', async () => {
|
|
267
|
-
const mockAccounts = ['0x123', '0x456'];
|
|
268
|
-
const mockChainId = '0x1';
|
|
269
|
-
mockProvider.request.mockResolvedValueOnce(mockAccounts).mockResolvedValueOnce(mockChainId);
|
|
270
|
-
const result = await ConnectorUtil.fetchProviderData(mockConnector);
|
|
271
|
-
expect(result).toEqual({
|
|
272
|
-
accounts: mockAccounts,
|
|
273
|
-
chainId: 1
|
|
274
|
-
});
|
|
275
|
-
expect(mockProvider.request).toHaveBeenCalledTimes(2);
|
|
276
|
-
expect(mockProvider.request).toHaveBeenNthCalledWith(1, { method: 'eth_accounts' });
|
|
277
|
-
expect(mockProvider.request).toHaveBeenNthCalledWith(2, { method: 'eth_chainId' });
|
|
278
|
-
});
|
|
279
|
-
it('should return empty data when provider is undefined', async () => {
|
|
280
|
-
const connectorWithoutProvider = {
|
|
281
|
-
...mockConnector,
|
|
282
|
-
provider: undefined
|
|
283
|
-
};
|
|
284
|
-
const result = await ConnectorUtil.fetchProviderData(connectorWithoutProvider);
|
|
285
|
-
expect(result).toEqual({ accounts: undefined, chainId: undefined });
|
|
286
|
-
});
|
|
287
|
-
it('should handle eth_accounts request failure gracefully', async () => {
|
|
288
|
-
mockProvider.request
|
|
289
|
-
.mockRejectedValueOnce(new Error('eth_accounts failed'))
|
|
290
|
-
.mockResolvedValueOnce('0x1');
|
|
291
|
-
const result = await ConnectorUtil.fetchProviderData(mockConnector);
|
|
292
|
-
expect(result).toEqual({ accounts: [], chainId: undefined });
|
|
293
|
-
});
|
|
294
|
-
it('should handle eth_chainId request failure gracefully', async () => {
|
|
295
|
-
mockProvider.request
|
|
296
|
-
.mockResolvedValueOnce(['0x123'])
|
|
297
|
-
.mockRejectedValueOnce(new Error('eth_chainId failed'));
|
|
298
|
-
const result = await ConnectorUtil.fetchProviderData(mockConnector);
|
|
299
|
-
expect(result).toEqual({ accounts: [], chainId: undefined });
|
|
300
|
-
});
|
|
301
|
-
it('should handle both requests failing gracefully', async () => {
|
|
302
|
-
mockProvider.request
|
|
303
|
-
.mockRejectedValueOnce(new Error('eth_accounts failed'))
|
|
304
|
-
.mockRejectedValueOnce(new Error('eth_chainId failed'));
|
|
305
|
-
const result = await ConnectorUtil.fetchProviderData(mockConnector);
|
|
306
|
-
expect(result).toEqual({ accounts: [], chainId: undefined });
|
|
307
|
-
});
|
|
308
|
-
it('should convert various hex chainId formats correctly', async () => {
|
|
309
|
-
const testCases = [
|
|
310
|
-
{ hex: '0x1', expected: 1 },
|
|
311
|
-
{ hex: '0xa', expected: 10 },
|
|
312
|
-
{ hex: '0x38', expected: 56 },
|
|
313
|
-
{ hex: '0x89', expected: 137 },
|
|
314
|
-
{ hex: '0xa4b1', expected: 42161 }
|
|
315
|
-
];
|
|
316
|
-
for (const { hex, expected } of testCases) {
|
|
317
|
-
mockProvider.request.mockClear();
|
|
318
|
-
mockProvider.request.mockResolvedValueOnce(['0x123']).mockResolvedValueOnce(hex);
|
|
319
|
-
const result = await ConnectorUtil.fetchProviderData(mockConnector);
|
|
320
|
-
expect(result.chainId).toBe(expected);
|
|
321
|
-
}
|
|
322
|
-
});
|
|
323
|
-
it('should handle Browser Wallet on mobile correctly', async () => {
|
|
324
|
-
vi.spyOn(CoreHelperUtil, 'isMobile').mockReturnValue(true);
|
|
325
|
-
const browserWalletConnector = {
|
|
326
|
-
...mockConnector,
|
|
327
|
-
name: 'Browser Wallet'
|
|
328
|
-
};
|
|
329
|
-
const mockAccounts = ['0x789'];
|
|
330
|
-
const mockChainId = '0x1';
|
|
331
|
-
mockProvider.request.mockResolvedValueOnce(mockAccounts).mockResolvedValueOnce(mockChainId);
|
|
332
|
-
const result = await ConnectorUtil.fetchProviderData(browserWalletConnector);
|
|
333
|
-
expect(result).toEqual({
|
|
334
|
-
accounts: mockAccounts,
|
|
335
|
-
chainId: 1
|
|
336
|
-
});
|
|
337
|
-
expect(mockProvider.request).toHaveBeenCalledTimes(2);
|
|
338
|
-
expect(mockProvider.request).toHaveBeenNthCalledWith(1, { method: 'eth_accounts' });
|
|
339
|
-
expect(mockProvider.request).toHaveBeenNthCalledWith(2, { method: 'eth_chainId' });
|
|
340
|
-
});
|
|
341
|
-
});
|
|
342
|
-
describe('getCappedRecommendedWallets', () => {
|
|
343
|
-
beforeEach(() => {
|
|
344
|
-
vi.clearAllMocks();
|
|
345
|
-
});
|
|
346
|
-
it('should return empty when no wc connector, no injected connectors, and no custom wallets', () => {
|
|
347
|
-
vi.spyOn(ConnectorController, 'state', 'get').mockReturnValue({
|
|
348
|
-
...ConnectorController.state,
|
|
349
|
-
connectors: []
|
|
350
|
-
});
|
|
351
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
352
|
-
...OptionsController.state,
|
|
353
|
-
customWallets: undefined,
|
|
354
|
-
featuredWalletIds: []
|
|
355
|
-
});
|
|
356
|
-
const recommended = [{ id: 'w1', name: 'Wallet 1' }];
|
|
357
|
-
const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
|
|
358
|
-
expect(result).toEqual([]);
|
|
359
|
-
});
|
|
360
|
-
it('should cap recommended to fill remaining slots up to 4', () => {
|
|
361
|
-
const WC = {
|
|
362
|
-
id: 'walletConnect',
|
|
363
|
-
type: 'EXTERNAL',
|
|
364
|
-
name: 'WalletConnect',
|
|
365
|
-
chain: { id: 'eip155:1' }
|
|
366
|
-
};
|
|
367
|
-
vi.spyOn(ConnectorController, 'state', 'get').mockReturnValue({
|
|
368
|
-
...ConnectorController.state,
|
|
369
|
-
connectors: [WC]
|
|
370
|
-
});
|
|
371
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
372
|
-
...OptionsController.state,
|
|
373
|
-
customWallets: [{ id: 'c1' }],
|
|
374
|
-
featuredWalletIds: ['f1']
|
|
375
|
-
});
|
|
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
|
-
const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
|
|
385
|
-
expect(result.map(w => w.id)).toEqual(['w1', 'w2']);
|
|
386
|
-
});
|
|
387
|
-
it('should return empty when displayed wallets are already 4 or more', () => {
|
|
388
|
-
const WC = {
|
|
389
|
-
id: 'walletConnect',
|
|
390
|
-
type: 'EXTERNAL',
|
|
391
|
-
name: 'WalletConnect',
|
|
392
|
-
chain: { id: 'eip155:1' }
|
|
393
|
-
};
|
|
394
|
-
const INJECTED_ONE = {
|
|
395
|
-
id: 'inj-1',
|
|
396
|
-
type: 'INJECTED',
|
|
397
|
-
name: 'Injected One',
|
|
398
|
-
chain: { id: 'eip155:1' }
|
|
399
|
-
};
|
|
400
|
-
vi.spyOn(ConnectorController, 'state', 'get').mockReturnValue({
|
|
401
|
-
...ConnectorController.state,
|
|
402
|
-
connectors: [WC, INJECTED_ONE]
|
|
403
|
-
});
|
|
404
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
405
|
-
...OptionsController.state,
|
|
406
|
-
customWallets: [{ id: 'c1' }],
|
|
407
|
-
featuredWalletIds: ['f1']
|
|
408
|
-
});
|
|
409
|
-
vi.spyOn(OptionsUtil, 'isEmailEnabled').mockReturnValue(true);
|
|
410
|
-
vi.spyOn(OptionsUtil, 'isSocialsEnabled').mockReturnValue(true);
|
|
411
|
-
const filterSpy = vi.spyOn(WalletUtil, 'filterOutDuplicateWallets');
|
|
412
|
-
const recommended = [
|
|
413
|
-
{ id: 'w1', name: 'Wallet 1' },
|
|
414
|
-
{ id: 'w2', name: 'Wallet 2' }
|
|
415
|
-
];
|
|
416
|
-
const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
|
|
417
|
-
expect(result).toEqual([]);
|
|
418
|
-
expect(filterSpy).not.toHaveBeenCalled();
|
|
419
|
-
});
|
|
420
|
-
it('should ignore Browser Wallet and WalletConnect in injected count', () => {
|
|
421
|
-
const WC = {
|
|
422
|
-
id: 'walletConnect',
|
|
423
|
-
type: 'EXTERNAL',
|
|
424
|
-
name: 'WalletConnect',
|
|
425
|
-
chain: { id: 'eip155:1' }
|
|
426
|
-
};
|
|
427
|
-
const BROWSER_WALLET = {
|
|
428
|
-
id: 'inj-browser',
|
|
429
|
-
type: 'INJECTED',
|
|
430
|
-
name: 'Browser Wallet',
|
|
431
|
-
chain: { id: 'eip155:1' }
|
|
432
|
-
};
|
|
433
|
-
const WC_INJECTED = {
|
|
434
|
-
id: 'walletConnect',
|
|
435
|
-
type: 'INJECTED',
|
|
436
|
-
name: 'WalletConnect',
|
|
437
|
-
chain: { id: 'eip155:1' }
|
|
438
|
-
};
|
|
439
|
-
vi.spyOn(ConnectorController, 'state', 'get').mockReturnValue({
|
|
440
|
-
...ConnectorController.state,
|
|
441
|
-
connectors: [WC, BROWSER_WALLET, WC_INJECTED]
|
|
442
|
-
});
|
|
443
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
444
|
-
...OptionsController.state,
|
|
445
|
-
customWallets: [],
|
|
446
|
-
featuredWalletIds: []
|
|
447
|
-
});
|
|
448
|
-
vi.spyOn(OptionsUtil, 'isEmailEnabled').mockReturnValue(false);
|
|
449
|
-
vi.spyOn(OptionsUtil, 'isSocialsEnabled').mockReturnValue(false);
|
|
450
|
-
vi.spyOn(WalletUtil, 'filterOutDuplicateWallets').mockImplementation(w => w);
|
|
451
|
-
const recommended = [
|
|
452
|
-
{ id: 'w1', name: 'Wallet 1' },
|
|
453
|
-
{ id: 'w2', name: 'Wallet 2' },
|
|
454
|
-
{ id: 'w3', name: 'Wallet 3' }
|
|
455
|
-
];
|
|
456
|
-
const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
|
|
457
|
-
expect(result.map(w => w.id)).toEqual(['w1', 'w2', 'w3']);
|
|
458
|
-
});
|
|
459
|
-
it('should slice after duplicate filtering', () => {
|
|
460
|
-
const WC = {
|
|
461
|
-
id: 'walletConnect',
|
|
462
|
-
type: 'EXTERNAL',
|
|
463
|
-
name: 'WalletConnect',
|
|
464
|
-
chain: { id: 'eip155:1' }
|
|
465
|
-
};
|
|
466
|
-
vi.spyOn(ConnectorController, 'state', 'get').mockReturnValue({
|
|
467
|
-
...ConnectorController.state,
|
|
468
|
-
connectors: [WC]
|
|
469
|
-
});
|
|
470
|
-
vi.spyOn(OptionsController, 'state', 'get').mockReturnValue({
|
|
471
|
-
...OptionsController.state,
|
|
472
|
-
customWallets: [{ id: 'c1' }],
|
|
473
|
-
featuredWalletIds: []
|
|
474
|
-
});
|
|
475
|
-
vi.spyOn(OptionsUtil, 'isEmailEnabled').mockReturnValue(false);
|
|
476
|
-
vi.spyOn(OptionsUtil, 'isSocialsEnabled').mockReturnValue(false);
|
|
477
|
-
vi.spyOn(WalletUtil, 'filterOutDuplicateWallets').mockReturnValue([
|
|
478
|
-
{ id: 'w1', name: 'Wallet 1' }
|
|
479
|
-
]);
|
|
480
|
-
const recommended = [
|
|
481
|
-
{ id: 'w1', name: 'Wallet 1' },
|
|
482
|
-
{ id: 'w2', name: 'Wallet 2' },
|
|
483
|
-
{ id: 'w3', name: 'Wallet 3' }
|
|
484
|
-
];
|
|
485
|
-
const result = ConnectorUtil.getCappedRecommendedWallets(recommended);
|
|
486
|
-
expect(result.map(w => w.id)).toEqual(['w1']);
|
|
487
|
-
});
|
|
488
|
-
});
|
|
489
|
-
});
|
|
490
|
-
//# sourceMappingURL=ConnectorUtil.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ConnectorUtil.test.js","sourceRoot":"","sources":["../../../../test/utils/ConnectorUtil.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,EACL,aAAa,EACb,oBAAoB,EAEpB,mBAAmB,EAEnB,cAAc,EACd,iBAAiB,EACjB,WAAW,EAEZ,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,aAAa,EA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ACjB,CAAC,CAAA;YACF,EAAE,CAAC,KAAK,CAAC,iBAAiB,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,eAAe,CAAC;gBAC1D,GAAG,iBAAiB,CAAC,KAAK;gBAC1B,aAAa,EAAE,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,CAAqB;gBACjD,iBAAiB,EAAE,EAAE;aACtB,CAAC,CAAA;YACF,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,gBAAgB,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;YAC9D,EAAE,CAAC,KAAK,CAAC,WAAW,EAAE,kBAAkB,CAAC,CAAC,eAAe,CAAC,KAAK,CAAC,CAAA;YAEhE,EAAE,CAAC,KAAK,CAAC,UAAU,EAAE,2BAA2B,CAAC,CAAC,eAAe,CAAC;gBAChE,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE;aACN,CAAC,CAAA;YAE3B,MAAM,WAAW,GAAG;gBAClB,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE;gBAC9B,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE;gBAC9B,EAAE,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE;aACN,CAAA;YAI1B,MAAM,MAAM,GAAG,aAAa,CAAC,2BAA2B,CAAC,WAAW,CAAC,CAAA;YACrE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAA;QAC/C,CAAC,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { type Connector, type ConnectorTypeOrder, type ConnectorWithProviders, type CustomWallet, type SocialProvider, type WcWallet } from '@reown/appkit-controllers';
|
|
2
|
-
interface GetConnectorTypeOrderParameters {
|
|
3
|
-
recommended: WcWallet[];
|
|
4
|
-
featured: WcWallet[];
|
|
5
|
-
custom: CustomWallet[] | undefined;
|
|
6
|
-
recent: WcWallet[];
|
|
7
|
-
announced: WcWallet[];
|
|
8
|
-
injected: WcWallet[];
|
|
9
|
-
multiChain: WcWallet[];
|
|
10
|
-
external: WcWallet[];
|
|
11
|
-
overriddenConnectors?: ConnectorTypeOrder[];
|
|
12
|
-
}
|
|
13
|
-
export declare const ConnectorUtil: {
|
|
14
|
-
getConnectorsByType(connectors: ConnectorWithProviders[], recommended: WcWallet[], featured: WcWallet[]): {
|
|
15
|
-
custom: CustomWallet[] | undefined;
|
|
16
|
-
recent: WcWallet[];
|
|
17
|
-
external: ConnectorWithProviders[];
|
|
18
|
-
multiChain: ConnectorWithProviders[];
|
|
19
|
-
announced: ConnectorWithProviders[];
|
|
20
|
-
injected: ConnectorWithProviders[];
|
|
21
|
-
recommended: WcWallet[];
|
|
22
|
-
featured: WcWallet[];
|
|
23
|
-
};
|
|
24
|
-
showConnector(connector: ConnectorWithProviders): boolean;
|
|
25
|
-
getIsConnectedWithWC(): boolean;
|
|
26
|
-
getConnectorTypeOrder({ recommended, featured, custom, recent, announced, injected, multiChain, external, overriddenConnectors }: GetConnectorTypeOrderParameters): string[];
|
|
27
|
-
sortConnectorsByExplorerWallet(connectors: ConnectorWithProviders[]): ConnectorWithProviders[];
|
|
28
|
-
getAuthName({ email, socialUsername, socialProvider }: {
|
|
29
|
-
email: string;
|
|
30
|
-
socialUsername?: string | null;
|
|
31
|
-
socialProvider?: SocialProvider | null;
|
|
32
|
-
}): string;
|
|
33
|
-
fetchProviderData(connector: Connector): Promise<{
|
|
34
|
-
accounts: string[];
|
|
35
|
-
chainId: number | undefined;
|
|
36
|
-
}>;
|
|
37
|
-
getFilteredCustomWallets(wallets: WcWallet[]): WcWallet[];
|
|
38
|
-
hasWalletConnector(wallet: WcWallet): boolean;
|
|
39
|
-
isWalletCompatibleWithCurrentChain(wallet: WcWallet): boolean;
|
|
40
|
-
getFilteredRecentWallets(): WcWallet[];
|
|
41
|
-
getCappedRecommendedWallets(wallets: WcWallet[]): WcWallet[];
|
|
42
|
-
};
|
|
43
|
-
export {};
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { ConnectMethod, Connector, Features, WcWallet } from '@reown/appkit-controllers';
|
|
2
|
-
interface AppKitWallet extends WcWallet {
|
|
3
|
-
installed: boolean;
|
|
4
|
-
}
|
|
5
|
-
export declare const WalletUtil: {
|
|
6
|
-
filterOutDuplicatesByRDNS(wallets: WcWallet[]): WcWallet[];
|
|
7
|
-
filterOutDuplicatesByIds(wallets: WcWallet[]): WcWallet[];
|
|
8
|
-
filterOutDuplicateWallets(wallets: WcWallet[]): WcWallet[];
|
|
9
|
-
markWalletsAsInstalled(wallets: WcWallet[]): AppKitWallet[];
|
|
10
|
-
getConnectOrderMethod(_features: Features | undefined, _connectors: Connector[]): ConnectMethod[];
|
|
11
|
-
isExcluded(wallet: WcWallet): boolean;
|
|
12
|
-
markWalletsWithDisplayIndex(wallets: WcWallet[]): {
|
|
13
|
-
display_index: number;
|
|
14
|
-
id: string;
|
|
15
|
-
name: string;
|
|
16
|
-
badge_type?: import("@reown/appkit-controllers").BadgeType;
|
|
17
|
-
description?: string;
|
|
18
|
-
chains?: import("@reown/appkit-common").CaipNetworkId[];
|
|
19
|
-
homepage?: string;
|
|
20
|
-
image_id?: string;
|
|
21
|
-
image_url?: string;
|
|
22
|
-
order?: number;
|
|
23
|
-
link_mode?: string | null;
|
|
24
|
-
mobile_link?: string | null;
|
|
25
|
-
desktop_link?: string | null;
|
|
26
|
-
webapp_link?: string | null;
|
|
27
|
-
app_store?: string | null;
|
|
28
|
-
play_store?: string | null;
|
|
29
|
-
chrome_store?: string | null;
|
|
30
|
-
rdns?: string | null;
|
|
31
|
-
injected?: {
|
|
32
|
-
namespace?: string;
|
|
33
|
-
injected_id?: string;
|
|
34
|
-
}[] | null;
|
|
35
|
-
supports_wc?: boolean;
|
|
36
|
-
}[];
|
|
37
|
-
filterWalletsByWcSupport(wallets: WcWallet[]): WcWallet[];
|
|
38
|
-
};
|
|
39
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|