@reown/appkit-core-react-native 0.0.0-feat-multichain-20250925184834 → 0.0.0-feat-multichain-20250930155416
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/lib/commonjs/controllers/ApiController.js +19 -8
- package/lib/commonjs/controllers/ApiController.js.map +1 -1
- package/lib/commonjs/controllers/BlockchainApiController.js +31 -28
- package/lib/commonjs/controllers/BlockchainApiController.js.map +1 -1
- package/lib/commonjs/controllers/ConnectionsController.js +5 -0
- package/lib/commonjs/controllers/ConnectionsController.js.map +1 -1
- package/lib/commonjs/controllers/EnsController.js +2 -0
- package/lib/commonjs/controllers/EnsController.js.map +1 -1
- package/lib/commonjs/controllers/EventsController.js +1 -0
- package/lib/commonjs/controllers/EventsController.js.map +1 -1
- package/lib/commonjs/controllers/LogController.js +189 -0
- package/lib/commonjs/controllers/LogController.js.map +1 -0
- package/lib/commonjs/controllers/OnRampController.js +14 -0
- package/lib/commonjs/controllers/OnRampController.js.map +1 -1
- package/lib/commonjs/controllers/SendController.js +2 -0
- package/lib/commonjs/controllers/SendController.js.map +1 -1
- package/lib/commonjs/controllers/SwapController.js +8 -0
- package/lib/commonjs/controllers/SwapController.js.map +1 -1
- package/lib/commonjs/controllers/TransactionsController.js +2 -0
- package/lib/commonjs/controllers/TransactionsController.js.map +1 -1
- package/lib/commonjs/features/reown-authentication/ReownAuthentication.js +14 -6
- package/lib/commonjs/features/reown-authentication/ReownAuthentication.js.map +1 -1
- package/lib/commonjs/index.js +14 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/ApiUtil.js +1 -1
- package/lib/commonjs/utils/ApiUtil.js.map +1 -1
- package/lib/commonjs/utils/CoreHelperUtil.js.map +1 -1
- package/lib/commonjs/utils/FetchUtil.js +7 -2
- package/lib/commonjs/utils/FetchUtil.js.map +1 -1
- package/lib/commonjs/utils/LogUtils.js +131 -0
- package/lib/commonjs/utils/LogUtils.js.map +1 -0
- package/lib/commonjs/utils/StorageUtil.js +48 -49
- package/lib/commonjs/utils/StorageUtil.js.map +1 -1
- package/lib/module/controllers/ApiController.js +19 -8
- package/lib/module/controllers/ApiController.js.map +1 -1
- package/lib/module/controllers/BlockchainApiController.js +31 -28
- package/lib/module/controllers/BlockchainApiController.js.map +1 -1
- package/lib/module/controllers/ConnectionsController.js +5 -0
- package/lib/module/controllers/ConnectionsController.js.map +1 -1
- package/lib/module/controllers/EnsController.js +2 -0
- package/lib/module/controllers/EnsController.js.map +1 -1
- package/lib/module/controllers/EventsController.js +1 -0
- package/lib/module/controllers/EventsController.js.map +1 -1
- package/lib/module/controllers/LogController.js +186 -0
- package/lib/module/controllers/LogController.js.map +1 -0
- package/lib/module/controllers/OnRampController.js +14 -0
- package/lib/module/controllers/OnRampController.js.map +1 -1
- package/lib/module/controllers/SendController.js +2 -0
- package/lib/module/controllers/SendController.js.map +1 -1
- package/lib/module/controllers/SwapController.js +8 -0
- package/lib/module/controllers/SwapController.js.map +1 -1
- package/lib/module/controllers/TransactionsController.js +2 -0
- package/lib/module/controllers/TransactionsController.js.map +1 -1
- package/lib/module/features/reown-authentication/ReownAuthentication.js +14 -6
- package/lib/module/features/reown-authentication/ReownAuthentication.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/ApiUtil.js +1 -1
- package/lib/module/utils/ApiUtil.js.map +1 -1
- package/lib/module/utils/CoreHelperUtil.js.map +1 -1
- package/lib/module/utils/FetchUtil.js +8 -2
- package/lib/module/utils/FetchUtil.js.map +1 -1
- package/lib/module/utils/LogUtils.js +121 -0
- package/lib/module/utils/LogUtils.js.map +1 -0
- package/lib/module/utils/StorageUtil.js +48 -49
- package/lib/module/utils/StorageUtil.js.map +1 -1
- package/lib/typescript/controllers/ApiController.d.ts +6 -4
- package/lib/typescript/controllers/ApiController.d.ts.map +1 -1
- package/lib/typescript/controllers/BlockchainApiController.d.ts.map +1 -1
- package/lib/typescript/controllers/ConnectionsController.d.ts.map +1 -1
- package/lib/typescript/controllers/EnsController.d.ts.map +1 -1
- package/lib/typescript/controllers/EventsController.d.ts.map +1 -1
- package/lib/typescript/controllers/LogController.d.ts +69 -0
- package/lib/typescript/controllers/LogController.d.ts.map +1 -0
- package/lib/typescript/controllers/OnRampController.d.ts.map +1 -1
- package/lib/typescript/controllers/SendController.d.ts.map +1 -1
- package/lib/typescript/controllers/SwapController.d.ts.map +1 -1
- package/lib/typescript/controllers/TransactionsController.d.ts.map +1 -1
- package/lib/typescript/features/reown-authentication/ReownAuthentication.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/ApiUtil.d.ts +1 -1
- package/lib/typescript/utils/CoreHelperUtil.d.ts +1 -1
- package/lib/typescript/utils/CoreHelperUtil.d.ts.map +1 -1
- package/lib/typescript/utils/FetchUtil.d.ts +1 -1
- package/lib/typescript/utils/FetchUtil.d.ts.map +1 -1
- package/lib/typescript/utils/LogUtils.d.ts +15 -0
- package/lib/typescript/utils/LogUtils.d.ts.map +1 -0
- package/lib/typescript/utils/StorageUtil.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/controllers/ApiController.ts +28 -8
- package/src/controllers/BlockchainApiController.ts +39 -29
- package/src/controllers/ConnectionsController.ts +5 -0
- package/src/controllers/EnsController.ts +2 -0
- package/src/controllers/EventsController.ts +1 -0
- package/src/controllers/LogController.ts +253 -0
- package/src/controllers/OnRampController.ts +12 -0
- package/src/controllers/SendController.ts +2 -0
- package/src/controllers/SwapController.ts +8 -0
- package/src/controllers/TransactionsController.ts +2 -0
- package/src/features/reown-authentication/ReownAuthentication.ts +11 -6
- package/src/index.ts +8 -0
- package/src/utils/ApiUtil.ts +1 -1
- package/src/utils/CoreHelperUtil.ts +1 -1
- package/src/utils/FetchUtil.ts +11 -2
- package/src/utils/LogUtils.ts +179 -0
- package/src/utils/StorageUtil.ts +48 -49
package/src/utils/StorageUtil.ts
CHANGED
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
SafeStorageKeys
|
|
14
14
|
} from '@reown/appkit-common-react-native';
|
|
15
15
|
import { OptionsController } from '../controllers/OptionsController';
|
|
16
|
+
import { LogController } from '../controllers/LogController';
|
|
16
17
|
|
|
17
18
|
// -- Utility -----------------------------------------------------------------
|
|
18
19
|
export const StorageUtil = {
|
|
@@ -22,8 +23,8 @@ export const StorageUtil = {
|
|
|
22
23
|
href,
|
|
23
24
|
name
|
|
24
25
|
});
|
|
25
|
-
} catch {
|
|
26
|
-
|
|
26
|
+
} catch (error) {
|
|
27
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setWalletConnectDeepLink');
|
|
27
28
|
}
|
|
28
29
|
},
|
|
29
30
|
|
|
@@ -35,8 +36,8 @@ export const StorageUtil = {
|
|
|
35
36
|
if (deepLink) {
|
|
36
37
|
return deepLink;
|
|
37
38
|
}
|
|
38
|
-
} catch {
|
|
39
|
-
|
|
39
|
+
} catch (error) {
|
|
40
|
+
LogController.sendError(error, 'StorageUtil.ts', 'getWalletConnectDeepLink');
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
return undefined;
|
|
@@ -45,8 +46,8 @@ export const StorageUtil = {
|
|
|
45
46
|
async removeWalletConnectDeepLink() {
|
|
46
47
|
try {
|
|
47
48
|
await OptionsController.getStorage().removeItem(SafeStorageKeys.WC_DEEPLINK);
|
|
48
|
-
} catch {
|
|
49
|
-
|
|
49
|
+
} catch (error) {
|
|
50
|
+
LogController.sendError(error, 'StorageUtil.ts', 'removeWalletConnectDeepLink');
|
|
50
51
|
}
|
|
51
52
|
},
|
|
52
53
|
|
|
@@ -66,8 +67,8 @@ export const StorageUtil = {
|
|
|
66
67
|
OptionsController.getStorage().setItem(SafeStorageKeys.RECENT_WALLET, recentWallets);
|
|
67
68
|
|
|
68
69
|
return recentWallets;
|
|
69
|
-
} catch {
|
|
70
|
-
|
|
70
|
+
} catch (error) {
|
|
71
|
+
LogController.sendError(error, 'StorageUtil.ts', 'addRecentWallet');
|
|
71
72
|
|
|
72
73
|
return undefined;
|
|
73
74
|
}
|
|
@@ -76,8 +77,8 @@ export const StorageUtil = {
|
|
|
76
77
|
async setRecentWallets(wallets: WcWallet[]) {
|
|
77
78
|
try {
|
|
78
79
|
await OptionsController.getStorage().setItem(SafeStorageKeys.RECENT_WALLET, wallets);
|
|
79
|
-
} catch {
|
|
80
|
-
|
|
80
|
+
} catch (error) {
|
|
81
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setRecentWallets');
|
|
81
82
|
}
|
|
82
83
|
},
|
|
83
84
|
|
|
@@ -86,8 +87,8 @@ export const StorageUtil = {
|
|
|
86
87
|
const recent = await OptionsController.getStorage().getItem(SafeStorageKeys.RECENT_WALLET);
|
|
87
88
|
|
|
88
89
|
return recent ?? [];
|
|
89
|
-
} catch {
|
|
90
|
-
|
|
90
|
+
} catch (error) {
|
|
91
|
+
LogController.sendError(error, 'StorageUtil.ts', 'getRecentWallets');
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
return [];
|
|
@@ -110,8 +111,8 @@ export const StorageUtil = {
|
|
|
110
111
|
updatedConnectors
|
|
111
112
|
);
|
|
112
113
|
}
|
|
113
|
-
} catch {
|
|
114
|
-
|
|
114
|
+
} catch (error) {
|
|
115
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setConnectedConnectors');
|
|
115
116
|
}
|
|
116
117
|
},
|
|
117
118
|
|
|
@@ -123,7 +124,7 @@ export const StorageUtil = {
|
|
|
123
124
|
|
|
124
125
|
return connectors ?? [];
|
|
125
126
|
} catch (err) {
|
|
126
|
-
|
|
127
|
+
LogController.sendError(err, 'StorageUtil.ts', 'getConnectedConnectors');
|
|
127
128
|
}
|
|
128
129
|
|
|
129
130
|
return [];
|
|
@@ -137,8 +138,8 @@ export const StorageUtil = {
|
|
|
137
138
|
SafeStorageKeys.CONNECTED_CONNECTORS,
|
|
138
139
|
updatedConnectors
|
|
139
140
|
);
|
|
140
|
-
} catch {
|
|
141
|
-
|
|
141
|
+
} catch (error) {
|
|
142
|
+
LogController.sendError(error, 'StorageUtil.ts', 'removeConnectedConnectors');
|
|
142
143
|
}
|
|
143
144
|
},
|
|
144
145
|
|
|
@@ -148,8 +149,8 @@ export const StorageUtil = {
|
|
|
148
149
|
SafeStorageKeys.ONRAMP_PREFERRED_COUNTRY,
|
|
149
150
|
country
|
|
150
151
|
);
|
|
151
|
-
} catch {
|
|
152
|
-
|
|
152
|
+
} catch (error) {
|
|
153
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setOnRampPreferredCountry');
|
|
153
154
|
}
|
|
154
155
|
},
|
|
155
156
|
|
|
@@ -173,8 +174,8 @@ export const StorageUtil = {
|
|
|
173
174
|
SafeStorageKeys.ONRAMP_PREFERRED_FIAT_CURRENCY,
|
|
174
175
|
currency
|
|
175
176
|
);
|
|
176
|
-
} catch {
|
|
177
|
-
|
|
177
|
+
} catch (error) {
|
|
178
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setOnRampPreferredFiatCurrency');
|
|
178
179
|
}
|
|
179
180
|
},
|
|
180
181
|
|
|
@@ -185,8 +186,8 @@ export const StorageUtil = {
|
|
|
185
186
|
);
|
|
186
187
|
|
|
187
188
|
return currency ?? undefined;
|
|
188
|
-
} catch {
|
|
189
|
-
|
|
189
|
+
} catch (error) {
|
|
190
|
+
LogController.sendError(error, 'StorageUtil.ts', 'getOnRampPreferredFiatCurrency');
|
|
190
191
|
}
|
|
191
192
|
|
|
192
193
|
return undefined;
|
|
@@ -195,8 +196,8 @@ export const StorageUtil = {
|
|
|
195
196
|
async setOnRampCountries(countries: OnRampCountry[]) {
|
|
196
197
|
try {
|
|
197
198
|
await OptionsController.getStorage().setItem(SafeStorageKeys.ONRAMP_COUNTRIES, countries);
|
|
198
|
-
} catch {
|
|
199
|
-
|
|
199
|
+
} catch (error) {
|
|
200
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setOnRampCountries');
|
|
200
201
|
}
|
|
201
202
|
},
|
|
202
203
|
|
|
@@ -207,8 +208,8 @@ export const StorageUtil = {
|
|
|
207
208
|
);
|
|
208
209
|
|
|
209
210
|
return countries ?? [];
|
|
210
|
-
} catch {
|
|
211
|
-
|
|
211
|
+
} catch (error) {
|
|
212
|
+
LogController.sendError(error, 'StorageUtil.ts', 'getOnRampCountries');
|
|
212
213
|
}
|
|
213
214
|
|
|
214
215
|
return [];
|
|
@@ -222,8 +223,8 @@ export const StorageUtil = {
|
|
|
222
223
|
data: countriesDefaults,
|
|
223
224
|
timestamp
|
|
224
225
|
});
|
|
225
|
-
} catch {
|
|
226
|
-
|
|
226
|
+
} catch (error) {
|
|
227
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setOnRampCountriesDefaults');
|
|
227
228
|
}
|
|
228
229
|
},
|
|
229
230
|
|
|
@@ -245,8 +246,8 @@ export const StorageUtil = {
|
|
|
245
246
|
}
|
|
246
247
|
|
|
247
248
|
return (data as OnRampCountryDefaults[]) ?? [];
|
|
248
|
-
} catch {
|
|
249
|
-
|
|
249
|
+
} catch (error) {
|
|
250
|
+
LogController.sendError(error, 'StorageUtil.ts', 'getOnRampCountriesDefaults');
|
|
250
251
|
}
|
|
251
252
|
|
|
252
253
|
return [];
|
|
@@ -260,8 +261,8 @@ export const StorageUtil = {
|
|
|
260
261
|
data: serviceProviders,
|
|
261
262
|
timestamp
|
|
262
263
|
});
|
|
263
|
-
} catch {
|
|
264
|
-
|
|
264
|
+
} catch (error) {
|
|
265
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setOnRampServiceProviders');
|
|
265
266
|
}
|
|
266
267
|
},
|
|
267
268
|
|
|
@@ -284,8 +285,7 @@ export const StorageUtil = {
|
|
|
284
285
|
|
|
285
286
|
return (data as OnRampServiceProvider[]) ?? [];
|
|
286
287
|
} catch (err) {
|
|
287
|
-
|
|
288
|
-
console.info('Unable to get OnRamp Service Providers');
|
|
288
|
+
LogController.sendError(err, 'StorageUtil.ts', 'getOnRampServiceProviders');
|
|
289
289
|
}
|
|
290
290
|
|
|
291
291
|
return [];
|
|
@@ -299,8 +299,8 @@ export const StorageUtil = {
|
|
|
299
299
|
data: fiatLimits,
|
|
300
300
|
timestamp
|
|
301
301
|
});
|
|
302
|
-
} catch {
|
|
303
|
-
|
|
302
|
+
} catch (error) {
|
|
303
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setOnRampFiatLimits');
|
|
304
304
|
}
|
|
305
305
|
},
|
|
306
306
|
|
|
@@ -322,8 +322,8 @@ export const StorageUtil = {
|
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
return (data as OnRampFiatLimit[]) ?? [];
|
|
325
|
-
} catch {
|
|
326
|
-
|
|
325
|
+
} catch (error) {
|
|
326
|
+
LogController.sendError(error, 'StorageUtil.ts', 'getOnRampFiatLimits');
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
return [];
|
|
@@ -337,8 +337,8 @@ export const StorageUtil = {
|
|
|
337
337
|
data: fiatCurrencies,
|
|
338
338
|
timestamp
|
|
339
339
|
});
|
|
340
|
-
} catch {
|
|
341
|
-
|
|
340
|
+
} catch (error) {
|
|
341
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setOnRampFiatCurrencies');
|
|
342
342
|
}
|
|
343
343
|
},
|
|
344
344
|
|
|
@@ -360,8 +360,8 @@ export const StorageUtil = {
|
|
|
360
360
|
}
|
|
361
361
|
|
|
362
362
|
return (data as OnRampFiatCurrency[]) ?? [];
|
|
363
|
-
} catch {
|
|
364
|
-
|
|
363
|
+
} catch (error) {
|
|
364
|
+
LogController.sendError(error, 'StorageUtil.ts', 'getOnRampFiatCurrencies');
|
|
365
365
|
}
|
|
366
366
|
|
|
367
367
|
return [];
|
|
@@ -376,8 +376,8 @@ export const StorageUtil = {
|
|
|
376
376
|
}
|
|
377
377
|
|
|
378
378
|
await OptionsController.getStorage().setItem(SafeStorageKeys.ACTIVE_NAMESPACE, namespace);
|
|
379
|
-
} catch {
|
|
380
|
-
|
|
379
|
+
} catch (error) {
|
|
380
|
+
LogController.sendError(error, 'StorageUtil.ts', 'setActiveNamespace');
|
|
381
381
|
}
|
|
382
382
|
},
|
|
383
383
|
|
|
@@ -389,8 +389,7 @@ export const StorageUtil = {
|
|
|
389
389
|
|
|
390
390
|
return namespace ?? undefined;
|
|
391
391
|
} catch (err) {
|
|
392
|
-
|
|
393
|
-
console.info('Unable to get Active Namespace');
|
|
392
|
+
LogController.sendError(err, 'StorageUtil.ts', 'getActiveNamespace');
|
|
394
393
|
}
|
|
395
394
|
|
|
396
395
|
return undefined;
|
|
@@ -399,8 +398,8 @@ export const StorageUtil = {
|
|
|
399
398
|
async removeActiveNamespace() {
|
|
400
399
|
try {
|
|
401
400
|
await OptionsController.getStorage().removeItem(SafeStorageKeys.ACTIVE_NAMESPACE);
|
|
402
|
-
} catch {
|
|
403
|
-
|
|
401
|
+
} catch (error) {
|
|
402
|
+
LogController.sendError(error, 'StorageUtil.ts', 'removeActiveNamespace');
|
|
404
403
|
}
|
|
405
404
|
}
|
|
406
405
|
};
|