@metamask-previews/assets-controller 8.0.1-preview-781882851 → 8.0.2-preview-d3514bcb5

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,21 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Fixed
11
+
12
+ - `AssetsController` now re-evaluates the `isEnabled` callback when handling data-source active chain updates, instead of snapshotting its return value at construction ([#8914](https://github.com/MetaMask/core/pull/8914))
13
+ - `AssetsController` no longer skips constructor initialization when `isEnabled` returns false at construction time, so the controller can handle active chain updates after `isEnabled` later becomes true ([#8914](https://github.com/MetaMask/core/pull/8914))
14
+
15
+ ## [8.0.2]
16
+
17
+ ### Changed
18
+
19
+ - Bump `@metamask/keyring-controller` from `^25.5.0` to `^26.0.0` ([#8912](https://github.com/MetaMask/core/pull/8912))
20
+ - Bump `@metamask/assets-controllers` from `^108.1.0` to `^108.2.0` ([#8911](https://github.com/MetaMask/core/pull/8911))
21
+ - Bump `@metamask/account-tree-controller` from `^7.4.0` to `^7.5.0` ([#8912](https://github.com/MetaMask/core/pull/8912))
22
+ - Bump `@metamask/accounts-controller` from `^38.1.1` to `^38.1.2` ([#8912](https://github.com/MetaMask/core/pull/8912))
23
+ - Bump `@metamask/core-backend` from `^6.3.0` to `^6.3.1` ([#8912](https://github.com/MetaMask/core/pull/8912))
24
+
10
25
  ## [8.0.1]
11
26
 
12
27
  ### Fixed
@@ -521,7 +536,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
521
536
  - Refactor `RpcDataSource` to delegate polling to `BalanceFetcher` and `TokenDetector` services ([#7709](https://github.com/MetaMask/core/pull/7709))
522
537
  - Refactor `BalanceFetcher` and `TokenDetector` to extend `StaticIntervalPollingControllerOnly` for independent polling management ([#7709](https://github.com/MetaMask/core/pull/7709))
523
538
 
524
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.1...HEAD
539
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.2...HEAD
540
+ [8.0.2]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.1...@metamask/assets-controller@8.0.2
525
541
  [8.0.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.0...@metamask/assets-controller@8.0.1
526
542
  [8.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@7.1.2...@metamask/assets-controller@8.0.0
527
543
  [7.1.2]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@7.1.1...@metamask/assets-controller@7.1.2
@@ -283,7 +283,7 @@ class AssetsController extends base_controller_1.BaseController {
283
283
  _AssetsController_unsubscribeBasicFunctionality.set(this, null);
284
284
  _AssetsController_queryApiClient.set(this, void 0);
285
285
  _AssetsController_onActiveChainsUpdated.set(this, void 0);
286
- __classPrivateFieldSet(this, _AssetsController_isEnabled, isEnabled(), "f");
286
+ __classPrivateFieldSet(this, _AssetsController_isEnabled, isEnabled, "f");
287
287
  __classPrivateFieldSet(this, _AssetsController_isBasicFunctionality, isBasicFunctionality ?? (() => true), "f");
288
288
  __classPrivateFieldSet(this, _AssetsController_defaultUpdateInterval, defaultUpdateInterval, "f");
289
289
  __classPrivateFieldSet(this, _AssetsController_trace, trace, "f");
@@ -361,10 +361,6 @@ class AssetsController extends base_controller_1.BaseController {
361
361
  __classPrivateFieldSet(this, _AssetsController_rpcFallbackMiddleware, new RpcFallbackMiddleware_1.RpcFallbackMiddleware({
362
362
  rpcDataSource: __classPrivateFieldGet(this, _AssetsController_rpcDataSource, "f"),
363
363
  }), "f");
364
- if (!__classPrivateFieldGet(this, _AssetsController_isEnabled, "f")) {
365
- log('AssetsController is disabled, skipping initialization');
366
- return;
367
- }
368
364
  log('Initializing AssetsController', {
369
365
  defaultUpdateInterval: __classPrivateFieldGet(this, _AssetsController_defaultUpdateInterval, "f"),
370
366
  });
@@ -1146,7 +1142,7 @@ _AssetsController_isEnabled = new WeakMap(), _AssetsController_isBasicFunctional
1146
1142
  }, _AssetsController_registerActionHandlers = function _AssetsController_registerActionHandlers() {
1147
1143
  this.messenger.registerMethodActionHandlers(this, MESSENGER_EXPOSED_METHODS);
1148
1144
  }, _AssetsController_handleActiveChainsUpdate = function _AssetsController_handleActiveChainsUpdate(dataSourceId, activeChains, previousChains) {
1149
- if (!__classPrivateFieldGet(this, _AssetsController_isEnabled, "f")) {
1145
+ if (!__classPrivateFieldGet(this, _AssetsController_isEnabled, "f").call(this)) {
1150
1146
  return;
1151
1147
  }
1152
1148
  log('Data source active chains changed', {