@metamask-previews/keyring-controller 22.0.1-preview-b33c0741 → 22.0.2-preview-ef0f18a

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,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [22.0.2]
11
+
12
+ ### Fixed
13
+
14
+ - Fixed serialized keyring comparison when establishing whether a vault update is needed ([#5928](https://github.com/MetaMask/core/pull/5928))
15
+ - The vault update was being skipped when a keyring class returns an object shallow copy through `.serialize()`.
16
+
10
17
  ## [22.0.1]
11
18
 
12
19
  ### Changed
@@ -789,7 +796,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
789
796
 
790
797
  All changes listed after this point were applied to this package following the monorepo conversion.
791
798
 
792
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@22.0.1...HEAD
799
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@22.0.2...HEAD
800
+ [22.0.2]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@22.0.1...@metamask/keyring-controller@22.0.2
793
801
  [22.0.1]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@22.0.0...@metamask/keyring-controller@22.0.1
794
802
  [22.0.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@21.0.6...@metamask/keyring-controller@22.0.0
795
803
  [21.0.6]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@21.0.5...@metamask/keyring-controller@21.0.6
@@ -1695,9 +1695,9 @@ async function _KeyringController_assertNoDuplicateAccounts(additionalKeyrings =
1695
1695
  */
1696
1696
  async function _KeyringController_persistOrRollback(callback) {
1697
1697
  return __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_withRollback).call(this, async ({ releaseLock }) => {
1698
- const oldState = await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_getSessionState).call(this);
1698
+ const oldState = JSON.stringify(await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_getSessionState).call(this));
1699
1699
  const callbackResult = await callback({ releaseLock });
1700
- const newState = await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_getSessionState).call(this);
1700
+ const newState = JSON.stringify(await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_getSessionState).call(this));
1701
1701
  // State is committed only if the operation is successful and need to trigger a vault update.
1702
1702
  if (!(0, lodash_1.isEqual)(oldState, newState)) {
1703
1703
  await __classPrivateFieldGet(this, _KeyringController_instances, "m", _KeyringController_updateVault).call(this);