@exodus/headless 2.0.0-alpha.26 → 2.0.0-alpha.28

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,18 @@
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
+ ## [2.0.0-alpha.28](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.27...@exodus/headless@2.0.0-alpha.28) (2023-05-31)
7
+
8
+ ### Features
9
+
10
+ - add crypto news monitor to headless ([#1750](https://github.com/ExodusMovement/exodus-hydra/issues/1750)) ([64d46a3](https://github.com/ExodusMovement/exodus-hydra/commit/64d46a3d95c3b34d504b0b7128961df1427b6853))
11
+
12
+ ## [2.0.0-alpha.27](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.26...@exodus/headless@2.0.0-alpha.27) (2023-05-31)
13
+
14
+ ### Features
15
+
16
+ - integrate top-movers monitor into headless ([#1743](https://github.com/ExodusMovement/exodus-hydra/issues/1743)) ([05c4b22](https://github.com/ExodusMovement/exodus-hydra/commit/05c4b22e69e823563d81bfe7b30a2d21574d0c45))
17
+
6
18
  ## [2.0.0-alpha.26](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.25...@exodus/headless@2.0.0-alpha.26) (2023-05-30)
7
19
 
8
20
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.26",
3
+ "version": "2.0.0-alpha.28",
4
4
  "description": "The headless Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc",
6
6
  "main": "src/index.js",
@@ -34,6 +34,7 @@
34
34
  "@exodus/blockchain-metadata": "^8.0.1",
35
35
  "@exodus/config": "^7.0.0",
36
36
  "@exodus/connected-origins": "^1.1.2",
37
+ "@exodus/crypto-news-monitor": "^2.0.0",
37
38
  "@exodus/dependency-injection": "^1.2.0",
38
39
  "@exodus/dependency-preprocessors": "^2.4.0",
39
40
  "@exodus/enabled-assets": "^6.0.1",
@@ -50,6 +51,7 @@
50
51
  "@exodus/personal-notes": "^3.0.1",
51
52
  "@exodus/rates-monitor": "^2.0.0",
52
53
  "@exodus/referrals": "^5.2.0",
54
+ "@exodus/top-movers-monitor": "^2.0.1",
53
55
  "@exodus/wallet": "^6.0.1",
54
56
  "@exodus/wallet-accounts": "^8.0.1",
55
57
  "@exodus/wallet-compatibility-modes": "^2.0.0",
@@ -81,5 +83,5 @@
81
83
  "nock": "^13.3.1",
82
84
  "p-defer": "^4.0.0"
83
85
  },
84
- "gitHead": "e423fd0fa1cbf41c4af86b6ebe25905cd4cecba0"
86
+ "gitHead": "6fb5a03d52683575d54955a961717eb590e3fe57"
85
87
  }
package/src/constants.js CHANGED
@@ -1,6 +1,8 @@
1
1
  export const atomsToAttach = [
2
2
  'availableAssetNamesAtom',
3
3
  'balancesAtom',
4
+ 'cryptoNewsAtom',
5
+ 'connectedOriginsAtom',
4
6
  'currencyAtom',
5
7
  'enabledWalletAccountsAtom',
6
8
  'featureFlagsAtom',
@@ -9,6 +11,6 @@ export const atomsToAttach = [
9
11
  'languageAtom',
10
12
  'personalNotesAtom',
11
13
  'referralsAtom',
14
+ 'topMoversAtom',
12
15
  'walletAccountsAtom',
13
- 'connectedOriginsAtom',
14
16
  ]
@@ -7,6 +7,7 @@ import {
7
7
  import { availableAssetNamesAtomDefinition } from '@exodus/available-assets/atoms'
8
8
  import { balancesAtomDefinition } from '@exodus/balances/atoms'
9
9
  import { connectedOriginsAtomDefinition } from '@exodus/connected-origins/atoms'
10
+ import { cryptoNewsAtomDefinition } from '@exodus/crypto-news-monitor/atoms'
10
11
  import {
11
12
  enabledAndDisabledAssetsAtomDefinition,
12
13
  enabledAssetsAtomDefinition,
@@ -17,6 +18,7 @@ import { kycAtomDefinition } from '@exodus/kyc/atoms'
17
18
  import { personalNotesAtomDefinition } from '@exodus/personal-notes/atoms'
18
19
  import { ratesAtomDefinition } from '@exodus/rates-monitor/atoms'
19
20
  import { referralsAtomDefinition } from '@exodus/referrals/atoms'
21
+ import { topMoversAtomDefinition } from '@exodus/top-movers-monitor/atoms'
20
22
  import {
21
23
  enabledWalletAccountsAtomDefinition,
22
24
  walletAccountsAtomDefinition,
@@ -157,6 +159,8 @@ const createAtomDependencies = () =>
157
159
  ],
158
160
  },
159
161
  { definition: baseAssetNamesToMonitorAtomDefinition },
162
+ { definition: topMoversAtomDefinition },
163
+ { definition: cryptoNewsAtomDefinition },
160
164
  ].map(withType('atom'))
161
165
 
162
166
  export default createAtomDependencies
@@ -1,11 +1,14 @@
1
+ import cryptoNewsMonitorDefinition from '@exodus/crypto-news-monitor/monitor'
1
2
  import feeMonitorsDefinition from '@exodus/fee-monitors/monitor'
2
3
  import geolocationMonitorDefinition from '@exodus/geolocation/monitor'
3
4
  import marketHistoryMonitorDefinition from '@exodus/market-history/module'
4
5
  import ratesMonitorDefinition from '@exodus/rates-monitor/module'
6
+ import localTopMoversMonitorDefinition from '@exodus/top-movers-monitor/monitor/local'
7
+ import remoteTopMoversMonitorDefinition from '@exodus/top-movers-monitor/monitor/remote'
5
8
 
6
9
  import { withType } from './utils'
7
10
 
8
- const createMonitorDependencies = () =>
11
+ const createMonitorDependencies = ({ config }) =>
9
12
  [
10
13
  {
11
14
  definition: geolocationMonitorDefinition,
@@ -33,8 +36,21 @@ const createMonitorDependencies = () =>
33
36
  },
34
37
  ],
35
38
  },
36
- { definition: ratesMonitorDefinition, writesAtoms: ['ratesAtom'] },
37
39
  { definition: feeMonitorsDefinition },
40
+ {
41
+ definition: ratesMonitorDefinition,
42
+ writesAtoms: ['ratesAtom'],
43
+ },
44
+ {
45
+ definition: config.topMoversMonitor.computeLocally
46
+ ? localTopMoversMonitorDefinition
47
+ : remoteTopMoversMonitorDefinition,
48
+ writesAtoms: ['topMoversAtom'],
49
+ },
50
+ {
51
+ definition: cryptoNewsMonitorDefinition,
52
+ writesAtoms: ['cryptoNewsAtom'],
53
+ },
38
54
  ].map(withType('monitor'))
39
55
 
40
56
  export default createMonitorDependencies
package/src/index.js CHANGED
@@ -32,8 +32,14 @@ const createExodus = ({ adapters, config, port }) => {
32
32
  connectedOrigins,
33
33
  } = ioc.getByType('module')
34
34
 
35
- const { geolocationMonitor, marketHistory, ratesMonitor, feeMonitors } =
36
- ioc.getByType('monitor')
35
+ const {
36
+ cryptoNewsMonitor,
37
+ feeMonitors,
38
+ geolocationMonitor,
39
+ marketHistory,
40
+ ratesMonitor,
41
+ topMoversMonitor,
42
+ } = ioc.getByType('monitor')
37
43
 
38
44
  const { featureFlagAtoms } = ioc.getByType('atom-collection')
39
45
 
@@ -92,6 +98,16 @@ const createExodus = ({ adapters, config, port }) => {
92
98
  kyc.load()
93
99
  referrals.load()
94
100
  })
101
+
102
+ featureFlagAtoms.topMovers?.get().then(({ isOn }) => {
103
+ if (!isOn) return
104
+ topMoversMonitor.start()
105
+ })
106
+
107
+ featureFlagAtoms.cryptoNews?.get().then(({ isOn }) => {
108
+ if (!isOn) return
109
+ cryptoNewsMonitor.start()
110
+ })
95
111
  })
96
112
 
97
113
  application.on('unlock', () => {