@exodus/assets-feature 3.6.0 → 3.7.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 +6 -0
- package/package.json +4 -4
- package/plugin/index.js +23 -3
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
|
+
## [3.7.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@3.6.0...@exodus/assets-feature@3.7.0) (2023-10-25)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **assets-feature:** start custom tokens monitor on unlock ([#4562](https://github.com/ExodusMovement/exodus-hydra/issues/4562)) ([adcd284](https://github.com/ExodusMovement/exodus-hydra/commit/adcd2849d7ed383ebe494b123a20e60ae4e89d58))
|
|
11
|
+
|
|
6
12
|
## [3.6.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/assets-feature@3.5.0...@exodus/assets-feature@3.6.0) (2023-10-20)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@exodus/assets-feature",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.7.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Assets module, clients and apis",
|
|
6
6
|
"main": "index.js",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@exodus/assets": "^8.0.95",
|
|
44
|
-
"@exodus/atoms": "^
|
|
44
|
+
"@exodus/atoms": "^6.0.0",
|
|
45
45
|
"@exodus/available-assets": "^7.0.0",
|
|
46
46
|
"@exodus/bitcoin-meta": "^1.0.1",
|
|
47
47
|
"@exodus/bitcoin-plugin": "^1.0.3",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"@exodus/osmosis-plugin": "^1.0.0",
|
|
56
56
|
"@exodus/redux-dependency-injection": "^3.0.0",
|
|
57
57
|
"@exodus/storage-memory": "^2.1.1",
|
|
58
|
-
"@exodus/wallet-accounts": "^14.
|
|
58
|
+
"@exodus/wallet-accounts": "^14.2.0",
|
|
59
59
|
"@exodus/wild-emitter": "^1.0.0",
|
|
60
60
|
"eslint": "^8.44.0",
|
|
61
61
|
"events": "^3.3.0",
|
|
62
62
|
"jest": "^29.1.2",
|
|
63
63
|
"redux": "^4.0.0"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "c083b9655607e20206217c44bd55bd1b68e3c9b4"
|
|
66
66
|
}
|
package/plugin/index.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { mapValues, pickBy } from '@exodus/basic-utils'
|
|
2
2
|
import { createAtomObserver } from '@exodus/atoms'
|
|
3
3
|
|
|
4
|
-
const createAssetsPlugin = ({
|
|
4
|
+
const createAssetsPlugin = ({
|
|
5
|
+
port,
|
|
6
|
+
assetsModule,
|
|
7
|
+
customTokensMonitor,
|
|
8
|
+
disabledPurposesAtom,
|
|
9
|
+
multiAddressModeAtom,
|
|
10
|
+
}) => {
|
|
5
11
|
const emitAssetsLoad = () => {
|
|
6
12
|
const assets = assetsModule.getAssets()
|
|
7
13
|
port.emit('assets-load', {
|
|
@@ -41,6 +47,14 @@ const createAssetsPlugin = ({ port, assetsModule, disabledPurposesAtom, multiAdd
|
|
|
41
47
|
emitAssetsLoad()
|
|
42
48
|
}
|
|
43
49
|
|
|
50
|
+
const onUnlock = () => {
|
|
51
|
+
customTokensMonitor.start()
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const onLock = () => {
|
|
55
|
+
customTokensMonitor.stop()
|
|
56
|
+
}
|
|
57
|
+
|
|
44
58
|
const onStop = () => {
|
|
45
59
|
listeners.forEach(([event, callback]) => {
|
|
46
60
|
assetsModule.removeListener(event, callback)
|
|
@@ -53,14 +67,20 @@ const createAssetsPlugin = ({ port, assetsModule, disabledPurposesAtom, multiAdd
|
|
|
53
67
|
await assetsModule.clear()
|
|
54
68
|
}
|
|
55
69
|
|
|
56
|
-
return { onStart, onLoad, onStop, onClear }
|
|
70
|
+
return { onStart, onLoad, onUnlock, onLock, onStop, onClear }
|
|
57
71
|
}
|
|
58
72
|
|
|
59
73
|
const assetsPluginDefinition = {
|
|
60
74
|
id: 'assetsPlugin',
|
|
61
75
|
type: 'plugin',
|
|
62
76
|
factory: createAssetsPlugin,
|
|
63
|
-
dependencies: [
|
|
77
|
+
dependencies: [
|
|
78
|
+
'port',
|
|
79
|
+
'assetsModule',
|
|
80
|
+
'customTokensMonitor',
|
|
81
|
+
'disabledPurposesAtom',
|
|
82
|
+
'multiAddressModeAtom',
|
|
83
|
+
],
|
|
64
84
|
}
|
|
65
85
|
|
|
66
86
|
export default assetsPluginDefinition
|