@exodus/headless 2.0.0-alpha.131 → 2.0.0-alpha.133
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 +13 -0
- package/package.json +11 -11
- package/src/application.js +15 -11
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
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.133](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.132...@exodus/headless@2.0.0-alpha.133) (2023-10-04)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- clear storage in parallel ([#4314](https://github.com/ExodusMovement/exodus-hydra/issues/4314)) ([e035d9f](https://github.com/ExodusMovement/exodus-hydra/commit/e035d9f082af16e1aad57348f4011fd4f077929d))
|
|
11
|
+
- **remote-config:** redux module ([#4319](https://github.com/ExodusMovement/exodus-hydra/issues/4319)) ([883954a](https://github.com/ExodusMovement/exodus-hydra/commit/883954ad80acd1b01183a848963c6d0181e66bb7))
|
|
12
|
+
|
|
13
|
+
## [2.0.0-alpha.132](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.131...@exodus/headless@2.0.0-alpha.132) (2023-10-03)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
- **crypto-news-monitor:** add redux module ([#4294](https://github.com/ExodusMovement/exodus-hydra/issues/4294)) ([fed61cb](https://github.com/ExodusMovement/exodus-hydra/commit/fed61cbd7ba9bdb37efea6288078a2aa76c22364))
|
|
18
|
+
|
|
6
19
|
## [2.0.0-alpha.131](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0-alpha.130...@exodus/headless@2.0.0-alpha.131) (2023-09-27)
|
|
7
20
|
|
|
8
21
|
**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.
|
|
3
|
+
"version": "2.0.0-alpha.133",
|
|
4
4
|
"description": "The platform-agnostic Exodus wallet SDK",
|
|
5
5
|
"author": "Exodus Movement Inc.",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@exodus/address-provider": "^7.4.4",
|
|
30
|
-
"@exodus/assets-feature": "^3.
|
|
30
|
+
"@exodus/assets-feature": "^3.2.0",
|
|
31
31
|
"@exodus/atoms": "^5.7.1",
|
|
32
|
-
"@exodus/auto-enable-assets-plugin": "^4.
|
|
33
|
-
"@exodus/available-assets": "^
|
|
32
|
+
"@exodus/auto-enable-assets-plugin": "^4.3.0",
|
|
33
|
+
"@exodus/available-assets": "^6.0.0",
|
|
34
34
|
"@exodus/balances": "^11.0.2",
|
|
35
35
|
"@exodus/basic-utils": "^2.0.0",
|
|
36
|
-
"@exodus/blockchain-metadata": "^14.
|
|
36
|
+
"@exodus/blockchain-metadata": "^14.1.0",
|
|
37
37
|
"@exodus/dependency-injection": "^2.0.1",
|
|
38
38
|
"@exodus/dependency-preprocessors": "^3.1.1",
|
|
39
39
|
"@exodus/enabled-assets": "^9.0.1",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
"@exodus/module": "^1.2.0",
|
|
49
49
|
"@exodus/pricing": "^1.1.0",
|
|
50
50
|
"@exodus/rates-monitor": "^4.0.1",
|
|
51
|
-
"@exodus/remote-config": "^2.
|
|
51
|
+
"@exodus/remote-config": "^2.2.0",
|
|
52
52
|
"@exodus/restore-progress-tracker": "^3.0.0",
|
|
53
53
|
"@exodus/sodium-crypto": "^3.2.0",
|
|
54
54
|
"@exodus/wallet": "^9.4.0",
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"@exodus/ab-testing": "^7.0.0",
|
|
64
64
|
"@exodus/algorand-lib": "^2.0.1",
|
|
65
65
|
"@exodus/algorand-meta": "^1.1.4",
|
|
66
|
-
"@exodus/apy-rates": "^3.3.
|
|
66
|
+
"@exodus/apy-rates": "^3.3.1",
|
|
67
67
|
"@exodus/assets-feature": "workspace:^",
|
|
68
68
|
"@exodus/bitcoin-plugin": "^1.0.14",
|
|
69
69
|
"@exodus/connected-origins": "^3.3.0",
|
|
70
|
-
"@exodus/crypto-news-monitor": "^4.
|
|
70
|
+
"@exodus/crypto-news-monitor": "^4.1.0",
|
|
71
71
|
"@exodus/currency": "^2.2.0",
|
|
72
72
|
"@exodus/ethereum-lib": "^3.3.34",
|
|
73
73
|
"@exodus/ethereum-meta": "^1.0.23",
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
"@exodus/litecoin-meta": "^1.0.0",
|
|
78
78
|
"@exodus/market-history": "^7.1.0",
|
|
79
79
|
"@exodus/models": "^10.1.0",
|
|
80
|
-
"@exodus/nfts": "^6.
|
|
81
|
-
"@exodus/personal-notes": "^3.
|
|
80
|
+
"@exodus/nfts": "^6.3.0",
|
|
81
|
+
"@exodus/personal-notes": "^3.6.0",
|
|
82
82
|
"@exodus/referrals": "^8.0.1",
|
|
83
83
|
"@exodus/solana-lib": "^1.3.11",
|
|
84
84
|
"@exodus/solana-meta": "^1.0.2",
|
|
@@ -97,5 +97,5 @@
|
|
|
97
97
|
"msw": "^1.3.0",
|
|
98
98
|
"p-defer": "^4.0.0"
|
|
99
99
|
},
|
|
100
|
-
"gitHead": "
|
|
100
|
+
"gitHead": "1908c8711ecb3788f4de75d2468720a285fa3107"
|
|
101
101
|
}
|
package/src/application.js
CHANGED
|
@@ -56,7 +56,7 @@ class Application extends ExodusModule {
|
|
|
56
56
|
const walletExists = await this.#wallet.exists()
|
|
57
57
|
|
|
58
58
|
if (isImporting || !walletExists) {
|
|
59
|
-
await this.fire(Hook.Clear)
|
|
59
|
+
await this.fire(Hook.Clear, null, { concurrent: true })
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
if (isImporting) await this.fire(Hook.Import)
|
|
@@ -119,24 +119,28 @@ class Application extends ExodusModule {
|
|
|
119
119
|
this.#hooks[hookName].push(listener)
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
fire = async (hookName, params) => {
|
|
122
|
+
fire = async (hookName, params, { concurrent } = {}) => {
|
|
123
123
|
assert(HOOKS.has(hookName), `no such hook: ${hookName}`)
|
|
124
|
-
|
|
124
|
+
|
|
125
|
+
this._logger.debug(`firing hooks ${concurrent ? 'concurrently' : 'sequentially'}`, hookName)
|
|
125
126
|
|
|
126
127
|
const hooks = this.#hooks[hookName] || []
|
|
127
128
|
|
|
128
|
-
|
|
129
|
+
const hookFns = hooks.map((hook) => async () => {
|
|
129
130
|
try {
|
|
130
|
-
await
|
|
131
|
+
await hook(params)
|
|
131
132
|
} catch (err) {
|
|
132
|
-
this._logger.error(
|
|
133
|
-
`application lifecycle hook failed: ${hookName}`,
|
|
134
|
-
hooks[i].name,
|
|
135
|
-
params,
|
|
136
|
-
err
|
|
137
|
-
)
|
|
133
|
+
this._logger.error(`application lifecycle hook failed: ${hookName}`, hook.name, params, err)
|
|
138
134
|
throw err
|
|
139
135
|
}
|
|
136
|
+
})
|
|
137
|
+
|
|
138
|
+
if (concurrent) {
|
|
139
|
+
await Promise.allSettled(hookFns.map((promise) => promise()))
|
|
140
|
+
} else {
|
|
141
|
+
for (let i = 0; i < hookFns.length; i++) {
|
|
142
|
+
await hookFns[i]()
|
|
143
|
+
}
|
|
140
144
|
}
|
|
141
145
|
|
|
142
146
|
this.emit(hookName, params)
|