Skip to content

Latest commit

 

History

History
374 lines (243 loc) · 19.6 KB

CHANGELOG.md

File metadata and controls

374 lines (243 loc) · 19.6 KB

Changelog

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.

Changed

  • Bump @metamask/base-controller from ^7.0.0 to ^7.1.0 (#5079)

Changed

  • Bump @metamask/controller-utils from ^11.4.3 to ^11.4.4 (#5012)

Changed

  • BREAKING: Bump @metamask/keyring-controller peer dependency from ^18.0.0 to ^19.0.0 (#4195)

Changed

  • BREAKING: Bump @metamask/keyring-controller peer dependency from ^17.0.0 to ^18.0.0 (#4915)
  • Bump @metamask/controller-utils from ^11.4.2 to ^11.4.3 (#4915)

Changed

  • Enable smart transactions by default for new users (#4885)

Added

  • Add useSafeChainsListValidation preference (#4860)
    • Add useSafeChainsListValidation property to the PreferencesController state (default: true)
    • Add setUseSafeChainsListValidation method to set this property
  • Add tokenSortConfig preference (#4860)
    • Add tokenSortConfig property to the PreferencesController state (default value: { key: 'tokenFiatAmount', order: 'dsc', sortCallback: 'stringNumeric' })
    • Add setTokenSortConfig method to set this property
  • Add privacyMode preference (#4860)
    • Add privacyMode property to the PreferencesController state (default value: false)
    • Add setPrivacyMode method to set this property
  • Add useMultiRpcMigration preference (#4732)

Changed

  • Bump @metamask/base-controller from ^7.0.1 to ^7.0.2 (#4862)
  • Bump @metamask/controller-utils from ^11.3.0 to ^11.4.2 (#4834, #4862, #4870)

Changed

  • Bump @metamask/keyring-controller from ^17.2.1 to ^17.2.2 (#4734)

Fixed

  • 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 exports field in package.json linked 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.
  • 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.

Changed

  • Bump @metamask/base-controller from ^6.0.2 to ^7.0.0 (#4625, #4643)
  • Bump @metamask/controller-utils from ^11.0.2 to ^11.2.0 (#4639, #4651)
  • Bump typescript from ~5.0.4 to ~5.2.2 (#4576, #4584)

Changed

  • Upgrade TypeScript version to ~5.0.4 and set moduleResolution option to Node16 (#3645)
  • Bump @metamask/base-controller from ^6.0.0 to ^6.0.2 (#4517, #4544)
  • Bump @metamask/controller-utils from ^11.0.0 to ^11.0.2 (#4517, #4544)

Changed

  • BREAKING: Bump minimum Node version to 18.18 (#3611)
  • BREAKING: Bump peer dependency @metamask/keyring-controller to ^17.0.0 (#4352)
  • Bump @metamask/base-controller to ^6.0.0 (#4352)
  • Bump @metamask/controller-utils to ^11.0.0 (#4352)

Added

  • Add smartTransactionsOptInStatus preference (#3815)
    • Add smartTransactionsOptInStatus property to the PreferencesController state (default: false)
    • Add setSmartTransactionOptInStatus method to set this property
  • Add useTransactionSimulations preference (#4283)
    • Add useTransactionSimulations property to the PreferencesController state (default value: false)
    • Add setUseTransactionSimulations method to set this property

Changed

  • Bump @metamask/controller-utils to ^10.0.0 (#4342)

Removed

  • BREAKING: Remove state property disabledRpcMethodPreferences along with setDisabledRpcMethodPreferences method (#4319)
    • These were for disabling the eth_sign RPC method, but support for this method is being removed, so this preference is no longer needed.

Added

  • Export ETHERSCAN_SUPPORTED_CHAIN_IDS constant (#4233)

Changed

  • BREAKING Bump @metamask/keyring-controller peer dependency to ^16.0.0 (#4234)
  • Bump @metamask/base-controller to ^5.0.2 (#4232)

Changed

  • BREAKING Bump peer dependency on @metamask/keyring-controller to ^15.0.0 (#4090)
  • Restore previous behavior of toChecksumHexAddress (#4046)

Fixed

  • Fix types field in package.json (#4047)

Added

  • BREAKING: Add ESM build (#3998)
    • It's no longer possible to import files from ./dist directly.
  • Add support for Linea Sepolia (chain ID 0xe705) (#3995)
    • Update default controller state so 0xe705 is automatically enabled in showIncomingTransactions.

Changed

  • BREAKING: Bump @metamask/base-controller to ^5.0.0 (#4039)
    • This version has a number of breaking changes. See the changelog for more.
  • BREAKING: Bump peer dependency on @metamask/keyring-controller to ^14.0.0 (#4039)
  • Bump @metamask/controller-utils to ^9.0.0 (#4039)

Changed

  • BREAKING: Bump @metamask/keyring-controller dependency and peer dependency to ^13.0.0 (#4007)
  • BREAKING: Remove support for Optimism Goerli, add support for Optimism Sepolia (#3999)
    • Replace OPTIMISM_TESTNET with OPTIMISM_SEPOLIA in ETHERSCAN_SUPPORTED_CHAIN_IDS and EtherscanSupportedChains.
    • Replace 0x1a4 with 0xaa37dc in EtherscanSupportedHexChainId.
    • Replace 0x1a4 with 0xaa37dc in default showIncomingTransactions state.
    • Update setEnabledNetworkIncomingTransactions to ignore a chain ID of 0x1a4; add support for 0xaa37dc instead.
    • You will likely want to write a migration to transfer the value of 0x1a4 for 0xaa37dc for the showIncomingTransactions state property.
  • Bump @metamask/controller-utils to ^8.0.4 (#4007)

Removed

  • BREAKING: Move syncIdentities to private, as it's only used internally to update state on KeyringController:stateChange event (#3976)
  • BREAKING: Remove updateIdentities, as it's not in use anymore (#3976)

Fixed

  • 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)

Changed

  • BREAKING: Keep PreferencesController state synchronized with KeyringController state (#3799)
    • The KeyringController:stateChange event is now required by the PreferencesController messenger, which is a breaking change.
    • The package @metamask/keyring-controller has been added as a peerDependency and as a devDependency, which is a breaking change.
    • Previously the state was synchronized manually by calling syncIdentities or updateIdentities. Calling these methods is no longer required.
  • Bump @metamask/base-controller to ^4.1.1 (#3760, #3821)
  • Bump @metamask/controller-utils to ^8.0.2 (#3821)

Added

  • Added getDefaultPreferencesState function (#3736)

Changed

  • BREAKING Clean up types (#3712)
    • Replace ContactEntry interface with Identity type
    • Convert PreferencesState from an interface to a type
  • 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 messenger and an optional state property.
    • Additional type exports have been added for the controller messenger and associated types

Changed

Added

  • BREAKING Add required property showIncomingTransactions to PreferencesState (#1659)
  • Add types EtherscanSupportedChains, EtherscanSupportedHexChainId (#1659)
  • Add constant ETHERSCAN_SUPPORTED_CHAIN_IDS (#1659)
  • Add setEnabledNetworkIncomingTransactions method (#1659)
    • This can be used to set the showIncomingTransactions preference for the given chain ID.

Changed

  • Bump @metamask/base-controller to ^4.0.0 (#2063)
    • This is not breaking because this controller still inherits from BaseController v1.
  • Bump @metamask/controller-utils to ^6.0.0 (#2063)

Changed

  • Bump dependency on @metamask/base-controller to ^3.2.3 (#1747)
  • Bump dependency on @metamask/controller-utils to ^5.0.2 (#1747)

Changed

  • Update TypeScript to v4.8.x (#1718)

Changed

  • Bump dependency on @metamask/controller-utils to ^5.0.0

Added

  • Add isIpfsGatewayEnabled property to PreferencesController state (#1577)
  • Add setIsIpfsGatewayEnabled to set isIpfsGatewayEnabled (#1577)

Changed

  • Bump dependency on @metamask/base-controller to ^3.2.1
  • Bump dependency on @metamask/controller-utils to ^4.3.2

Added

  • Add preference for security alerts (#1589)

Added

  • Add controller state property showTestNetworks along with a setter method, setShowTestNetworks (#1418)

Added

  • Add isMultiAccountBalancesEnabled to state (default: true) along with a setIsMultiAccountBalancesEnabled method to set it

Changed

  • BREAKING: Bump to Node 16 (#1262)

Changed

  • BREAKING: Migrate network configurations from PreferencesController to NetworkController (#1064)
    • Consumers will need to adapt by reading network data from NetworkConfigurations state on NetworkController rather than frequentRpcList on PreferencesController. See NetworkController v6.0.0 changelog entry for more details.

Added

Removed

  • BREAKING: Remove isomorphic-fetch (#1106)
    • Consumers must now import isomorphic-fetch or another polyfill themselves if they are running in an environment without fetch

Changed

  • Rename this repository to core (#1031)
  • Update @metamask/controller-utils package (#1041)

Changed

  • Relax dependencies on @metamask/base-controller and @metamask/controller-utils (use ^ instead of ~) (#998)

Added

  • 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/controllers v33.0.0, namely:

      • src/user/PreferencesController.ts (plus ContactEntry copied from src/user/AddressBookController.ts)
      • src/user/PreferencesController.test.ts

      All changes listed after this point were applied to this package following the monorepo conversion.