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

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.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)
7
+
8
+ ### Features
9
+
10
+ - **headless:** stop clearing atoms on attach ([#1854](https://github.com/ExodusMovement/exodus-hydra/issues/1854)) ([16a7f23](https://github.com/ExodusMovement/exodus-hydra/commit/16a7f23fccbc2355810fa1ca837886922056c6f0))
11
+
6
12
  ## [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
13
 
8
14
  **Note:** Version bump only for package @exodus/headless
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.37",
4
4
  "description": "The headless Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc",
6
6
  "main": "src/index.js",
@@ -87,5 +87,5 @@
87
87
  "nock": "^13.3.1",
88
88
  "p-defer": "^4.0.0"
89
89
  },
90
- "gitHead": "364e33c13b828082d62cf5e3f4dd361a7aaa9810"
90
+ "gitHead": "5e1b4886d5de0224d5f9e0b4d08d05e1d4890861"
91
91
  }
@@ -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
  })