@exodus/assets-feature 5.11.2 → 5.12.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,16 @@
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
+ ## [5.12.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@5.11.3...@exodus/assets-feature@5.12.0) (2024-09-24)
7
+
8
+ ### Features
9
+
10
+ - allow returning highest unused indexes ([#9498](https://github.com/ExodusMovement/exodus-hydra/issues/9498)) ([df90160](https://github.com/ExodusMovement/exodus-hydra/commit/df90160623e62d1118ed11b887173966d8924350))
11
+
12
+ ## [5.11.3](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@5.11.2...@exodus/assets-feature@5.11.3) (2024-09-09)
13
+
14
+ **Note:** Version bump only for package @exodus/assets-feature
15
+
6
16
  ## [5.11.2](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@5.11.1...@exodus/assets-feature@5.11.2) (2024-09-05)
7
17
 
8
18
  ### Bug Fixes
@@ -1,7 +1,6 @@
1
- import { pickBy } from '@exodus/basic-utils'
1
+ import { pickBy, filterAsync } from '@exodus/basic-utils'
2
2
  import lodash from 'lodash'
3
3
  import assert from 'minimalistic-assert'
4
- import { filterAsync } from '@exodus/basic-utils/src/async.js'
5
4
 
6
5
  const { isEmpty } = lodash
7
6
 
@@ -314,10 +313,11 @@ class AssetClientInterface {
314
313
  })
315
314
  }
316
315
 
