You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add enable and disable methods to TokenDetectionController, which control whether the controller is able to make polling requests or all of its network calls are blocked. (#3609).
Note that if the controller is initiated without the disabled constructor option set to false, the enable method will need to be called before the controller can make polling requests in response to subscribed events.
Changed
BREAKING: Bump @metamask/approval-controller dependency and peer dependency from ^5.1.0 to ^5.1.1 (#3695)
BREAKING: Bump @metamask/network-controller dependency and peer dependency from ^17.0.0 to ^17.1.0 (#3695)
BREAKING: Bump @metamask/preferences-controller dependency and peer dependency from ^5.0.0 to ^5.0.1 (#3695)
BREAKING: Update OpenSeaV2Contract type, renaming supply to total_supply (#3692)
BREAKING:TokenDetectionController is upgraded to extend BaseControllerV2 and StaticIntervalPollingController (#3609).
The constructor now expects an options object as its only argument, with required properties messenger, networkClientId, required callbacks onPreferencesStateChange, getBalancesInSingleCall, addDetectedTokens, getTokenState, getPreferencesState, and optional properties disabled, interval, selectedAddress.
Bump @metamask/controller-utils from 8.0.0 to ^8.0.1 (#3695)
Fixed
Fix error caused by OpenSea API rename of supply to total_supply (#3692)
Fix CodefiTokenPricesServiceV2 support for Shiden (#3683)
Improve how CodefiTokenPricesServiceV2 handles token price update failures (#3687)
Previously a single failed token price update would prevent all other token prices from updating as well. With this update, we log and error and continue when we fail to update a token price, ensuring the others still get updated.
@metamask/base-controller 4.0.1
Changed
Deprecate subscribe property from BaseControllerV2 (#3590, #3698)
This property was used to differentiate between BaseControllerV1 and BaseControllerV2 controllers. It is no longer used, so it has been marked as deprecated.
BREAKING:ComposableController is upgraded to extend BaseControllerV2 (#3590)
The constructor now expects an options object with required properties controllers and messenger as its only argument.
ComposableController no longer has a subscribe method. Instead, listeners for ComposableController events must be registered to the controller messenger that generated the restricted messenger assigned to the instance's messagingSystem class field.
Any getters for ComposableController state that access the internal class field directly should be refactored to instead use listeners that are subscribed to ComposableControllerStateChangeEvent.
BREAKING: Bump @metamask/network-controller dependency and peer dependency from ^17.0.0 to ^17.1.0 (#3695)
BREAKING: The GasFeeController now detects network changes using the NetworkController:networkDidChange event instead of NetworkController:stateChange (#3610)
Additionally, the optional constructor parameter onNetworkStateChange has been replaced by onNetworkDidChange
Bump @metamask/polling-controller to ^4.0.0 (#3695, #3667, #3636)
This update adds two new methods to each polling controller: _startPollingByNetworkClientId and _stopPollingByPollingTokenSetId. These methods are intended for internal use, and should not be called directly.
@metamask/json-rpc-engine 7.3.1
Changed
There are no consumer-facing changes to this package. This version is a part of a synchronized release across all packages in our monorepo.
Add getNetworkConfigurationByNetworkClientId method which can be used to retrieve details for both custom and built-in networks (using the network configuration object shape) (#2055)
Add NetworkController:getNetworkConfigurationByNetworkClientId messenger action for the previous method (#2055)
Create new network clients before updating networkConfigurations state (#3679)
This primarily affects subscribers to the NetworkController:stateChange event. It's now safe to use a network client for any network that appears in the networkConfigurations state, whereas previously it was possible that synchronous attempts to access a network client in response to this event would fail.
Add NetworkState payload to NetworkController:networkWillChange and NetworkController:networkDidChange (#3598)
Both of these events now include NetworkState as the first and only item in the payload