@exodus/assets-feature 8.8.0 → 9.0.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 +7 -0
- package/client/asset-client-interface.js +0 -2
- package/module/assets-module.js +5 -5
- package/package.json +7 -7
- package/plugin/index.js +26 -1
- package/redux/selectors/index.js +1 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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.0.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@8.8.0...@exodus/assets-feature@9.0.0) (2026-02-16)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **assets-feature:** add remote config support for asset initialization ([#15016](https://github.com/ExodusMovement/exodus-hydra/issues/15016)) ([15c5857](https://github.com/ExodusMovement/exodus-hydra/commit/15c5857a5e8229c7f25fad4b532718791a503d84))
|
|
11
|
+
- **assets-feature:** call start on plugin startup ([#15042](https://github.com/ExodusMovement/exodus-hydra/issues/15042)) ([81759e5](https://github.com/ExodusMovement/exodus-hydra/commit/81759e5640c57100a343448a0104f90ce558fa6b))
|
|
12
|
+
|
|
6
13
|
## [8.8.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@8.7.1...@exodus/assets-feature@8.8.0) (2026-01-21)
|
|
7
14
|
|
|
8
15
|
### Features
|
|
@@ -48,8 +48,6 @@ class AssetClientInterface {
|
|
|
48
48
|
this.#transactionSigner = transactionSigner
|
|
49
49
|
this.#walletAccountsAtom = walletAccountsAtom
|
|
50
50
|
this.#multisigAtom = multisigAtom
|
|
51
|
-
|
|
52
|
-
assetsModule.initialize({ assetClientInterface: this })
|
|
53
51
|
}
|
|
54
52
|
|
|
55
53
|
createLogger = (namespace) => {
|
package/module/assets-module.js
CHANGED
|
@@ -136,12 +136,12 @@ export class AssetsModule {
|
|
|
136
136
|
})
|
|
137
137
|
}
|
|
138
138
|
|
|
139
|
-
initialize = ({ assetClientInterface }) => {
|
|
140
|
-
|
|
141
|
-
const { assetsConfig = {} } = this.#config
|
|
139
|
+
initialize = once(({ assetClientInterface, assetsConfig }) => {
|
|
140
|
+
const { assetsConfig: defaultAssetsConfig = Object.create(null) } = this.#config
|
|
142
141
|
const assetsList = Object.entries(this.#assetPlugins)
|
|
143
142
|
.map(([name, assetPlugin]) => {
|
|
144
|
-
const
|
|
143
|
+
const config = { ...defaultAssetsConfig[name], ...assetsConfig?.[name]?.config }
|
|
144
|
+
const asset = assetPlugin.createAsset({ assetClientInterface, config })
|
|
145
145
|
if (asset.name === name) return asset
|
|
146
146
|
console.warn(`Incorrectly referenced supported asset ${name}. Expected ${asset.name}.`)
|
|
147
147
|
})
|
|
@@ -151,7 +151,7 @@ export class AssetsModule {
|
|
|
151
151
|
supportedAssetsList: [...assetsList, ...this.#combinedAssetsList],
|
|
152
152
|
})
|
|
153
153
|
)
|
|
154
|
-
}
|
|
154
|
+
})
|
|
155
155
|
|
|
156
156
|
getAssets = () => this.#registry.getAssets()
|
|
157
157
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/assets-feature",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.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",
|
|
@@ -51,24 +51,24 @@
|
|
|
51
51
|
"reselect": "^3.0.1"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@exodus/available-assets": "^8.
|
|
55
|
-
"@exodus/bip39": "^1.0
|
|
54
|
+
"@exodus/available-assets": "^8.11.0",
|
|
55
|
+
"@exodus/bip39": "^1.1.0",
|
|
56
56
|
"@exodus/bip44-constants": "^195.0.0",
|
|
57
57
|
"@exodus/bitcoin-meta": "^2.0.0",
|
|
58
58
|
"@exodus/bitcoin-plugin": "^1.29.1",
|
|
59
59
|
"@exodus/bitcoinregtest-plugin": "^1.11.0",
|
|
60
60
|
"@exodus/bitcointestnet-plugin": "^1.13.1",
|
|
61
61
|
"@exodus/blockchain-metadata": "^17.1.0",
|
|
62
|
-
"@exodus/cardano-lib": "^
|
|
62
|
+
"@exodus/cardano-lib": "^4.0.0",
|
|
63
63
|
"@exodus/combined-assets-meta": "^3.0.0",
|
|
64
64
|
"@exodus/cosmos-plugin": "^1.3.3",
|
|
65
65
|
"@exodus/ethereum-lib": "^5.0.0",
|
|
66
66
|
"@exodus/ethereum-meta": "^2.0.0",
|
|
67
67
|
"@exodus/ethereum-plugin": "^2.7.4",
|
|
68
68
|
"@exodus/fusion-local": "^2.1.0",
|
|
69
|
-
"@exodus/keychain": "^
|
|
69
|
+
"@exodus/keychain": "^9.0.3",
|
|
70
70
|
"@exodus/logger": "^1.2.3",
|
|
71
|
-
"@exodus/models": "^12.
|
|
71
|
+
"@exodus/models": "^12.19.0",
|
|
72
72
|
"@exodus/osmosis-plugin": "^1.3.3",
|
|
73
73
|
"@exodus/public-key-provider": "^4.2.1",
|
|
74
74
|
"@exodus/redux-dependency-injection": "^4.1.2",
|
|
@@ -83,5 +83,5 @@
|
|
|
83
83
|
"access": "public",
|
|
84
84
|
"provenance": false
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "e4705df6624c1fe8793d11ecd99351bdb6bb3687"
|
|
87
87
|
}
|
package/plugin/index.js
CHANGED
|
@@ -5,11 +5,13 @@ const createAssetsPlugin = ({
|
|
|
5
5
|
port,
|
|
6
6
|
assetsModule,
|
|
7
7
|
assetsAtom,
|
|
8
|
+
assetClientInterface,
|
|
8
9
|
customTokensMonitor,
|
|
9
10
|
disabledPurposesAtom,
|
|
10
11
|
multiAddressModeAtom,
|
|
11
12
|
legacyAddressModeAtom,
|
|
12
13
|
taprootAddressModeAtom,
|
|
14
|
+
remoteConfigAtom,
|
|
13
15
|
}) => {
|
|
14
16
|
const emitAssets = async (assets) => {
|
|
15
17
|
if (!assets) {
|
|
@@ -36,7 +38,20 @@ const createAssetsPlugin = ({
|
|
|
36
38
|
|
|
37
39
|
const subscribers = []
|
|
38
40
|
|
|
41
|
+
const getRemoteAssetsConfig = async () => {
|
|
42
|
+
const result = await remoteConfigAtom?.get()
|
|
43
|
+
return result?.config?.assets
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
const onImport = async () => {
|
|
47
|
+
const assetsConfig = await getRemoteAssetsConfig()
|
|
48
|
+
assetsModule.initialize({ assetClientInterface, assetsConfig })
|
|
49
|
+
}
|
|
50
|
+
|
|
39
51
|
const onStart = async () => {
|
|
52
|
+
const assetsConfig = await getRemoteAssetsConfig()
|
|
53
|
+
assetsModule.initialize({ assetClientInterface, assetsConfig })
|
|
54
|
+
|
|
40
55
|
let emittedInitialAssets = false
|
|
41
56
|
subscribers.push(
|
|
42
57
|
assetsAtom.observe(async ({ value, added, updated, disabled }) => {
|
|
@@ -87,7 +102,15 @@ const createAssetsPlugin = ({
|
|
|
87
102
|
await assetsModule.clear()
|
|
88
103
|
}
|
|
89
104
|
|
|
90
|
-
return {
|
|
105
|
+
return {
|
|
106
|
+
onImport: Object.defineProperty(onImport, 'priority', { value: 1, writable: false }),
|
|
107
|
+
onStart: Object.defineProperty(onStart, 'priority', { value: 1, writable: false }),
|
|
108
|
+
onLoad,
|
|
109
|
+
onUnlock,
|
|
110
|
+
onLock,
|
|
111
|
+
onStop,
|
|
112
|
+
onClear,
|
|
113
|
+
}
|
|
91
114
|
}
|
|
92
115
|
|
|
93
116
|
const assetsPluginDefinition = {
|
|
@@ -98,11 +121,13 @@ const assetsPluginDefinition = {
|
|
|
98
121
|
'port',
|
|
99
122
|
'assetsModule',
|
|
100
123
|
'assetsAtom',
|
|
124
|
+
'assetClientInterface',
|
|
101
125
|
'customTokensMonitor?',
|
|
102
126
|
'disabledPurposesAtom',
|
|
103
127
|
'multiAddressModeAtom',
|
|
104
128
|
'legacyAddressModeAtom',
|
|
105
129
|
'taprootAddressModeAtom',
|
|
130
|
+
'remoteConfigAtom?',
|
|
106
131
|
],
|
|
107
132
|
public: true,
|
|
108
133
|
}
|
package/redux/selectors/index.js
CHANGED
|
@@ -42,11 +42,7 @@ const createFeeAssetSelectorDefinition = {
|
|
|
42
42
|
|
|
43
43
|
const getAssetSelectorDefinition = {
|
|
44
44
|
id: 'getAsset',
|
|
45
|
-
resultFunction: (assets) =>
|
|
46
|
-
memoize((assetName) => {
|
|
47
|
-
if (!assetName) throw new Error('expected assetName')
|
|
48
|
-
return assets[assetName]
|
|
49
|
-
}),
|
|
45
|
+
resultFunction: (assets) => (assetName) => assets[assetName],
|
|
50
46
|
dependencies: [{ selector: 'all' }],
|
|
51
47
|
}
|
|
52
48
|
|