317
- getUnusedAddressIndexes = async ({ assetName, walletAccount }) => {
316
+ getUnusedAddressIndexes = async ({ assetName, walletAccount, highestUnusedIndexes }) => {
318
317
  return this.addressProvider.getUnusedAddressIndexes({
319
318
  assetName,
320
319
  walletAccount: await this.#getWalletAccount(walletAccount),
320
+ highestUnusedIndexes,
321
321
  })
322
322
  }
323
323
 
package/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import assetsApiDefinition from './api/index.js'
1
+ import type assetsApiDefinition from './api/index.js'
2
2
 
3
3
  declare const assets: () => {
4
4
  id: 'assets'
@@ -1,15 +1,10 @@
1
- import ExodusModule from '@exodus/module' // eslint-disable-line import/no-deprecated
2
1
  import { omit } from '@exodus/basic-utils'
3
2
 
4
- const MODULE_ID = 'assetPreferences'
5
-
6
- class AssetPreferences extends ExodusModule {
3
+ class AssetPreferences {
7
4
  #disabledPurposesAtom
8
5
  #multiAddressModeAtom
9
6
 
10
- constructor({ disabledPurposesAtom, multiAddressModeAtom, logger }) {
11
- super({ name: MODULE_ID, logger })
12
-
7
+ constructor({ disabledPurposesAtom, multiAddressModeAtom }) {
13
8
  this.#disabledPurposesAtom = disabledPurposesAtom
14
9
  this.#multiAddressModeAtom = multiAddressModeAtom
15
10
  }
@@ -52,10 +47,10 @@ class AssetPreferences extends ExodusModule {
52
47
  }
53
48
 
54
49
  const assetPreferencesDefinition = {
55
- id: MODULE_ID,
50
+ id: 'assetPreferences',
56
51
  type: 'module',
57
52
  factory: (opts) => new AssetPreferences(opts),
58
- dependencies: ['disabledPurposesAtom', 'multiAddressModeAtom', 'logger'],
53
+ dependencies: ['disabledPurposesAtom', 'multiAddressModeAtom'],
59
54
  public: true,
60
55
  }
61
56
 
@@ -1,4 +1,3 @@
1
- /* eslint-disable unicorn/prefer-spread */
2
1
  import {
3
2
  createAssetRegistry,
4
3
  CT_DEFAULT_SERVER,
@@ -6,7 +5,6 @@ import {
6
5
  CT_UPDATEABLE_PROPERTIES,
7
6
  } from '@exodus/assets'
8
7
  import { keyBy, mapValues, partition, pick, pickBy } from '@exodus/basic-utils'
9
- // eslint-disable-next-line @exodus/restricted-imports/prefer-basic-utils
10
8
  import lodash from 'lodash'
11
9
  import assert from 'minimalistic-assert'
12
10
 
@@ -297,7 +295,7 @@ export class AssetsModule {
297
295
 
298
296
  this.#flushChanges({ added, updated })
299
297
 
300
- return added.concat(updated)
298
+ return [...added, ...updated]
301
299
  }
302
300
 
303
301
  addRemoteTokens = async ({ tokenNames }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/assets-feature",
3
- "version": "5.11.2",
3
+ "version": "5.12.0",
4
4
  "license": "UNLICENSED",
5
5
  "description": "Assets module, clients and apis",
6
6
  "type": "module",
@@ -8,7 +8,7 @@
8
8
  "author": "Exodus Movement, Inc.",
9
9
  "scripts": {
10
10
  "test": "run -T exodus-test --jest --esbuild",
11
- "lint": "run -T eslint . --ignore-path ../../.gitignore",
11
+ "lint": "run -T eslint .",
12
12
  "lint:fix": "yarn lint --fix"
13
13
  },
14
14
  "files": [
@@ -34,10 +34,9 @@
34
34
  },
35
35
  "dependencies": {
36
36
  "@exodus/assets": "^11.0.0",
37
- "@exodus/atoms": "^8.0.0",
37
+ "@exodus/atoms": "^8.1.1",
38
38
  "@exodus/basic-utils": "^3.0.1",
39
39
  "@exodus/fetch": "^1.3.0",
40
- "@exodus/module": "^1.2.2",
41
40
  "@exodus/timer": "^1.1.2",
42
41
  "lodash": "^4.17.21",
43
42
  "minimalistic-assert": "^1.0.1",
@@ -51,7 +50,7 @@
51
50
  "@exodus/bitcoin-plugin": "^1.0.3",
52
51
  "@exodus/bitcoinregtest-plugin": "^1.0.3",
53
52
  "@exodus/bitcointestnet-plugin": "^1.0.3",
54
- "@exodus/blockchain-metadata": "^15.4.0",
53
+ "@exodus/blockchain-metadata": "^15.5.0",
55
54
  "@exodus/cardano-lib": "^2.2.0",
56
55
  "@exodus/combined-assets-meta": "^3.0.0",
57
56
  "@exodus/cosmos-plugin": "^1.0.0",
@@ -61,15 +60,14 @@
61
60
  "@exodus/models": "^12.0.1",
62
61
  "@exodus/osmosis-plugin": "^1.0.0",
63
62
  "@exodus/public-key-provider": "^2.5.0",
64
- "@exodus/public-key-store": "^1.2.2",
65
- "@exodus/redux-dependency-injection": "^4.0.2",
63
+ "@exodus/redux-dependency-injection": "^4.0.3",
66
64
  "@exodus/storage-memory": "^2.2.0",
67
- "@exodus/wallet-accounts": "^16.10.1",
65
+ "@exodus/wallet-accounts": "^16.12.0",
68
66
  "@exodus/wild-emitter": "^1.0.0",
69
67
  "bip39": "^3.1.0",
70
68
  "events": "^3.3.0",
71
69
  "msw": "^2.0.0",
72
70
  "redux": "^4.0.0"
73
71
  },
74
- "gitHead": "a758fd2522b6a4b638f10a340cf87a6d64c814de"
72
+ "gitHead": "ffece5dfcf5af37baf7382c8413a4c1639fba228"
75
73
  }
package/redux/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import initialState from './initial-state.js'
2
- import selectorDefinitions from './selectors/index.js'
1
+ import type initialState from './initial-state.js'
2
+ import type selectorDefinitions from './selectors/index.js'
3
3
 
4
4
  declare const assetsReduxDefinition: {
5
5
  id: 'assets'
@@ -3,7 +3,7 @@ import { createSelector } from 'reselect'
3
3
 
4
4
  import lodash from 'lodash'
5
5
 
6
- const { memoize } = lodash // eslint-disable-line @exodus/restricted-imports/prefer-basic-utils -- TODO: fix next time we touch this file
6
+ const { memoize } = lodash // eslint-disable-line @exodus/basic-utils/prefer-basic-utils
7
7
 
8
8
  // just a semantic alias for `data`
9
9
  const allAssetsSelectorDefinition = {