@exodus/headless 2.0.0-alpha.63 → 2.0.0-alpha.65

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,33 @@
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.65](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.64...@exodus/headless@2.0.0-alpha.65) (2023-07-07)
7
+
8
+ **Note:** Version bump only for package @exodus/headless
9
+
10
+ ## [2.0.0-alpha.64](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.63...@exodus/headless@2.0.0-alpha.64) (2023-07-06)
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+
14
+ - market-history feature (#2361)
15
+ - move atoms from headless to market-history (#2360)
16
+ - **headless:** extract connected origins (#2352)
17
+ - move in-memory address cache to address cache module (#2336)
18
+
19
+ ### Features
20
+
21
+ - don't use in-memory cache in tests ([#2344](https://github.com/ExodusMovement/exodus-hydra/issues/2344)) ([48bf0e4](https://github.com/ExodusMovement/exodus-hydra/commit/48bf0e4edfc0fc36ae9a1ec76360f619c6e2f864))
22
+ - **headless:** extract connected origins ([#2352](https://github.com/ExodusMovement/exodus-hydra/issues/2352)) ([41b8172](https://github.com/ExodusMovement/exodus-hydra/commit/41b8172f326d1f414523851fa2e3f3fb074aafba))
23
+ - market-history feature ([#2361](https://github.com/ExodusMovement/exodus-hydra/issues/2361)) ([9132471](https://github.com/ExodusMovement/exodus-hydra/commit/9132471cafdf95f46760b6d4528e91210493cab1))
24
+
25
+ ### Code Refactoring
26
+
27
+ - move in-memory address cache to address cache module ([#2336](https://github.com/ExodusMovement/exodus-hydra/issues/2336)) ([d28a6c9](https://github.com/ExodusMovement/exodus-hydra/commit/d28a6c9843356d86262fb308cf40ecad023dc196))
28
+
29
+ ### Miscellaneous Chores
30
+
31
+ - move atoms from headless to market-history ([#2360](https://github.com/ExodusMovement/exodus-hydra/issues/2360)) ([d452d74](https://github.com/ExodusMovement/exodus-hydra/commit/d452d74a8874ab5cb3221212405e2c45bb8d046f))
32
+
6
33
  ## [2.0.0-alpha.63](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.62...@exodus/headless@2.0.0-alpha.63) (2023-07-06)
7
34
 
8
35
  ### ⚠ BREAKING CHANGES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.63",
3
+ "version": "2.0.0-alpha.65",
4
4
  "description": "The platform-agnostic Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "main": "src/index.js",
@@ -26,7 +26,7 @@
26
26
  "test": "jest --runInBand"
27
27
  },
28
28
  "dependencies": {
29
- "@exodus/address-provider": "^5.0.0",
29
+ "@exodus/address-provider": "^6.0.0",
30
30
  "@exodus/atoms": "^5.2.1",
31
31
  "@exodus/auto-enable-assets-plugin": "^4.0.1",
32
32
  "@exodus/available-assets": "^2.0.2",
@@ -34,7 +34,6 @@
34
34
  "@exodus/basic-utils": "^2.0.0",
35
35
  "@exodus/blockchain-metadata": "^8.1.0",
36
36
  "@exodus/config": "^7.0.0",
37
- "@exodus/connected-origins": "^2.0.0",
38
37
  "@exodus/dependency-injection": "^2.0.0",
39
38
  "@exodus/dependency-preprocessors": "^2.8.2",
40
39
  "@exodus/enabled-assets": "^6.0.2",
@@ -46,12 +45,12 @@
46
45
  "@exodus/geolocation": "^2.0.1",
47
46
  "@exodus/key-identifier-provider": "^1.1.3",
48
47
  "@exodus/keychain": "^4.1.0",
49
- "@exodus/market-history": "^4.0.0",
48
+ "@exodus/market-history": "^5.0.0",
50
49
  "@exodus/module": "^1.0.0",
51
50
  "@exodus/nfts": "^2.1.1",
52
51
  "@exodus/rates-monitor": "^2.0.1",
53
52
  "@exodus/wallet": "^6.3.0",
54
- "@exodus/wallet-accounts": "^8.0.1",
53
+ "@exodus/wallet-accounts": "^10.1.0",
55
54
  "@exodus/wallet-compatibility-modes": "^2.0.0",
56
55
  "bip39": "^2.6.0",
57
56
  "events": "^3.3.0",
@@ -65,6 +64,7 @@
65
64
  "@exodus/apy-rates": "^3.0.0",
66
65
  "@exodus/bitcoin-lib": "^2.2.1",
67
66
  "@exodus/bitcoin-meta": "^1.0.0",
67
+ "@exodus/connected-origins": "^2.0.0",
68
68
  "@exodus/crypto-news-monitor": "^3.0.0",
69
69
  "@exodus/currency": "^2.2.0",
70
70
  "@exodus/ethereum-lib": "^2.22.2",
@@ -89,5 +89,5 @@
89
89
  "nock": "^13.3.1",
90
90
  "p-defer": "^4.0.0"
91
91
  },
92
- "gitHead": "76e3b93971896e937c1fff63b01d0adbe9938b4b"
92
+ "gitHead": "924ea51750f68d9797f275c78e2e067f01bf86a5"
93
93
  }
package/src/index.js CHANGED
@@ -1,8 +1,9 @@
1
1
  import addressProvider from '@exodus/address-provider'
2
2
  import { pick } from '@exodus/basic-utils'
3
- import connectedOrigins from '@exodus/connected-origins'
4
3
  import keychain from '@exodus/keychain'
4
+ import marketHistory from '@exodus/market-history'
5
5
  import wallet from '@exodus/wallet'
6
+ import walletAccounts from '@exodus/wallet-accounts'
6
7
 
7
8
  import createApi from './api'
8
9
  import attachAtoms from './atoms/attach'
@@ -16,12 +17,10 @@ import fees from './features/fees'
16
17
  import fiatBalances from './features/fiat-balances'
17
18
  import geolocation from './features/geolocation'
18
19
  import locale from './features/locale'
19
- import marketHistory from './features/market-history'
20
20
  import nfts from './features/nfts'
21
21
  import pricing from './features/pricing'
22
22
  import rates from './features/rates'
23
23
  import remoteConfig from './features/remote-config'
24
- import walletAccounts from './features/wallet-accounts'
25
24
  import createIOC from './ioc'
26
25
  import attachPlugins from './plugins/attach'
27
26
 
@@ -46,7 +45,6 @@ const createExodus = ({ adapters, config, port }) => {
46
45
  ioc.use(featureFlags())
47
46
  ioc.use(locale())
48
47
  ioc.use(nfts())
49
- ioc.use(connectedOrigins())
50
48
  ioc.use(addressProvider({ config: config.addressProvider }))
51
49
 
52
50
  ioc.register({ definition: { id: 'port', type: 'port', factory: () => port } })
@@ -1,69 +0,0 @@
1
- import { createInMemoryAtom, createRemoteConfigAtomFactory } from '@exodus/atoms'
2
- import { marketHistoryAtomDefinition } from '@exodus/market-history/atoms'
3
- import marketHistoryMonitorDefinition from '@exodus/market-history/module'
4
-
5
- import marketHistoryPluginDefinition from './plugin'
6
-
7
- const marketHistory = () => {
8
- return {
9
- id: 'marketHistory',
10
- definitions: [
11
- {
12
- definition: { type: 'monitor', ...marketHistoryMonitorDefinition },
13
- writesAtoms: ['marketHistoryAtom'],
14
- storage: { namespace: 'marketHistory' },
15
- aliases: [
16
- {
17
- implementationId: 'unsafeStorage',
18
- interfaceId: 'storage',
19
- },
20
- {
21
- implementationId: 'marketHistoryClearCacheAtom',
22
- interfaceId: 'clearCacheAtom',
23
- },
24
- {
25
- implementationId: 'remoteConfigClearMarketHistoryCacheAtom',
26
- interfaceId: 'remoteConfigClearCacheAtom',
27
- },
28
- {
29
- implementationId: 'marketHistoryRefreshIntervalAtom',
30
- interfaceId: 'remoteConfigRefreshIntervalAtom',
31
- },
32
- ],
33
- },
34
- // TODO: move to @exodus/market-history
35
- {
36
- definition: {
37
- id: 'marketHistoryClearCacheAtom',
38
- type: 'atom',
39
- factory: ({ config }) => createInMemoryAtom(config),
40
- dependencies: ['config'],
41
- },
42
- },
43
- // TODO: move to @exodus/market-history
44
- {
45
- definition: {
46
- id: 'remoteConfigClearMarketHistoryCacheAtom',
47
- type: 'atom',
48
- factory: ({ config, remoteConfig }) =>
49
- createRemoteConfigAtomFactory({ remoteConfig })(config),
50
- dependencies: ['config', 'remoteConfig'],
51
- },
52
- },
53
- // TODO: move to @exodus/market-history
54
- {
55
- definition: {
56
- id: 'marketHistoryRefreshIntervalAtom',
57
- type: 'atom',
58
- factory: ({ config, remoteConfig }) =>
59
- createRemoteConfigAtomFactory({ remoteConfig })(config),
60
- dependencies: ['config', 'remoteConfig'],
61
- },
62
- },
63
- { definition: marketHistoryPluginDefinition },
64
- { definition: marketHistoryAtomDefinition },
65
- ],
66
- }
67
- }
68
-
69
- export default marketHistory
@@ -1,21 +0,0 @@
1
- const createMarketHistoryLifecyclePlugin = ({ marketHistory, marketHistoryAtom, port }) => {
2
- marketHistoryAtom.observe(({ data, changes }) =>
3
- port.emit('market-history', {
4
- data,
5
- changes,
6
- })
7
- )
8
-
9
- const onUnlock = () => {
10
- marketHistory.start()
11
- }
12
-
13
- return { onUnlock }
14
- }
15
-
16
- export default {
17
- id: 'marketHistoryLifecyclePlugin',
18
- type: 'plugin',
19
- factory: createMarketHistoryLifecyclePlugin,
20
- dependencies: ['marketHistory', 'port', 'marketHistoryAtom'],
21
- }
@@ -1,16 +0,0 @@
1
- const walletAccountsApi = ({ walletAccounts, enabledWalletAccountsAtom }) => ({
2
- walletAccounts: {
3
- create: walletAccounts.create,
4
- update: walletAccounts.update,
5
- disable: walletAccounts.disable,
6
- enable: walletAccounts.enable,
7
- getEnabled: enabledWalletAccountsAtom.get,
8
- },
9
- })
10
-
11
- export default {
12
- id: 'walletAccountsApi',
13
- type: 'api',
14
- factory: walletAccountsApi,
15
- dependencies: ['walletAccounts', 'enabledWalletAccountsAtom'],
16
- }
@@ -1,29 +0,0 @@
1
- import {
2
- enabledWalletAccountsAtomDefinition,
3
- walletAccountsAtomDefinition,
4
- } from '@exodus/wallet-accounts/atoms'
5
- import walletAccountsDefinition from '@exodus/wallet-accounts/module'
6
-
7
- import walletAccountsApiDefinition from './api'
8
- import walletAccountsPluginDefinition from './plugin'
9
-
10
- const walletAccounts = () => {
11
- return {
12
- id: 'walletAccounts',
13
- definitions: [
14
- {
15
- definition: walletAccountsDefinition,
16
- writesAtoms: ['walletAccountsAtom'],
17
- },
18
- {
19
- definition: walletAccountsAtomDefinition,
20
- storage: { namespace: 'walletAccounts' },
21
- },
22
- { definition: enabledWalletAccountsAtomDefinition },
23
- { definition: walletAccountsApiDefinition },
24
- { definition: walletAccountsPluginDefinition },
25
- ],
26
- }
27
- }
28
-
29
- export default walletAccounts
@@ -1,18 +0,0 @@
1
- const walletAccountsPlugin = ({ walletAccounts }) => {
2
- const onUnlock = async () => {
3
- await walletAccounts.load()
4
- }
5
-
6
- const onClear = async () => {
7
- await walletAccounts.clear()
8
- }
9
-
10
- return { onUnlock, onClear }
11
- }
12
-
13
- export default {
14
- id: 'walletAccountsLifecyclePlugin',
15
- type: 'plugin',
16
- factory: walletAccountsPlugin,
17
- dependencies: ['walletAccounts'],
18
- }