@exodus/assets-feature 9.2.4 → 9.2.6
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,18 @@
|
|
|
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.6](https://github.com/ExodusMovement/exodus/compare/@exodus/assets-feature@9.2.5...@exodus/assets-feature@9.2.6) (2026-07-30)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **accounts:** restrict delegated account monitoring ([#42728](https://github.com/ExodusMovement/exodus/issues/42728)) ([d61617f](https://github.com/ExodusMovement/exodus/commit/d61617f04013ffa8ecfa9aaf0ea2be61d76099cd))
|
|
11
|
+
|
|
12
|
+
## [9.2.5](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@9.2.4...@exodus/assets-feature@9.2.5) (2026-07-01)
|
|
13
|
+
|
|
14
|
+
### Performance
|
|
15
|
+
|
|
16
|
+
- perf(assets-feature): make search-based asset loading non-blocking (#17431)
|
|
17
|
+
|
|
6
18
|
## [9.2.4](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@9.2.3...@exodus/assets-feature@9.2.4) (2026-06-26)
|
|
7
19
|
|
|
8
20
|
### Bug Fixes
|
|
@@ -1,15 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
// eslint-disable-next-line no-restricted-imports -- TODO: Fix this the next time the file is edited.
|
|
3
|
-
import lodash from 'lodash'
|
|
1
|
+
import { filterAsync, pickBy } from '@exodus/basic-utils'
|
|
4
2
|
import assert from 'minimalistic-assert'
|
|
5
3
|
|
|
6
|
-
const { isEmpty } = lodash
|
|
7
|
-
|
|
8
4
|
class AssetClientInterface {
|
|
9
5
|
#addressProvider
|
|
10
6
|
#assetsModule
|
|
11
7
|
#assetSources
|
|
12
8
|
#availableAssetNamesAtom
|
|
9
|
+
#availableAssetNamesByWalletAccountAtom
|
|
13
10
|
#blockchainMetadata
|
|
14
11
|
#config
|
|
15
12
|
#createLogger
|
|
@@ -26,6 +23,7 @@ class AssetClientInterface {
|
|
|
26
23
|
assetsModule,
|
|
27
24
|
assetSources,
|
|
28
25
|
availableAssetNamesAtom,
|
|
26
|
+
availableAssetNamesByWalletAccountAtom,
|
|
29
27
|
blockchainMetadata,
|
|
30
28
|
createLogger,
|
|
31
29
|
config,
|
|
@@ -40,6 +38,7 @@ class AssetClientInterface {
|
|
|
40
38
|
this.#assetsModule = assetsModule
|
|
41
39
|
this.#assetSources = assetSources
|
|
42
40
|
this.#availableAssetNamesAtom = availableAssetNamesAtom
|
|
41
|
+
this.#availableAssetNamesByWalletAccountAtom = availableAssetNamesByWalletAccountAtom
|
|
43
42
|
this.#blockchainMetadata = blockchainMetadata
|
|
44
43
|
this.#config = config
|
|
45
44
|
this.#createLogger = createLogger || (() => console)
|
|
@@ -131,11 +130,11 @@ class AssetClientInterface {
|
|
|
131
130
|
}
|
|
132
131
|
|
|
133
132
|
// merge mem to keep the previous accountMem behavior
|
|
134
|
-
if (
|
|
133
|
+
if (Object.keys(newData?.mem ?? {}).length > 0 && (!accountState || accountState.mem)) {
|
|
135
134
|
newData = { ...newData, mem: { ...accountState?.mem, ...newData.mem } }
|
|
136
135
|
}
|
|
137
136
|
|
|
138
|
-
if (
|
|
137
|
+
if (Object.keys(newData ?? {}).length > 0) {
|
|
139
138
|
return batch.updateAccountState({ assetName, walletAccount, newData })
|
|
140
139
|
}
|
|
141
140
|
|
|
@@ -149,7 +148,13 @@ class AssetClientInterface {
|
|
|
149
148
|
const asset = this.#assetsModule.getAsset(assetName)
|
|
150
149
|
assert(asset, `${assetName} is not supported`)
|
|
151
150
|
const enabledWalletAccounts = await this.#enabledWalletAccountsAtom.get()
|
|
152
|
-
|
|
151
|
+
const availableAssetNamesByWalletAccount =
|
|
152
|
+
await this.#availableAssetNamesByWalletAccountAtom.get()
|
|
153
|
+
const supportedWalletAccounts = Object.keys(enabledWalletAccounts).filter((walletAccount) =>
|
|
154
|
+
availableAssetNamesByWalletAccount[walletAccount]?.includes(assetName)
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
return filterAsync(supportedWalletAccounts, async (walletAccount) => {
|
|
153
158
|
try {
|
|
154
159
|
// hardware wallet account may not support coin, to check this get address
|
|
155
160
|
await this.getReceiveAddress({ assetName, walletAccount, useCache: true })
|
package/client/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/assets-feature",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.6",
|
|
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",
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
"README.md",
|
|
27
27
|
"!**/__tests__/**"
|
|
28
28
|
],
|
|
29
|
-
"homepage": "https://github.com/ExodusMovement/exodus
|
|
29
|
+
"homepage": "https://github.com/ExodusMovement/exodus/tree/master/libs/features/assets-feature",
|
|
30
30
|
"bugs": {
|
|
31
|
-
"url": "https://github.com/ExodusMovement/exodus
|
|
31
|
+
"url": "https://github.com/ExodusMovement/exodus/issues?q=is%3Aissue+is%3Aopen+label%3Aassets-feature"
|
|
32
32
|
},
|
|
33
33
|
"repository": {
|
|
34
34
|
"type": "git",
|
|
35
|
-
"url": "git+https://github.com/ExodusMovement/exodus
|
|
35
|
+
"url": "git+https://github.com/ExodusMovement/exodus.git"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
38
|
"@exodus/asset-legacy-token-name-mapping": "^1.4.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@exodus/public-key-provider": "^4.3.1",
|
|
76
76
|
"@exodus/redux-dependency-injection": "^5.0.0",
|
|
77
77
|
"@exodus/storage-memory": "^2.4.0",
|
|
78
|
-
"@exodus/wallet-accounts": "^20.4.
|
|
78
|
+
"@exodus/wallet-accounts": "^20.4.10",
|
|
79
79
|
"@exodus/wild-emitter": "^1.0.0",
|
|
80
80
|
"events": "^3.3.0",
|
|
81
81
|
"msw": "^2.0.0",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"access": "public",
|
|
86
86
|
"provenance": false
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "07897763e7cbfa9cf251bd7c436537e059c9fbab"
|
|
89
89
|
}
|
|
@@ -83,13 +83,20 @@ const createSearchBasedAssetLoaderPlugin = ({
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
const
|
|
86
|
+
const loadAllSearches = async () => {
|
|
87
87
|
const loadedSearches = await getLoadedSearches()
|
|
88
88
|
for (const searchConfig of searches) {
|
|
89
89
|
await loadTokensForSearch(searchConfig, loadedSearches)
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
|
|
93
|
+
// Fire-and-forget: token loading makes a series of network calls that must not block app startup.
|
|
94
|
+
const onLoad = () => {
|
|
95
|
+
loadAllSearches().catch((error) => {
|
|
96
|
+
logger.error('Failed to load searches:', error.message, error)
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
|
|
93
100
|
const onClear = async () => {
|
|
94
101
|
await storage.delete(STORAGE_KEY)
|
|
95
102
|
}
|