@exodus/headless 2.0.0-alpha.60 → 2.0.0-alpha.62

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,20 @@
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.62](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.61...@exodus/headless@2.0.0-alpha.62) (2023-07-05)
7
+
8
+ **Note:** Version bump only for package @exodus/headless
9
+
10
+ ## [2.0.0-alpha.61](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.60...@exodus/headless@2.0.0-alpha.61) (2023-07-05)
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+
14
+ - market-history atom (#2160)
15
+
16
+ ### Features
17
+
18
+ - market-history atom ([#2160](https://github.com/ExodusMovement/exodus-hydra/issues/2160)) ([b74364a](https://github.com/ExodusMovement/exodus-hydra/commit/b74364a47e8a51b3eea6b8cc870c731def65726b))
19
+
6
20
  ## [2.0.0-alpha.60](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.59...@exodus/headless@2.0.0-alpha.60) (2023-07-04)
7
21
 
8
22
  ### ⚠ BREAKING CHANGES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.60",
3
+ "version": "2.0.0-alpha.62",
4
4
  "description": "The platform-agnostic Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "main": "src/index.js",
@@ -27,7 +27,7 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@exodus/ab-testing": "^6.0.0",
30
- "@exodus/address-provider": "^4.2.0",
30
+ "@exodus/address-provider": "^5.0.0",
31
31
  "@exodus/apy-rates": "^3.0.0",
32
32
  "@exodus/atoms": "^5.2.1",
33
33
  "@exodus/auto-enable-assets-plugin": "^4.0.1",
@@ -50,7 +50,7 @@
50
50
  "@exodus/key-identifier-provider": "^1.1.3",
51
51
  "@exodus/keychain": "^4.1.0",
52
52
  "@exodus/kyc": "^4.0.0",
53
- "@exodus/market-history": "^3.1.2",
53
+ "@exodus/market-history": "^4.0.0",
54
54
  "@exodus/module": "^1.0.0",
55
55
  "@exodus/nfts": "^2.1.1",
56
56
  "@exodus/rates-monitor": "^2.0.1",
@@ -89,5 +89,5 @@
89
89
  "nock": "^13.3.1",
90
90
  "p-defer": "^4.0.0"
91
91
  },
92
- "gitHead": "3772b0c9e6727aa1ed14f0a3d703e93c08b65c8a"
92
+ "gitHead": "2739821618eaa4f38e65279697d7ed6619e79146"
93
93
  }
@@ -1,4 +1,5 @@
1
1
  import { createInMemoryAtom, createRemoteConfigAtomFactory } from '@exodus/atoms'
2
+ import { marketHistoryAtomDefinition } from '@exodus/market-history/atoms'
2
3
  import marketHistoryMonitorDefinition from '@exodus/market-history/module'
3
4
 
4
5
  import marketHistoryPluginDefinition from './plugin'
@@ -9,6 +10,7 @@ const marketHistory = () => {
9
10
  definitions: [
10
11
  {
11
12
  definition: { type: 'monitor', ...marketHistoryMonitorDefinition },
13
+ writesAtoms: ['marketHistoryAtom'],
12
14
  storage: { namespace: 'marketHistory' },
13
15
  aliases: [
14
16
  {
@@ -59,6 +61,7 @@ const marketHistory = () => {
59
61
  },
60
62
  },
61
63
  { definition: marketHistoryPluginDefinition },
64
+ { definition: marketHistoryAtomDefinition },
62
65
  ],
63
66
  }
64
67
  }
@@ -1,9 +1,9 @@
1
- const createMarketHistoryLifecyclePlugin = ({ marketHistory, port }) => {
2
- // TODO: migrate to marketHistoryAtom. Will be easier once it's on headless
3
- marketHistory.on('market-history', (payload) => port.emit('market-history', payload))
4
-
5
- marketHistory.on('market-history-new-assets', (payload) =>
6
- port.emit('market-history-new-assets', payload)
1
+ const createMarketHistoryLifecyclePlugin = ({ marketHistory, marketHistoryAtom, port }) => {
2
+ marketHistoryAtom.observe(({ data, changes }) =>
3
+ port.emit('market-history', {
4
+ data,
5
+ changes,
6
+ })
7
7
  )
8
8
 
9
9
  const onUnlock = () => {
@@ -17,5 +17,5 @@ export default {
17
17
  id: 'marketHistoryLifecyclePlugin',
18
18
  type: 'plugin',
19
19
  factory: createMarketHistoryLifecyclePlugin,
20
- dependencies: ['marketHistory', 'port'],
20
+ dependencies: ['marketHistory', 'port', 'marketHistoryAtom'],
21
21
  }