@exodus/assets-feature 9.2.0 → 9.2.1
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 +4 -0
- package/module/assets-module.js +15 -28
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [9.2.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@9.2.0...@exodus/assets-feature@9.2.1) (2026-04-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @exodus/assets-feature
|
|
9
|
+
|
|
6
10
|
## [9.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@9.1.0...@exodus/assets-feature@9.2.0) (2026-04-15)
|
|
7
11
|
|
|
8
12
|
### Features
|
package/module/assets-module.js
CHANGED
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
isDisabledCustomToken,
|
|
24
24
|
} from './utils.js'
|
|
25
25
|
import createFetchival from '@exodus/fetch/create-fetchival'
|
|
26
|
-
import { validateCustomToken
|
|
26
|
+
import { validateCustomToken } from '@exodus/asset-schema-validation'
|
|
27
27
|
import makeConcurrent from 'make-concurrent'
|
|
28
28
|
import oldToNewStyleTokenNames from '@exodus/asset-legacy-token-name-mapping'
|
|
29
29
|
|
|
@@ -234,17 +234,10 @@ export class AssetsModule {
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
const _token = await fetchTokenAndCacheError()
|
|
237
|
-
if (this.#
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
this.#logger.warn(
|
|
242
|
-
`Token did not pass validation ${baseAssetName} ${assetId}. Error: ${e.message}`
|
|
243
|
-
)
|
|
244
|
-
const err = new Error('Token did not pass validation')
|
|
245
|
-
this.#setCache(key, { cachedError: err })
|
|
246
|
-
throw err
|
|
247
|
-
}
|
|
237
|
+
if (!this.#isValidCustomToken(_token)) {
|
|
238
|
+
const err = new Error('Token did not pass validation')
|
|
239
|
+
this.#setCache(key, { cachedError: err })
|
|
240
|
+
throw err
|
|
248
241
|
}
|
|
249
242
|
|
|
250
243
|
const token = normalizeToken(_token)
|
|
@@ -277,21 +270,7 @@ export class AssetsModule {
|
|
|
277
270
|
'tokens'
|
|
278
271
|
)
|
|
279
272
|
|
|
280
|
-
|
|
281
|
-
if (this.#shouldValidateCustomToken) {
|
|
282
|
-
for (const token of _tokens) {
|
|
283
|
-
try {
|
|
284
|
-
validateCustomToken(token)
|
|
285
|
-
validTokens.push(token)
|
|
286
|
-
} catch (e) {
|
|
287
|
-
this.#logger.warn(
|
|
288
|
-
`Token did not pass validation ${token.baseAssetName} ${token.assetId}. Error: ${e.message}`
|
|
289
|
-
)
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
} else {
|
|
293
|
-
validTokens = _tokens
|
|
294
|
-
}
|
|
273
|
+
const validTokens = _tokens.filter(this.#isValidCustomToken)
|
|
295
274
|
|
|
296
275
|
const tokens = validTokens.map((token) => normalizeToken(token))
|
|
297
276
|
|
|
@@ -775,7 +754,15 @@ export class AssetsModule {
|
|
|
775
754
|
return true
|
|
776
755
|
}
|
|
777
756
|
|
|
778
|
-
|
|
757
|
+
try {
|
|
758
|
+
validateCustomToken(token)
|
|
759
|
+
return true
|
|
760
|
+
} catch (e) {
|
|
761
|
+
this.#logger.warn(
|
|
762
|
+
`Token ${token.name ?? token.assetName} did not pass validation: ${e.message}`
|
|
763
|
+
)
|
|
764
|
+
return false
|
|
765
|
+
}
|
|
779
766
|
}
|
|
780
767
|
|
|
781
768
|
clear = async () =>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/assets-feature",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "This Exodus SDK feature provides access to instances of all blockchain asset adapters supported by the wallet, and enables you to search for and add custom tokens at runtime.",
|
|
6
6
|
"type": "module",
|
|
@@ -84,5 +84,5 @@
|
|
|
84
84
|
"access": "public",
|
|
85
85
|
"provenance": false
|
|
86
86
|
},
|
|
87
|
-
"gitHead": "
|
|
87
|
+
"gitHead": "9819576371d9361b2710dd8eae2fc6f4ef05d0b9"
|
|
88
88
|
}
|