@exodus/headless 2.0.0-alpha.0 → 2.0.0-alpha.1

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.1](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@2.0.0...@exodus/headless@2.0.0-alpha.1) (2023-04-05)
7
+
8
+ ### Features
9
+
10
+ - backup after restore ([#1123](https://github.com/ExodusMovement/exodus-hydra/issues/1123)) ([c08ece2](https://github.com/ExodusMovement/exodus-hydra/commit/c08ece22d8a80e995a0249abadcc20765350840d))
11
+
6
12
  ## [2.0.0-alpha.0](https://github.com/ExodusMovement/exodus-hydra/compare/@exodus/headless@1.1.2...@exodus/headless@2.2.0-alpha.0) (2023-04-04)
7
13
 
8
14
  ### ⚠ BREAKING CHANGES
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exodus/headless",
3
- "version": "2.0.0-alpha.0",
3
+ "version": "2.0.0-alpha.1",
4
4
  "description": "The headless Exodus wallet SDK",
5
5
  "author": "Exodus Movement Inc",
6
6
  "main": "src/index.js",
@@ -48,5 +48,5 @@
48
48
  "eslint": "^8.33.0",
49
49
  "jest": "^29.1.2"
50
50
  },
51
- "gitHead": "ff01c1446a524ece07820d96150512ac0eebf568"
51
+ "gitHead": "885fc898545049d57c52696e9456aab6c2ecc1a2"
52
52
  }
@@ -80,16 +80,22 @@ class Application extends ExodusModule {
80
80
  load = async () => {
81
81
  await this.#applicationStarted
82
82
 
83
- const [walletExists, hasPassphraseSet, isLocked, isBackedUp] = await Promise.all([
83
+ const [walletExists, hasPassphraseSet, isLocked, isBackedUp, isRestoring] = await Promise.all([
84
84
  this.#wallet.exists(),
85
85
  this.#wallet.hasPassphraseSet(),
86
86
  this.#wallet.isLocked(),
87
87
  this.#wallet.isBackedUp(),
88
+ this.isRestoring(),
88
89
  ])
89
90
 
90
- await this.fire(HOOKS.load, { walletExists, hasPassphraseSet, isLocked, isBackedUp })
91
+ await this.fire(HOOKS.load, {
92
+ walletExists,
93
+ hasPassphraseSet,
94
+ isLocked,
95
+ isBackedUp,
96
+ isRestoring,
97
+ })
91
98
  }
92
-
93
99
  unload = async () => {
94
100
  await this.#applicationStarted
95
101
  await this.#passphraseCache.scheduleClear()
@@ -174,6 +180,7 @@ class Application extends ExodusModule {
174
180
  if (isRestoring) {
175
181
  await this.fire(HOOKS.restore)
176
182
  await this.#storage.delete(RESTORE_FLAG)
183
+ await this.setBackedUp()
177
184
  await this.fire(HOOKS['restore-completed'])
178
185
  }
179
186