@exodus/headless 2.0.0-alpha.85 → 2.0.0-alpha.87

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,18 @@
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.87](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.86...@exodus/headless@2.0.0-alpha.87) (2023-07-25)
7
+
8
+ ### Features
9
+
10
+ - **headless:** use locale feature ([#2880](https://github.com/ExodusMovement/exodus-hydra/issues/2880)) ([7371aa4](https://github.com/ExodusMovement/exodus-hydra/commit/7371aa41e90f4150a448fc6ce8501033e6def193))
11
+
12
+ ## [2.0.0-alpha.86](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.85...@exodus/headless@2.0.0-alpha.86) (2023-07-25)
13
+
14
+ ### Bug Fixes
15
+
16
+ - restoreAtom ([#2878](https://github.com/ExodusMovement/exodus-hydra/issues/2878)) ([8725a49](https://github.com/ExodusMovement/exodus-hydra/commit/8725a49ad51c0658b15c6604b333b6479bef64d9))
17
+
6
18
  ## [2.0.0-alpha.85](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.84...@exodus/headless@2.0.0-alpha.85) (2023-07-24)
7
19
 
8
20
  ### ⚠ BREAKING CHANGES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.85",
3
+ "version": "2.0.0-alpha.87",
4
4
  "description": "The platform-agnostic Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc.",
6
6
  "main": "src/index.js",
@@ -45,10 +45,11 @@
45
45
  "@exodus/geolocation": "^2.1.1",
46
46
  "@exodus/key-identifier-provider": "^1.1.3",
47
47
  "@exodus/keychain": "^4.1.0",
48
+ "@exodus/locale": "^1.1.0",
48
49
  "@exodus/module": "^1.0.0",
49
50
  "@exodus/rates-monitor": "^3.0.0",
50
- "@exodus/restore-progress-tracker": "^2.0.4",
51
- "@exodus/wallet": "^8.1.0",
51
+ "@exodus/restore-progress-tracker": "^2.0.5",
52
+ "@exodus/wallet": "^8.1.1",
52
53
  "@exodus/wallet-accounts": "^10.1.0",
53
54
  "@exodus/wallet-compatibility-modes": "^3.0.0",
54
55
  "bip39": "^2.6.0",
@@ -90,5 +91,5 @@
90
91
  "nock": "^13.3.1",
91
92
  "p-defer": "^4.0.0"
92
93
  },
93
- "gitHead": "c82e55420fe2b81dc15bd70b60a7cb3e5f060980"
94
+ "gitHead": "4aa7f1573f70592832912d16cbd2d818cc504b2b"
94
95
  }
package/src/index.js CHANGED
@@ -7,6 +7,7 @@ import enabledAssets from '@exodus/enabled-assets'
7
7
  import featureFlags from '@exodus/feature-flags'
8
8
  import geolocation from '@exodus/geolocation'
9
9
  import keychain from '@exodus/keychain'
10
+ import locale from '@exodus/locale'
10
11
  import rates from '@exodus/rates-monitor'
11
12
  import restoreProgressTracker from '@exodus/restore-progress-tracker'
12
13
  import wallet from '@exodus/wallet'
@@ -16,7 +17,6 @@ import createApi from './api'
16
17
  import attachAtoms from './atoms/attach'
17
18
  import { atomsToAttach } from './constants'
18
19
  import fees from './features/fees'
19
- import locale from './features/locale'
20
20
  import pricing from './features/pricing'
21
21
  import remoteConfig from './features/remote-config'
22
22
  import createIOC from './ioc'
@@ -1,14 +0,0 @@
1
- const localeApi = ({ languageAtom, currencyAtom }) => ({
2
- locale: {
3
- setLanguage: (value) => languageAtom.set(value),
4
- setCurrency: (value) => currencyAtom.set(value),
5
- },
6
- })
7
-
8
- // eslint-disable-next-line @exodus/export-default/named
9
- export default {
10
- id: 'localeApi',
11
- type: 'api',
12
- factory: localeApi,
13
- dependencies: ['languageAtom', 'currencyAtom'],
14
- }
@@ -1,50 +0,0 @@
1
- import { createStorageAtomFactory } from '@exodus/atoms'
2
- import { createFusionAtom } from '@exodus/fusion/atoms'
3
-
4
- import localeApiDefinition from './api'
5
- import localePluginDefinition from './plugin'
6
-
7
- const locale = () => {
8
- return {
9
- id: 'locale',
10
- definitions: [
11
- {
12
- definition: {
13
- id: 'currencyAtom',
14
- type: 'atom',
15
- factory: ({ fusion, config }) =>
16
- createFusionAtom({
17
- fusion,
18
- path: `private.currency`,
19
- defaultValue: config.defaultValue,
20
- }),
21
- dependencies: ['fusion', 'config'],
22
- },
23
- },
24
- {
25
- definition: {
26
- id: 'languageAtom',
27
- type: 'atom',
28
- factory: ({ storage, config }) =>
29
- createStorageAtomFactory({ storage })({
30
- key: 'language',
31
- defaultValue: config.defaultValue,
32
- isSoleWriter: true,
33
- }),
34
- dependencies: ['storage', 'config'],
35
- },
36
- aliases: [
37
- {
38
- implementationId: 'unsafeStorage',
39
- interfaceId: 'storage',
40
- },
41
- ],
42
- storage: { namespace: 'locale' },
43
- },
44
- { definition: localePluginDefinition, writesAtoms: ['languageAtom'] },
45
- { definition: localeApiDefinition, writesAtoms: ['languageAtom', 'currencyAtom'] },
46
- ],
47
- }
48
- }
49
-
50
- export default locale
@@ -1,15 +0,0 @@
1
- const localePlugin = ({ languageAtom }) => {
2
- const onClear = async () => {
3
- await languageAtom.set(undefined)
4
- }
5
-
6
- return { onClear }
7
- }
8
-
9
- // eslint-disable-next-line @exodus/export-default/named
10
- export default {
11
- id: 'localeLifecyclePlugin',
12
- type: 'plugin',
13
- factory: localePlugin,
14
- dependencies: ['languageAtom'],
15
- }