@metamask-previews/keyring-controller 21.0.2-preview-31a5eea2 → 21.0.2-preview-634cc823

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
@@ -7,15 +7,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
- ### Changed
11
-
12
- - `ExportableKeyEncryptor` is now a generic type with a type parameter `EncryptionKey` ([#5395](https://github.com/MetaMask/core/pull/5395))
13
- - The type parameter defaults to `unknown`
14
-
15
- ### Fixed
16
-
17
- - Fixed wrong error message thrown when using the wrong password ([#5627](https://github.com/MetaMask/core/pull/5627))
18
-
19
10
  ## [21.0.2]
20
11
 
21
12
  ### Changed
@@ -1295,6 +1295,9 @@ async function _KeyringController_restoreSerializedKeyrings(serializedKeyrings)
1295
1295
  for (const serializedKeyring of serializedKeyrings) {
1296
1296
  await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_restoreKeyring).call(this, serializedKeyring);
1297
1297
  }
1298
+ if (__classPrivateFieldGet(this, _KeyringController_keyrings, "f").length !== __classPrivateFieldGet(this, _KeyringController_keyringsMetadata, "f").length) {
1299
+ throw new Error(constants_1.KeyringControllerError.KeyringMetadataLengthMismatch);
1300
+ }
1298
1301
  }, _KeyringController_unlockKeyrings =
1299
1302
  /**
1300
1303
  * Unlock Keyrings, decrypting the vault and deserializing all
@@ -1352,11 +1355,6 @@ async function _KeyringController_unlockKeyrings(password, encryptionKey, encryp
1352
1355
  throw new Error(constants_1.KeyringControllerError.VaultDataError);
1353
1356
  }
1354
1357
  await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_restoreSerializedKeyrings).call(this, vault);
1355
- // The keyrings array and the keyringsMetadata array should
1356
- // always have the same length while the controller is unlocked.
1357
- if (__classPrivateFieldGet(this, _KeyringController_keyrings, "f").length !== __classPrivateFieldGet(this, _KeyringController_keyringsMetadata, "f").length) {
1358
- throw new Error(constants_1.KeyringControllerError.KeyringMetadataLengthMismatch);
1359
- }
1360
1358
  const updatedKeyrings = await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_getUpdatedKeyrings).call(this);
1361
1359
  this.update((state) => {
1362
1360
  state.keyrings = updatedKeyrings;