@metamask/assets-controller 8.0.2 → 8.2.0

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,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [8.2.0]
11
+
12
+ ### Changed
13
+
14
+ - `MulticallClient` no longer falls back to individual RPC calls by default; it retries and returns failed responses when retries are exhausted. Pass `{ fallbackToSingleCalls: true }` to `batchBalanceOf` to opt into per-token RPC fallback after retries (used by balance fetching, not token detection) ([#8925](https://github.com/MetaMask/core/pull/8925))
15
+ - Bump `@metamask/assets-controllers` from `^108.2.0` to `^108.3.0` ([#8941](https://github.com/MetaMask/core/pull/8941))
16
+
17
+ ## [8.1.0]
18
+
19
+ ### Changed
20
+
21
+ - `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))
22
+ - `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))
23
+
10
24
  ## [8.0.2]
11
25
 
12
26
  ### Changed
@@ -531,7 +545,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
531
545
  - Refactor `RpcDataSource` to delegate polling to `BalanceFetcher` and `TokenDetector` services ([#7709](https://github.com/MetaMask/core/pull/7709))
532
546
  - Refactor `BalanceFetcher` and `TokenDetector` to extend `StaticIntervalPollingControllerOnly` for independent polling management ([#7709](https://github.com/MetaMask/core/pull/7709))
533
547
 
534
- [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.2...HEAD
548
+ [Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.2.0...HEAD
549
+ [8.2.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.1.0...@metamask/assets-controller@8.2.0
550
+ [8.1.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.2...@metamask/assets-controller@8.1.0
535
551
  [8.0.2]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.1...@metamask/assets-controller@8.0.2
536
552
  [8.0.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@8.0.0...@metamask/assets-controller@8.0.1
537
553
  [8.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controller@7.1.2...@metamask/assets-controller@8.0.0
@@ -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', {