All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Bump
@metamask/messengerfrom^1.0.0to^1.2.0(#8364, #8373, #8632) - Bump
@metamask/base-controllerfrom^9.0.1to^9.1.0(#8457)
- Expose missing public
PreferencesControllermethods through its messenger (#8193)- The following actions are now available:
PreferencesController:setFeatureFlagPreferencesController:setIpfsGatewayPreferencesController:setUseTokenDetectionPreferencesController:setUseNftDetectionPreferencesController:setDisplayNftMediaPreferencesController:setSecurityAlertsEnabledPreferencesController:setIsMultiAccountBalancesEnabledPreferencesController:setShowTestNetworksPreferencesController:setIsIpfsGatewayEnabledPreferencesController:setEnableNetworkIncomingTransactionsPreferencesController:setShowMultiRpcModalPreferencesController:setSmartTransactionsOptInStatusPreferencesController:setUseTransactionSimulationsPreferencesController:setTokenSortConfigPreferencesController:setUseSafeChainsListValidationPreferencesController:setPrivacyModePreferencesController:setDismissSmartAccountSuggestionEnabledPreferencesController:setSmartAccountOptInPreferencesController:setTokenNetworkFilter
- Corresponding action types (e.g.
PreferencesControllerSetFeatureFlagAction) are available as well.
- The following actions are now available:
- Bump
@metamask/base-controllerfrom^9.0.0to^9.0.1(#8317) - Bump
@metamask/messengerfrom^0.3.0to^1.0.0(#8317)
- BREAKING: Remove legacy methods and state (#8115)
identities,lostIdentitiesandselectedAddressalong with any associated methods and types were removed.setSmartAccountOptInForAccountswas also removed as it is deprecated and not used in the clients.
- Removed
@metamask/keyring-controllerand@metamask/controller-utilsdependencies (#7995), (#8115)
- Add support for HYPEREVM (chain ID
0x3e7) (#7770)- Add
HYPEREVMinto constantETHERSCAN_SUPPORTED_CHAIN_IDS - Update default controller state so HYPEREVM (Chain ID
0x3e7) is automatically enabled inshowIncomingTransactions
- Add
- Upgrade
@metamask/utilsfrom^11.8.1to^11.9.0(#7511) - Move peer dependencies for controller and service packages to direct dependencies (#7209, #7713)
- The dependencies moved are:
@metamask/keyring-controller(^25.1.0)
- In clients, it is now possible for multiple versions of these packages to exist in the dependency tree.
- For example, this scenario would be valid: a client relies on
@metamask/controller-a1.0.0 and@metamask/controller-b1.0.0, and@metamask/controller-bdepends on@metamask/controller-a1.1.0.
- For example, this scenario would be valid: a client relies on
- Note, however, that the versions specified in the client's
package.jsonalways "win", and you are expected to keep them up to date so as not to break controller and service intercommunication.
- The dependencies moved are:
- Bump
@metamask/controller-utilsfrom^11.16.0to^11.18.0(#7534, #7583)
- Bump
@metamask/controller-utilsfrom^11.15.0to^11.16.0(#7202) - BREAKING: Bump
@metamask/keyring-controllerfrom^24.0.0to^25.0.0(#7202)
- BREAKING: Use new
Messengerfrom@metamask/messenger(#6534)- Previously,
PreferencesControlleraccepted aRestrictedMessengerinstance from@metamask/base-controller.
- Previously,
- BREAKING: Metadata property
anonymousrenamed toincludeInDebugSnapshot(#6534) - BREAKING: Bump
@metamask/keyring-controllerfrom^23.0.0to^24.0.0(#6962) - Bump
@metamask/base-controllerfrom^8.4.2to^9.0.0(#6962)
- Bump
@metamask/base-controllerfrom^8.4.1to^8.4.2(#6917)
- Add support for MONAD (chain ID
0x8f) (#6827)- Add
MONADinto constantETHERSCAN_SUPPORTED_CHAIN_IDS - Update default controller state so MONAD (Chain ID
0x8f) is automatically enabled inshowIncomingTransactions
- Add
- Bump
@metamask/base-controllerfrom^8.4.0to^8.4.1(#6807) - Bump
@metamask/controller-utilsfrom^11.14.0to^11.14.1(#6807)
- Change default for
showMultiRpcModaltofalse(#6723)
- Add a new controller state property:
tokenNetworkFilter(#6707) - Add a new controller method:
setTokenNetworkFilter(#6707) - Add two new controller state metadata properties:
includeInStateLogsandusedInUi(#6525)
- BREAKING: Rename controller state property from
useMultiRpcMigrationtoshowMultiRpcModal(#6707) - BREAKING: Rename controller method from
setUseMultiRpcMigrationtosetShowMultiRpcModal(#6707) - BREAKING: Rename controller state property from
openSeaEnabledtodisplayNftMedia(#4774) - BREAKING: Rename controller method from
setOpenSeaEnabledtosetDisplayNftMedia(#4774) - Bump
@metamask/controller-utilsfrom^11.12.0to^11.14.0(#6620, #6629) - Bump
@metamask/base-controllerfrom^8.1.0to^8.4.0(#6355, #6465, #6632)
- BREAKING: Bump peer dependency
@metamask/keyring-controllerfrom^22.0.0to^23.0.0(#6345) - Bump
@metamask/base-controllerfrom^8.0.1to^8.1.0(#6284) - Bump
@metamask/controller-utilsfrom^11.11.0to^11.12.0(#6303)
- Deprecate preference
smartAccountOptInForAccountsand functionsetSmartAccountOptInForAccounts(#6087)
- Bump
@metamask/controller-utilsfrom^11.10.0to^11.11.0(#6069)- This upgrade includes performance improvements to checksum hex address normalization
- Initialise preference smartAccountOptIn with true value (#6040)
- Add
smartAccountOptIn,smartAccountOptInForAccountspreferences (#6036)
- Add support for SEI (chain ID
0x531) (#6021)- Add
SEIinto constantETHERSCAN_SUPPORTED_CHAIN_IDS - Update default controller state so SEI (Chain ID
0xe705) is automatically enabled inshowIncomingTransactions
- Add
- Bump
@metamask/controller-utilsto^11.10.0(#5935)
- Add
dismissSmartAccountSuggestionEnabledpreference (#5866)
- Bump
@metamask/controller-utilsto^11.9.0(#5812)
- BREAKING: bump
@metamask/keyring-controllerpeer dependency to^22.0.0(#5802) - Bump
@metamask/base-controllerfrom ^8.0.0 to ^8.0.1 (#5722) - Bump
@metamask/controller-utilsto^11.8.0(#5765)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^21.0.0(#5439)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency to^20.0.0(#5426)
- Bump
@metamask/base-controllerfrom^7.0.2to^8.0.0(#5079), (#5135), (#5305) - Bump
@metamask/controller-utilsfrom^11.4.4to^11.5.0(#5135), (#5272)
- Bump
@metamask/controller-utilsfrom^11.4.3to^11.4.4(#5012)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency from^18.0.0to^19.0.0(#4195)
- BREAKING: Bump
@metamask/keyring-controllerpeer dependency from^17.0.0to^18.0.0(#4915) - Bump
@metamask/controller-utilsfrom^11.4.2to^11.4.3(#4915)
- Enable smart transactions by default for new users (#4885)
- Add
useSafeChainsListValidationpreference (#4860)- Add
useSafeChainsListValidationproperty to thePreferencesControllerstate (default:true) - Add
setUseSafeChainsListValidationmethod to set this property
- Add
- Add
tokenSortConfigpreference (#4860)- Add
tokenSortConfigproperty to thePreferencesControllerstate (default value:{ key: 'tokenFiatAmount', order: 'dsc', sortCallback: 'stringNumeric' }) - Add
setTokenSortConfigmethod to set this property
- Add
- Add
privacyModepreference (#4860)- Add
privacyModeproperty to thePreferencesControllerstate (default value:false) - Add
setPrivacyModemethod to set this property
- Add
- Add
useMultiRpcMigrationpreference (#4732)
- Bump
@metamask/base-controllerfrom^7.0.1to^7.0.2(#4862) - Bump
@metamask/controller-utilsfrom^11.3.0to^11.4.2(#4834, #4862, #4870)
- Bump
@metamask/keyring-controllerfrom^17.2.1to^17.2.2(#4734)
- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files (#4648)
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
exportsfield inpackage.jsonlinked to these files. This is an anti-pattern and was rightfully flagged by the "Are the Types Wrong?" tool as "masquerading as CJS". All of the ATTW checks now pass.
- Previously, this package shipped with only one variant of type declaration
files, and these files were only CommonJS-compatible, and the
- Remove chunk files (#4648).
- Previously, the build tool we used to generate JavaScript files extracted common code to "chunk" files. While this was intended to make this package more tree-shakeable, it also made debugging more difficult for our development teams. These chunk files are no longer present.
- Bump
@metamask/base-controllerfrom^6.0.2to^7.0.0(#4625, #4643) - Bump
@metamask/controller-utilsfrom^11.0.2to^11.2.0(#4639, #4651) - Bump
typescriptfrom~5.0.4to~5.2.2(#4576, #4584)
- Upgrade TypeScript version to
~5.0.4and setmoduleResolutionoption toNode16(#3645) - Bump
@metamask/base-controllerfrom^6.0.0to^6.0.2(#4517, #4544) - Bump
@metamask/controller-utilsfrom^11.0.0to^11.0.2(#4517, #4544)
- BREAKING: Bump minimum Node version to 18.18 (#3611)
- BREAKING: Bump peer dependency
@metamask/keyring-controllerto^17.0.0(#4352) - Bump
@metamask/base-controllerto^6.0.0(#4352) - Bump
@metamask/controller-utilsto^11.0.0(#4352)
- Add
smartTransactionsOptInStatuspreference (#3815)- Add
smartTransactionsOptInStatusproperty to thePreferencesControllerstate (default:false) - Add
setSmartTransactionOptInStatusmethod to set this property
- Add
- Add
useTransactionSimulationspreference (#4283)- Add
useTransactionSimulationsproperty to thePreferencesControllerstate (default value:false) - Add
setUseTransactionSimulationsmethod to set this property
- Add
- Bump
@metamask/controller-utilsto^10.0.0(#4342)
- BREAKING: Remove state property
disabledRpcMethodPreferencesalong withsetDisabledRpcMethodPreferencesmethod (#4319)- These were for disabling the
eth_signRPC method, but support for this method is being removed, so this preference is no longer needed.
- These were for disabling the
- Export
ETHERSCAN_SUPPORTED_CHAIN_IDSconstant (#4233)
- BREAKING Bump
@metamask/keyring-controllerpeer dependency to ^16.0.0 (#4234) - Bump
@metamask/base-controllerto^5.0.2(#4232)
- BREAKING Bump peer dependency on
@metamask/keyring-controllerto^15.0.0(#4090) - Restore previous behavior of toChecksumHexAddress (#4046)
- Fix
typesfield inpackage.json(#4047)
- BREAKING: Add ESM build (#3998)
- It's no longer possible to import files from
./distdirectly.
- It's no longer possible to import files from
- Add support for Linea Sepolia (chain ID
0xe705) (#3995)- Update default controller state so
0xe705is automatically enabled inshowIncomingTransactions.
- Update default controller state so
- BREAKING: Bump
@metamask/base-controllerto^5.0.0(#4039)- This version has a number of breaking changes. See the changelog for more.
- BREAKING: Bump peer dependency on
@metamask/keyring-controllerto^14.0.0(#4039) - Bump
@metamask/controller-utilsto^9.0.0(#4039)
- BREAKING: Bump
@metamask/keyring-controllerdependency and peer dependency to^13.0.0(#4007) - BREAKING: Remove support for Optimism Goerli, add support for Optimism Sepolia (#3999)
- Replace
OPTIMISM_TESTNETwithOPTIMISM_SEPOLIAinETHERSCAN_SUPPORTED_CHAIN_IDSandEtherscanSupportedChains. - Replace
0x1a4with0xaa37dcinEtherscanSupportedHexChainId. - Replace
0x1a4with0xaa37dcin defaultshowIncomingTransactionsstate. - Update
setEnabledNetworkIncomingTransactionsto ignore a chain ID of0x1a4; add support for0xaa37dcinstead. - You will likely want to write a migration to transfer the value of
0x1a4for0xaa37dcfor theshowIncomingTransactionsstate property.
- Replace
- Bump
@metamask/controller-utilsto^8.0.4(#4007)
- BREAKING: Move
syncIdentitiesto private, as it's only used internally to update state onKeyringController:stateChangeevent (#3976) - BREAKING: Remove
updateIdentities, as it's not in use anymore (#3976)
- Fix KeyringController state listener to not sync identities when the wallet is locked (which clears the list of accounts) to avoid setting the selected address to
undefined(#3946)
- BREAKING: Keep
PreferencesControllerstate synchronized withKeyringControllerstate (#3799)- The
KeyringController:stateChangeevent is now required by thePreferencesControllermessenger, which is a breaking change. - The package
@metamask/keyring-controllerhas been added as apeerDependencyand as adevDependency, which is a breaking change. - Previously the state was synchronized manually by calling
syncIdentitiesorupdateIdentities. Calling these methods is no longer required.
- The
- Bump
@metamask/base-controllerto^4.1.1(#3760, #3821) - Bump
@metamask/controller-utilsto^8.0.2(#3821)
- Added
getDefaultPreferencesStatefunction (#3736)
- BREAKING Clean up types (#3712)
- Replace
ContactEntryinterface withIdentitytype - Convert
PreferencesStatefrom an interface to a type
- Replace
- BREAKING: Convert to
BaseControllerV2(#3713)- The constructor parameters have changed; rather than accepting an empty "config" parameter and a "state" parameter, there is now just a single object for all constructor arguments. This object has a mandatory
messengerand an optionalstateproperty. - Additional type exports have been added for the controller messenger and associated types
- The constructor parameters have changed; rather than accepting an empty "config" parameter and a "state" parameter, there is now just a single object for all constructor arguments. This object has a mandatory
- Bump
@metamask/base-controllerto^4.0.1(#3695) - Bump
@metamask/controller-utilsto^8.0.1(#3695, #3678, #3667, #3580)
- BREAKING Add required property
showIncomingTransactionstoPreferencesState(#1659) - Add types
EtherscanSupportedChains,EtherscanSupportedHexChainId(#1659) - Add constant
ETHERSCAN_SUPPORTED_CHAIN_IDS(#1659) - Add
setEnabledNetworkIncomingTransactionsmethod (#1659)- This can be used to set the
showIncomingTransactionspreference for the given chain ID.
- This can be used to set the
- Bump
@metamask/base-controllerto ^4.0.0 (#2063)- This is not breaking because this controller still inherits from BaseController v1.
- Bump
@metamask/controller-utilsto ^6.0.0 (#2063)
- Bump dependency on
@metamask/base-controllerto ^3.2.3 (#1747) - Bump dependency on
@metamask/controller-utilsto ^5.0.2 (#1747)
- Update TypeScript to v4.8.x (#1718)
- Bump dependency on
@metamask/controller-utilsto ^5.0.0
- Add
isIpfsGatewayEnabledproperty to PreferencesController state (#1577) - Add
setIsIpfsGatewayEnabledto setisIpfsGatewayEnabled(#1577)
- Bump dependency on
@metamask/base-controllerto ^3.2.1 - Bump dependency on
@metamask/controller-utilsto ^4.3.2
- Add preference for security alerts (#1589)
- Add controller state property
showTestNetworksalong with a setter method,setShowTestNetworks(#1418)
- Add
isMultiAccountBalancesEnabledto state (default: true) along with asetIsMultiAccountBalancesEnabledmethod to set it
- BREAKING: Bump to Node 16 (#1262)
- BREAKING: Migrate network configurations from
PreferencesControllertoNetworkController(#1064)- Consumers will need to adapt by reading network data from
NetworkConfigurationsstate onNetworkControllerrather thanfrequentRpcListonPreferencesController. SeeNetworkControllerv6.0.0 changelog entry for more details.
- Consumers will need to adapt by reading network data from
disabledRpcMethodPreferencesstate to PreferencesController (#1109). See this PR on extension and this ticket
- BREAKING: Remove
isomorphic-fetch(#1106)- Consumers must now import
isomorphic-fetchor another polyfill themselves if they are running in an environment withoutfetch
- Consumers must now import
- Relax dependencies on
@metamask/base-controllerand@metamask/controller-utils(use^instead of~) (#998)
- Initial release
-
As a result of converting our shared controllers repo into a monorepo (#831), we've created this package from select parts of
@metamask/controllersv33.0.0, namely:src/user/PreferencesController.ts(plusContactEntrycopied fromsrc/user/AddressBookController.ts)src/user/PreferencesController.test.ts
All changes listed after this point were applied to this package following the monorepo conversion.
-