@exodus/headless 2.0.0-alpha.27 → 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,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
+ ## [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
+
6
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)
7
13
 
8
14
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.27",
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",
@@ -82,5 +83,5 @@
82
83
  "nock": "^13.3.1",
83
84
  "p-defer": "^4.0.0"
84
85
  },
85
- "gitHead": "8295106699aff7afd282497ef6cf28b2699c5cb3"
86
+ "gitHead": "6fb5a03d52683575d54955a961717eb590e3fe57"
86
87
  }
package/src/constants.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export const atomsToAttach = [
2
2
  'availableAssetNamesAtom',
3
3
  'balancesAtom',
4
+ 'cryptoNewsAtom',
4
5
  'connectedOriginsAtom',
5
6
  'currencyAtom',
6
7
  'enabledWalletAccountsAtom',
@@ -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,
@@ -159,6 +160,7 @@ const createAtomDependencies = () =>
159
160
  },
160
161
  { definition: baseAssetNamesToMonitorAtomDefinition },
161
162
  { definition: topMoversAtomDefinition },
163
+ { definition: cryptoNewsAtomDefinition },
162
164
  ].map(withType('atom'))
163
165
 
164
166
  export default createAtomDependencies
@@ -1,3 +1,4 @@
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'
@@ -46,6 +47,10 @@ const createMonitorDependencies = ({ config }) =>
46
47
  : remoteTopMoversMonitorDefinition,
47
48
  writesAtoms: ['topMoversAtom'],
48
49
  },
50
+ {
51
+ definition: cryptoNewsMonitorDefinition,
52
+ writesAtoms: ['cryptoNewsAtom'],
53
+ },
49
54
  ].map(withType('monitor'))
50
55
 
51
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, topMoversMonitor } =
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
 
@@ -97,6 +103,11 @@ const createExodus = ({ adapters, config, port }) => {
97
103
  if (!isOn) return
98
104
  topMoversMonitor.start()
99
105
  })
106
+
107
+ featureFlagAtoms.cryptoNews?.get().then(({ isOn }) => {
108
+ if (!isOn) return
109
+ cryptoNewsMonitor.start()
110
+ })
100
111
  })
101
112
 
102
113
  application.on('unlock', () => {