@exodus/assets-feature 9.3.1 → 9.3.2

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
+ ## [9.3.2](https://github.com/ExodusMovement/exodus/compare/@exodus/assets-feature@9.3.1...@exodus/assets-feature@9.3.2) (2026-09-02)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **assets:** sort testnet variants last in dynamic combined assets ([#44481](https://github.com/ExodusMovement/exodus/issues/44481)) ([d2726b9](https://github.com/ExodusMovement/exodus/commit/d2726b9dc3cba1d440ce0f34d50d26c76848034b))
11
+
6
12
  ## [9.3.1](https://github.com/ExodusMovement/exodus/compare/@exodus/assets-feature@9.3.0...@exodus/assets-feature@9.3.1) (2026-08-26)
7
13
 
8
14
  ### Bug Fixes
@@ -22,10 +22,10 @@ const groupAssetsByTickerAndName = (assets) => {
22
22
  return groups
23
23
  }
24
24
 
25
- const selectPrimaryAsset = (assets) => {
26
- const sorted = [...assets].sort((a, b) => a.name.localeCompare(b.name))
27
- return sorted[0]
28
- }
25
+ const isTestnetVariant = (asset) => asset.baseAsset?.api?.features?.isTestnet === true
26
+
27
+ const byPrimaryPreference = (a, b) =>
28
+ Number(isTestnetVariant(a)) - Number(isTestnetVariant(b)) || a.name.localeCompare(b.name)
29
29
 
30
30
  const resolveDecimals = (assets) => {
31
31
  const decimals = assets.map((a) => a.currency?.defaultUnit?.power ?? 8)
@@ -33,8 +33,8 @@ const resolveDecimals = (assets) => {
33
33
  }
34
34
 
35
35
  const createDynamicCombinedAssetDefinition = (assetGroup) => {
36
- const primary = selectPrimaryAsset(assetGroup)
37
- const sortedAssets = [...assetGroup].sort((a, b) => a.name.localeCompare(b.name))
36
+ const sortedAssets = [...assetGroup].sort(byPrimaryPreference)
37
+ const [primary] = sortedAssets
38
38
 
39
39
  const normalizedTicker = normalizeForName(primary.displayTicker)
40
40
  const normalizedDisplayName = normalizeForName(primary.displayName)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/assets-feature",
3
- "version": "9.3.1",
3
+ "version": "9.3.2",
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",
@@ -52,7 +52,7 @@
52
52
  "reselect": "^3.0.1"
53
53
  },
54
54
  "devDependencies": {
55
- "@exodus/available-assets": "^8.11.1",
55
+ "@exodus/available-assets": "^8.11.2",
56
56
  "@exodus/bip32": "^4.3.0",
57
57
  "@exodus/bip39": "^1.1.0",
58
58
  "@exodus/bip44-constants": "^195.0.2",
@@ -84,5 +84,5 @@
84
84
  "access": "public",
85
85
  "provenance": false
86
86
  },
87
- "gitHead": "69a95445c733ef5519ac3fde6632fa9afc399b76"
87
+ "gitHead": "b8b267e27a2516dfc57d737b82aa361da652d0c1"
88
88
  }