@exodus/assets-feature 7.4.0 → 7.4.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 CHANGED
@@ -3,6 +3,12 @@
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
+ ## [7.4.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@7.4.0...@exodus/assets-feature@7.4.1) (2025-05-15)
7
+
8
+ ### Bug Fixes
9
+
10
+ - fix: stop assets-feature monitor on stop (#12460)
11
+
6
12
  ## [7.4.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@7.3.0...@exodus/assets-feature@7.4.0) (2025-04-17)
7
13
 
8
14
  ### Features
@@ -118,6 +118,11 @@ class AssetClientInterface {
118
118
  accountState,
119
119
  batch = this.#blockchainMetadata.batch(),
120
120
  }) => {
121
+ const asset = this.#assetsModule.getAsset(assetName)
122
+ if (!asset.baseAsset.api.features.accountState) {
123
+ return batch
124
+ }
125
+
121
126
  // merge mem to keep the previous accountMem behavior
122
127
  if (!isEmpty(newData?.mem) && (!accountState || accountState.mem)) {
123
128
  newData = { ...newData, mem: { ...accountState?.mem, ...newData.mem } }
@@ -166,12 +171,8 @@ class AssetClientInterface {
166
171
  assert(asset, `assetName ${assetName} is not supported`)
167
172
  assert(walletAccountInstance, `walletAccountInstance ${walletAccount} is not available`)
168
173
 
169
- const baseAsset = asset.baseAsset
170
- const out = {
171
- confirmationsNumber: baseAsset.api?.getConfirmationsNumber
172
- ? baseAsset.api.getConfirmationsNumber()
173
- : 1,
174
- }
174
+ const confirmationsNumber = await this.getConfirmationsNumber({ assetName })
175
+ const out = { confirmationsNumber }
175
176
 
176
177
  const gapLimit =
177
178
  this.#config?.compatibilityModeGapLimits?.[walletAccountInstance.compatibilityMode]
@@ -223,12 +224,17 @@ class AssetClientInterface {
223
224
  addressIndex = 0,
224
225
  chainIndex = 0,
225
226
  }) => {
227
+ const [walletAccountInstance, defaultPurpose] = await Promise.all([
228
+ this.#getWalletAccount(walletAccount),
229
+ purpose === undefined
230
+ ? this.#assetSources.getDefaultPurpose({ assetName, walletAccount })
231
+ : undefined,
232
+ ])
226
233
  if (purpose === undefined) {
227
- ;[purpose] = await this.getSupportedPurposes({ assetName, walletAccount })
234
+ purpose = defaultPurpose
228
235
  }
229
236
 
230
237
  const asset = this.#assetsModule.getAsset(assetName)
231
- const walletAccountInstance = await this.#getWalletAccount(walletAccount)
232
238
  const keyIdentifier = asset.baseAsset.api.getKeyIdentifier({
233
239
  purpose,
234
240
  accountIndex: walletAccountInstance.index,
@@ -244,18 +250,18 @@ class AssetClientInterface {
244
250
  }
245
251
 
246
252
  getExtendedPublicKey = async ({ assetName, walletAccount, purpose }) => {
247
- const asset = this.#assetsModule.getAsset(assetName)
248
- const [walletAccountInstance, purposes] = await Promise.all([
253
+ const [walletAccountInstance, defaultPurpose] = await Promise.all([
249
254
  this.#getWalletAccount(walletAccount),
250
255
  purpose === undefined
251
- ? await this.getSupportedPurposes({ assetName, walletAccount })
256
+ ? this.#assetSources.getDefaultPurpose({ assetName, walletAccount })
252
257
  : undefined,
253
258
  ])
254
259
 
255
260
  if (purpose === undefined) {
256
- ;[purpose] = purposes
261
+ purpose = defaultPurpose
257
262
  }
258
263
 
264
+ const asset = this.#assetsModule.getAsset(assetName)
259
265
  const keyIdentifier = asset.baseAsset.api.getKeyIdentifier({
260
266
  purpose,
261
267
  accountIndex: walletAccountInstance.index,
@@ -322,7 +328,7 @@ class AssetClientInterface {
322
328
  })
323
329
  }
324
330
 
325
- saveUnusedAddressIndexes = async () => {
331
+ saveUnusedAddressIndexes = async ({ assetName, walletAccount, changedUnusedAddressIndexes }) => {
326
332
  // no op!! getUnusedAddressIndexes loads from tx log, not from storage
327
333
  }
328
334
 
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@exodus/assets-feature",
3
- "version": "7.4.0",
3
+ "version": "7.4.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",
7
7
  "main": "index.js",
8
8
  "author": "Exodus Movement, Inc.",
9
9
  "scripts": {
10
- "test": "run -T exodus-test --jest --esbuild",
10
+ "test": "run -T exodus-test --jest",
11
11
  "lint": "run -T eslint .",
12
12
  "lint:fix": "yarn lint --fix"
13
13
  },
@@ -65,12 +65,12 @@
65
65
  "@exodus/fusion-local": "^2.1.0",
66
66
  "@exodus/keychain": "^7.3.0",
67
67
  "@exodus/logger": "^1.2.3",
68
- "@exodus/models": "^12.8.2",
68
+ "@exodus/models": "^12.12.0",
69
69
  "@exodus/osmosis-plugin": "^1.3.3",
70
70
  "@exodus/public-key-provider": "^4.1.1",
71
71
  "@exodus/redux-dependency-injection": "^4.1.1",
72
72
  "@exodus/storage-memory": "^2.2.2",
73
- "@exodus/wallet-accounts": "^17.5.1",
73
+ "@exodus/wallet-accounts": "^17.5.2",
74
74
  "@exodus/wild-emitter": "^1.0.0",
75
75
  "bip39": "^3.1.0",
76
76
  "events": "^3.3.0",
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "05dfc1fd50441f5b6513eef369476167c3b02c57"
83
+ "gitHead": "45dd4907f5d65078978854be2eb397e479730c85"
84
84
  }
package/plugin/index.js CHANGED
@@ -80,6 +80,7 @@ const createAssetsPlugin = ({
80
80
  const onStop = () => {
81
81
  observers.forEach((observer) => observer.unregister())
82
82
  subscribers.forEach((unsubscribe) => unsubscribe())
83
+ customTokensMonitor?.stop()
83
84
  }
84
85
 
85
86
  const onClear = async () => {