@exodus/assets-feature 8.2.0 → 8.4.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 CHANGED
@@ -3,6 +3,20 @@
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
+ ## [8.4.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@8.3.0...@exodus/assets-feature@8.4.0) (2025-08-18)
7
+
8
+ ### Features
9
+
10
+ - feat: multisigDataIndex in address-provider (#13331)
11
+
12
+ ## [8.3.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@8.2.0...@exodus/assets-feature@8.3.0) (2025-08-11)
13
+
14
+ ### Features
15
+
16
+ - feat(assets-feature): filter invalid fetched tokens (#13532)
17
+
18
+ - feat(assets-feature): paginate fetch tokens call (#13533)
19
+
6
20
  ## [8.2.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@8.1.3...@exodus/assets-feature@8.2.0) (2025-08-07)
7
21
 
8
22
  ### Features
@@ -17,6 +17,7 @@ class AssetClientInterface {
17
17
  #publicKeyProvider
18
18
  #transactionSigner
19
19
  #walletAccountsAtom
20
+ #multisigAtom
20
21
 
21
22
  constructor({
22
23
  addressProvider,
@@ -31,6 +32,7 @@ class AssetClientInterface {
31
32
  publicKeyProvider,
32
33
  transactionSigner,
33
34
  walletAccountsAtom,
35
+ multisigAtom,
34
36
  }) {
35
37
  this.#addressProvider = addressProvider
36
38
  this.#assetsModule = assetsModule
@@ -44,6 +46,7 @@ class AssetClientInterface {
44
46
  this.#publicKeyProvider = publicKeyProvider
45
47
  this.#transactionSigner = transactionSigner
46
48
  this.#walletAccountsAtom = walletAccountsAtom
49
+ this.#multisigAtom = multisigAtom
47
50
 
48
51
  assetsModule.initialize({ assetClientInterface: this })
49
52
  }
@@ -186,6 +189,11 @@ class AssetClientInterface {
186
189
  out.multiAddressMode = multiAddressMode
187
190
  }
188
191
 
192
+ if (this.#multisigAtom) {
193
+ const multisigWallets = await this.#multisigAtom.get()
194
+ out.multisigDataLength = multisigWallets[walletAccount]?.data?.length
195
+ }
196
+
189
197
  return out
190
198
  }
191
199
 
package/client/index.js CHANGED
@@ -18,6 +18,7 @@ const assetsClientInterfaceDefinition = {
18
18
  'transactionSigner',
19
19
  'wallet',
20
20
  'walletAccountsAtom',
21
+ 'multisigAtom?',
21
22
  ],
22
23
  public: true,
23
24
  }
@@ -13,6 +13,7 @@ import {
13
13
  CT_FETCH_CACHE_EXPIRY,
14
14
  CT_TIMESTAMP_KEY,
15
15
  CT_UPDATE_INTERVAL,
16
+ CTR_TOKENS_LIMIT,
16
17
  } from './constants.js'
17
18
  import {
18
19
  filterBuiltInProps,
@@ -25,7 +26,7 @@ import { validateCustomToken, isValidCustomToken } from '@exodus/asset-schema-va
25
26
  import makeConcurrent from 'make-concurrent'
26
27
  import oldToNewStyleTokenNames from '@exodus/asset-legacy-token-name-mapping'
27
28
 
28
- const { get, isEmpty, once, uniq } = lodash
29
+ const { get, isEmpty, once, uniq, chunk } = lodash
29
30
 
30
31
  const getFetchCacheKey = (baseAssetName, assetId) => `${assetId}-${baseAssetName}`
31
32
 
@@ -258,20 +259,23 @@ export class AssetsModule {
258
259
  'tokens'
259
260
  )
260
261
 
262
+ let validTokens = []
261
263
  if (this.#shouldValidateCustomToken) {
262
264
  for (const token of _tokens) {
263
265
  try {
264
266
  validateCustomToken(token)
267
+ validTokens.push(token)
265
268
  } catch (e) {
266
269
  this.#logger.warn(
267
270
  `Token did not pass validation ${token.baseAssetName} ${token.assetId}. Error: ${e.message}`
268
271
  )
269
- throw new Error('Token did not pass validation')
270
272
  }
271
273
  }
274
+ } else {
275
+ validTokens = _tokens
272
276
  }
273
277
 
274
- const tokens = _tokens.map((token) => normalizeToken(token))
278
+ const tokens = validTokens.map((token) => normalizeToken(token))
275
279
 
276
280
  try {
277
281
  await this.#iconsStorage.storeIcons(tokens)
@@ -293,8 +297,16 @@ export class AssetsModule {
293
297
  return { builtInTokens, customTokens }
294
298
  }
295
299
 
296
- fetchTokens = async (assetIds) => {
297
- const { builtInTokens, customTokens } = await this.#fetchTokens(assetIds)
300
+ fetchTokens = async (assetDescriptors) => {
301
+ const pages = chunk(assetDescriptors, CTR_TOKENS_LIMIT)
302
+
303
+ const builtInTokens = []
304
+ const customTokens = []
305
+ for (const page of pages) {
306
+ const tokens = await this.#fetchTokens(page)
307
+ builtInTokens.push(...tokens.builtInTokens)
308
+ customTokens.push(...tokens.customTokens)
309
+ }
298
310
 
299
311
  const builtInAssets = builtInTokens.map(({ name }) => this.getAsset(name))
300
312
  const customTokenAssets = customTokens.map((definition) => {
@@ -4,3 +4,4 @@ export const CT_DATA_KEY = 'customTokens'
4
4
  export const CT_TIMESTAMP_KEY = 'customTokensLastUpdate'
5
5
  export const CT_UPDATE_INTERVAL = ms('8h')
6
6
  export const CT_FETCH_CACHE_EXPIRY = ms('1h')
7
+ export const CTR_TOKENS_LIMIT = 50
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/assets-feature",
3
- "version": "8.2.0",
3
+ "version": "8.4.0",
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",
@@ -68,12 +68,12 @@
68
68
  "@exodus/fusion-local": "^2.1.0",
69
69
  "@exodus/keychain": "^7.3.0",
70
70
  "@exodus/logger": "^1.2.3",
71
- "@exodus/models": "^12.15.0",
71
+ "@exodus/models": "^12.16.0",
72
72
  "@exodus/osmosis-plugin": "^1.3.3",
73
73
  "@exodus/public-key-provider": "^4.2.0",
74
- "@exodus/redux-dependency-injection": "^4.1.1",
74
+ "@exodus/redux-dependency-injection": "^4.1.2",
75
75
  "@exodus/storage-memory": "^2.3.0",
76
- "@exodus/wallet-accounts": "^17.6.2",
76
+ "@exodus/wallet-accounts": "^18.0.0",
77
77
  "@exodus/wild-emitter": "^1.0.0",
78
78
  "events": "^3.3.0",
79
79
  "msw": "^2.0.0",
@@ -82,5 +82,5 @@
82
82
  "publishConfig": {
83
83
  "access": "public"
84
84
  },
85
- "gitHead": "fb7a01b2e840d775c17311f1bc4e87f465a98816"
85
+ "gitHead": "b8d308870cb99b2eee6b6a1ccf5240eb2b228a1e"
86
86
  }