@exodus/headless 2.0.0-alpha.36 → 2.0.0-alpha.38

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,23 @@
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.38](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.37...@exodus/headless@2.0.0-alpha.38) (2023-06-14)
7
+
8
+ ### ⚠ BREAKING CHANGES
9
+
10
+ - move start out of resolve (#1916)
11
+
12
+ ### Features
13
+
14
+ - clear personal notes as other modules ([#1922](https://github.com/ExodusMovement/exodus-hydra/issues/1922)) ([9324208](https://github.com/ExodusMovement/exodus-hydra/commit/9324208251f695a016f088bd0138a7ea5c838afa))
15
+ - move start out of resolve ([#1916](https://github.com/ExodusMovement/exodus-hydra/issues/1916)) ([85d53fd](https://github.com/ExodusMovement/exodus-hydra/commit/85d53fd547e6eebda8d8a992dffe5a21468baeab))
16
+
17
+ ## [2.0.0-alpha.37](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.36...@exodus/headless@2.0.0-alpha.37) (2023-06-09)
18
+
19
+ ### Features
20
+
21
+ - **headless:** stop clearing atoms on attach ([#1854](https://github.com/ExodusMovement/exodus-hydra/issues/1854)) ([16a7f23](https://github.com/ExodusMovement/exodus-hydra/commit/16a7f23fccbc2355810fa1ca837886922056c6f0))
22
+
6
23
  ## [2.0.0-alpha.36](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.35...@exodus/headless@2.0.0-alpha.36) (2023-06-09)
7
24
 
8
25
  **Note:** Version bump only for package @exodus/headless
package/README.md CHANGED
@@ -39,7 +39,10 @@ container.register({
39
39
  // 5. Resolve exodus instance
40
40
  const exodus = container.resolve()
41
41
 
42
- // 6. Use it!
42
+ // 6. Start exodus instance
43
+ await exodus.wallet.start()
44
+
45
+ // 7. Use it!
43
46
  await exodus.wallet.create({ passphrase: 'my-super-secure-passphrase' })
44
47
  ```
45
48
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.36",
3
+ "version": "2.0.0-alpha.38",
4
4
  "description": "The headless Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc",
6
6
  "main": "src/index.js",
@@ -30,7 +30,7 @@
30
30
  "@exodus/apy-rates": "^2.1.0",
31
31
  "@exodus/atoms": "^3.5.3",
32
32
  "@exodus/auto-enable-assets-plugin": "^4.0.1",
33
- "@exodus/available-assets": "^2.0.0",
33
+ "@exodus/available-assets": "^2.0.1",
34
34
  "@exodus/balances": "^6.0.0",
35
35
  "@exodus/basic-utils": "^2.0.0",
36
36
  "@exodus/blockchain-metadata": "^8.0.1",
@@ -87,5 +87,5 @@
87
87
  "nock": "^13.3.1",
88
88
  "p-defer": "^4.0.0"
89
89
  },
90
- "gitHead": "364e33c13b828082d62cf5e3f4dd361a7aaa9810"
90
+ "gitHead": "9d6e1160ddb2fd7aafec747f4ae52198c761f394"
91
91
  }
package/src/api.js CHANGED
@@ -42,6 +42,7 @@ const createApi = ({ ioc, port }) => {
42
42
  return {
43
43
  wallet: {
44
44
  exists: () => wallet.exists(),
45
+ start: application.start,
45
46
  load: application.load,
46
47
  unload: application.unload,
47
48
  create: application.create,
@@ -17,15 +17,6 @@ const attachAtom = ({ port, application, logger, atom, atomId, lifecycleEvents }
17
17
  })
18
18
  )
19
19
 
20
- application.on('clear', async () => {
21
- try {
22
- await atom?.set(undefined)
23
- } catch (error) {
24
- logger.debug('failed to clear atom', error)
25
- // noop. atom might not support set
26
- }
27
- })
28
-
29
20
  atom.observe((value) => {
30
21
  if (loaded) emitAtomValue({ port, atomId, atom, value })
31
22
  })
package/src/index.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { pick } from '@exodus/basic-utils'
2
- import { PersonalNoteSet } from '@exodus/models'
3
2
 
4
3
  import createApi from './api'
5
4
  import attachAtoms from './atoms/attach'
@@ -17,19 +16,21 @@ const createExodus = ({ adapters, config, port }) => {
17
16
 
18
17
  const { assetsModule, storage } = ioc.getByType('adapter')
19
18
 
20
- const { personalNotesAtom } = ioc.getByType('atom')
19
+ const { languageAtom } = ioc.getByType('atom')
21
20
 
22
21
  const {
23
22
  application,
24
23
  blockchainMetadata,
24
+ connectedOrigins,
25
25
  enabledAssets,
26
26
  featureFlags,
27
27
  kyc,
28
+ nfts,
29
+ personalNotes,
28
30
  referrals,
29
31
  remoteConfig,
30
32
  unlockEncryptedStorage,
31
33
  walletAccounts,
32
- connectedOrigins,
33
34
  } = ioc.getByType('module')
34
35
 
35
36
  const {
@@ -129,10 +130,13 @@ const createExodus = ({ adapters, config, port }) => {
129
130
  blockchainMetadata.clear(),
130
131
  enabledAssets.clear(),
131
132
  connectedOrigins.clear(),
133
+ featureFlags.clear(),
134
+ languageAtom.set(undefined),
132
135
  ])
133
136
 
134
- // TEMP: dont wait for set to complete as encrypted storage is not yet unlocked
135
- personalNotesAtom.set(PersonalNoteSet.EMPTY)
137
+ // TEMP: dont wait to clear as encrypted storage is not yet unlocked
138
+ personalNotes.clear()
139
+ nfts.clear()
136
140
 
137
141
  port.emit('clear')
138
142
  })
@@ -151,8 +155,6 @@ const createExodus = ({ adapters, config, port }) => {
151
155
 
152
156
  attachPlugins({ application, plugins: ioc.getByType('plugin') })
153
157
 
154
- application.start()
155
-
156
158
  return createApi({ ioc, port })
157
159
  }
158
160