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

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.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
+
8
+ ### Features
9
+
10
+ - integrate top-movers monitor into headless ([#1743](https://github.com/ExodusMovement/exodus-hydra/issues/1743)) ([05c4b22](https://github.com/ExodusMovement/exodus-hydra/commit/05c4b22e69e823563d81bfe7b30a2d21574d0c45))
11
+
6
12
  ## [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
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.26",
3
+ "version": "2.0.0-alpha.27",
4
4
  "description": "The headless Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc",
6
6
  "main": "src/index.js",
@@ -50,6 +50,7 @@
50
50
  "@exodus/personal-notes": "^3.0.1",
51
51
  "@exodus/rates-monitor": "^2.0.0",
52
52
  "@exodus/referrals": "^5.2.0",
53
+ "@exodus/top-movers-monitor": "^2.0.1",
53
54
  "@exodus/wallet": "^6.0.1",
54
55
  "@exodus/wallet-accounts": "^8.0.1",
55
56
  "@exodus/wallet-compatibility-modes": "^2.0.0",
@@ -81,5 +82,5 @@
81
82
  "nock": "^13.3.1",
82
83
  "p-defer": "^4.0.0"
83
84
  },
84
- "gitHead": "e423fd0fa1cbf41c4af86b6ebe25905cd4cecba0"
85
+ "gitHead": "8295106699aff7afd282497ef6cf28b2699c5cb3"
85
86
  }
package/src/constants.js CHANGED
@@ -1,6 +1,7 @@
1
1
  export const atomsToAttach = [
2
2
  'availableAssetNamesAtom',
3
3
  'balancesAtom',
4
+ 'connectedOriginsAtom',
4
5
  'currencyAtom',
5
6
  'enabledWalletAccountsAtom',
6
7
  'featureFlagsAtom',
@@ -9,6 +10,6 @@ export const atomsToAttach = [
9
10
  'languageAtom',
10
11
  'personalNotesAtom',
11
12
  'referralsAtom',
13
+ 'topMoversAtom',
12
14
  'walletAccountsAtom',
13
- 'connectedOriginsAtom',
14
15
  ]
@@ -17,6 +17,7 @@ import { kycAtomDefinition } from '@exodus/kyc/atoms'
17
17
  import { personalNotesAtomDefinition } from '@exodus/personal-notes/atoms'
18
18
  import { ratesAtomDefinition } from '@exodus/rates-monitor/atoms'
19
19
  import { referralsAtomDefinition } from '@exodus/referrals/atoms'
20
+ import { topMoversAtomDefinition } from '@exodus/top-movers-monitor/atoms'
20
21
  import {
21
22
  enabledWalletAccountsAtomDefinition,
22
23
  walletAccountsAtomDefinition,
@@ -157,6 +158,7 @@ const createAtomDependencies = () =>
157
158
  ],
158
159
  },
159
160
  { definition: baseAssetNamesToMonitorAtomDefinition },
161
+ { definition: topMoversAtomDefinition },
160
162
  ].map(withType('atom'))
161
163
 
162
164
  export default createAtomDependencies
@@ -2,10 +2,12 @@ import feeMonitorsDefinition from '@exodus/fee-monitors/monitor'
2
2
  import geolocationMonitorDefinition from '@exodus/geolocation/monitor'
3
3
  import marketHistoryMonitorDefinition from '@exodus/market-history/module'
4
4
  import ratesMonitorDefinition from '@exodus/rates-monitor/module'
5
+ import localTopMoversMonitorDefinition from '@exodus/top-movers-monitor/monitor/local'
6
+ import remoteTopMoversMonitorDefinition from '@exodus/top-movers-monitor/monitor/remote'
5
7
 
6
8
  import { withType } from './utils'
7
9
 
8
- const createMonitorDependencies = () =>
10
+ const createMonitorDependencies = ({ config }) =>
9
11
  [
10
12
  {
11
13
  definition: geolocationMonitorDefinition,
@@ -33,8 +35,17 @@ const createMonitorDependencies = () =>
33
35
  },
34
36
  ],
35
37
  },
36
- { definition: ratesMonitorDefinition, writesAtoms: ['ratesAtom'] },
37
38
  { definition: feeMonitorsDefinition },
39
+ {
40
+ definition: ratesMonitorDefinition,
41
+ writesAtoms: ['ratesAtom'],
42
+ },
43
+ {
44
+ definition: config.topMoversMonitor.computeLocally
45
+ ? localTopMoversMonitorDefinition
46
+ : remoteTopMoversMonitorDefinition,
47
+ writesAtoms: ['topMoversAtom'],
48
+ },
38
49
  ].map(withType('monitor'))
39
50
 
40
51
  export default createMonitorDependencies
package/src/index.js CHANGED
@@ -32,7 +32,7 @@ const createExodus = ({ adapters, config, port }) => {
32
32
  connectedOrigins,
33
33
  } = ioc.getByType('module')
34
34
 
35
- const { geolocationMonitor, marketHistory, ratesMonitor, feeMonitors } =
35
+ const { geolocationMonitor, marketHistory, ratesMonitor, feeMonitors, topMoversMonitor } =
36
36
  ioc.getByType('monitor')
37
37
 
38
38
  const { featureFlagAtoms } = ioc.getByType('atom-collection')
@@ -92,6 +92,11 @@ const createExodus = ({ adapters, config, port }) => {
92
92
  kyc.load()
93
93
  referrals.load()
94
94
  })
95
+
96
+ featureFlagAtoms.topMovers?.get().then(({ isOn }) => {
97
+ if (!isOn) return
98
+ topMoversMonitor.start()
99
+ })
95
100
  })
96
101
 
97
102
  application.on('unlock', () => {