@exodus/headless 2.0.0-alpha.120 → 2.0.0-alpha.121

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,16 @@
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.121](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.120...@exodus/headless@2.0.0-alpha.121) (2023-09-07)
7
+
8
+ ### Features
9
+
10
+ - **headless:** do not attach atoms anymore ([#3890](https://github.com/ExodusMovement/exodus-hydra/issues/3890)) ([78894d7](https://github.com/ExodusMovement/exodus-hydra/commit/78894d7f9148f6f2754cc71ecf649161d7056558))
11
+
12
+ ### Bug Fixes
13
+
14
+ - headless dependency definition ([#3889](https://github.com/ExodusMovement/exodus-hydra/issues/3889)) ([627b24e](https://github.com/ExodusMovement/exodus-hydra/commit/627b24e3fa214e5222d1c118deb0eb7baae8f144))
15
+
6
16
  ## [2.0.0-alpha.120](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.119...@exodus/headless@2.0.0-alpha.120) (2023-09-06)
7
17
 
8
18
  ### Features
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.120",
3
+ "version": "2.0.0-alpha.121",
4
4
  "description": "The platform-agnostic Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "main": "src/index.js",
@@ -30,7 +30,7 @@
30
30
  "@exodus/atoms": "^5.6.0",
31
31
  "@exodus/auto-enable-assets-plugin": "^4.2.1",
32
32
  "@exodus/available-assets": "^5.1.1",
33
- "@exodus/balances": "^11.0.1",
33
+ "@exodus/balances": "^11.0.2",
34
34
  "@exodus/basic-utils": "^2.0.0",
35
35
  "@exodus/blockchain-metadata": "^12.1.3",
36
36
  "@exodus/dependency-injection": "^2.0.1",
@@ -95,5 +95,5 @@
95
95
  "nock": "^13.3.1",
96
96
  "p-defer": "^4.0.0"
97
97
  },
98
- "gitHead": "0e08b6dc2f12cfabc88e8290ace81060b697ee51"
98
+ "gitHead": "4546d6609d1e3b44fb3e03590af1b81c996d696c"
99
99
  }
package/src/constants.js CHANGED
@@ -1,23 +1,3 @@
1
- export const atomsToAttach = [
2
- 'abTestingAtom',
3
- 'apyRatesAtom',
4
- 'availableAssetNamesAtom',
5
- 'balancesAtom',
6
- 'connectedOriginsAtom',
7
- 'cryptoNewsAtom',
8
- 'currencyAtom',
9
- 'enabledWalletAccountsAtom',
10
- 'featureFlagsAtom',
11
- 'geolocationAtom',
12
- 'kycAtom',
13
- 'languageAtom',
14
- 'nftsConfigAtom',
15
- 'personalNotesAtom',
16
- 'referralsAtom',
17
- 'topMoversAtom',
18
- 'walletAccountsAtom',
19
- ]
20
-
21
1
  export const LifecycleHook = Object.freeze({
22
2
  Lock: 'lock',
23
3
  Unlock: 'unlock',
@@ -23,8 +23,6 @@ const createModuleDependencies = ({ config }) =>
23
23
  },
24
24
  {
25
25
  definition: walletCompatibilityModesDefinition,
26
- aliases: [{ implementationId: 'unsafeStorage', interfaceId: 'storage' }],
27
- storage: { namespace: 'walletCompatibilityModes' },
28
26
  },
29
27
  { definition: unlockEncryptedStorageDefinition },
30
28
  ].map(withType('module'))
package/src/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  import addressProvider from '@exodus/address-provider'
2
2
  import availableAssets from '@exodus/available-assets'
3
3
  import balances from '@exodus/balances'
4
- import { pick } from '@exodus/basic-utils'
5
4
  import blockchainMetadata from '@exodus/blockchain-metadata'
6
5
  import enabledAssets from '@exodus/enabled-assets'
7
6
  import featureFlags from '@exodus/feature-flags'
@@ -17,8 +16,6 @@ import wallet from '@exodus/wallet'
17
16
  import walletAccounts from '@exodus/wallet-accounts'
18
17
 
19
18
  import createApi from './api'
20
- import attachAtoms from './atoms/attach'
21
- import { atomsToAttach } from './constants'
22
19
  import createIOC from './ioc'
23
20
  import attachMigrations from './migrations/attach'
24
21
  import attachPlugins from './plugins/attach'
@@ -108,12 +105,6 @@ const createExodus = ({ adapters, config, port }) => {
108
105
  modules: ioc.getByType('module'),
109
106
  })
110
107
 
111
- attachAtoms({
112
- port,
113
- application,
114
- atoms: pick(ioc.getByType('atom'), atomsToAttach),
115
- })
116
-
117
108
  attachPlugins({
118
109
  application,
119
110
  plugins: ioc.getByType('plugin'),
@@ -1,29 +0,0 @@
1
- const emitAtomValue = async (opts) => {
2
- const { port, atomId, atom } = opts
3
- const value = 'value' in opts ? opts.value : await atom.get()
4
- port.emit(atomId, value)
5
- }
6
-
7
- export const emitFromAtoms = ({ atoms, port }) =>
8
- Object.entries(atoms).forEach(async ([atomId, atom]) => emitAtomValue({ port, atomId, atom }))
9
-
10
- const attachAtom = ({ port, application, atom, atomId }) => {
11
- let loaded = false
12
-
13
- application.on('load', async () => {
14
- loaded = true
15
- await emitAtomValue({ port, atomId, atom })
16
- })
17
-
18
- atom.observe((value) => {
19
- if (loaded) emitAtomValue({ port, atomId, atom, value })
20
- })
21
- }
22
-
23
- const attachAtoms = ({ port, application, atoms }) => {
24
- for (const [atomId, atom] of Object.entries(atoms)) {
25
- attachAtom({ port, application, atom, atomId })
26
- }
27
- }
28
-
29
- export default attachAtoms