@metamask/snaps-controllers 20.0.0 → 20.0.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
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [20.0.1]
11
+
12
+ ### Fixed
13
+
14
+ - Skip refetching the registry in `handleRegistryUpdate` ([#3961](https://github.com/MetaMask/snaps/pull/3961))
15
+
10
16
  ## [20.0.0]
11
17
 
12
18
  ### Changed
@@ -1189,7 +1195,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1189
1195
  - The version of the package no longer needs to match the version of all other
1190
1196
  MetaMask Snaps packages.
1191
1197
 
1192
- [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@20.0.0...HEAD
1198
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@20.0.1...HEAD
1199
+ [20.0.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@20.0.0...@metamask/snaps-controllers@20.0.1
1193
1200
  [20.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@19.0.1...@metamask/snaps-controllers@20.0.0
1194
1201
  [19.0.1]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@19.0.0...@metamask/snaps-controllers@19.0.1
1195
1202
  [19.0.0]: https://github.com/MetaMask/snaps/compare/@metamask/snaps-controllers@18.0.4...@metamask/snaps-controllers@19.0.0
@@ -499,7 +499,7 @@ class SnapController extends base_controller_1.BaseController {
499
499
  checksum: snap.manifest.source.shasum,
500
500
  };
501
501
  return blockListArg;
502
- }, {}));
502
+ }, {}), true);
503
503
  await Promise.all(Object.entries(blockedSnaps).map(async ([snapId, { status, reason }]) => {
504
504
  if (status === registry_1.SnapRegistryStatus.Blocked) {
505
505
  return this.#blockSnap(snapId, reason);
@@ -513,7 +513,7 @@ class SnapController extends base_controller_1.BaseController {
513
513
  await Promise.allSettled(Object.values(this.state.snaps)
514
514
  .filter((snap) => snap.preinstalled)
515
515
  .map(async (snap) => {
516
- const resolvedVersion = await this.#resolveAllowlistVersion(snap.id, preinstalledVersionRange);
516
+ const resolvedVersion = await this.#resolveAllowlistVersion(snap.id, preinstalledVersionRange, true);
517
517
  if (resolvedVersion !== preinstalledVersionRange &&
518
518
  (0, utils_1.gtVersion)(resolvedVersion, snap.version)) {
519
519
  const location = this.#detectSnapLocation(snap.id, {
@@ -1640,8 +1640,8 @@ class SnapController extends base_controller_1.BaseController {
1640
1640
  throw error;
1641
1641
  }
1642
1642
  }
1643
- async #resolveAllowlistVersion(snapId, versionRange) {
1644
- return await this.messenger.call('SnapRegistryController:resolveVersion', snapId, versionRange);
1643
+ async #resolveAllowlistVersion(snapId, versionRange, skipRefetch = false) {
1644
+ return await this.messenger.call('SnapRegistryController:resolveVersion', snapId, versionRange, skipRefetch);
1645
1645
  }
1646
1646
  /**
1647
1647
  * Returns a promise representing the complete installation of the requested snap.