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)
- Bump
@metamask/base-controllerfrom^9.0.0to^9.0.1(#8317) - Bump
@metamask/messengerfrom^0.3.0to^1.0.0(#8317)
- New
addRequest()public method (#8183) - Expose missing public
ApprovalControllermethods through its messenger (#8183)- The following actions are now available:
ApprovalController:addApprovalController:addAndShowApprovalRequestApprovalController:getApprovalController:getApprovalCountApprovalController:getTotalApprovalCount
- Corresponding action types (e.g.
ApprovalControllerAddAction) are available as well.
- The following actions are now available:
- BREAKING: Standardize names of
ApprovalControllermethods (#8183)- All existing methods for handling requests have been renamed so they include
Request(e.g.clear()->clearRequest()). You will need to update usage appropriately. - The error handling method
error()has been renamed to includeshow(error()->showError()). You will need to update usage appropriately.
- All existing methods for handling requests have been renamed so they include
- BREAKING: Rename get-state action type:
GetApprovalsState→ApprovalControllerGetStateAction(#8183) - Upgrade
@metamask/utilsfrom^11.8.1to^11.9.0(#7511)
- BREAKING: Use new
Messengerfrom@metamask/messenger(#6386)- Previously,
ApprovalControlleraccepted aRestrictedMessengerinstance from@metamask/base-controller.
- Previously,
- Bump
@metamask/base-controllerfrom^8.4.2to^9.0.0(#6962)
- Bump
@metamask/base-controllerfrom^8.4.1to^8.4.2(#6917)
- Add two new controller state metadata properties:
includeInStateLogsandusedInUi(#6473)
- Bump
@metamask/utilsfrom^11.2.0to^11.8.1(#6054, #6588, #6708) - Bump
@metamask/base-controllerfrom^8.0.0to^8.4.1(#5722, #6284, #6355, #6465, #6632, #6807)
- Bump
@metamask/base-controllerfrom^7.1.0to^8.0.0(#5135), (#5305) - Bump
@metamask/utilsfrom^11.0.1to^11.1.0(#5223)
- Bump
nanoidfrom^3.1.31to^3.3.8(#5073) - Bump
@metamask/utilsfrom^10.0.0to^11.0.1(#5080) - Bump
@metamask/rpc-errorsfrom^7.0.0to^7.0.2(#5080) - Bump
@metamask/base-controllerfrom^7.0.0to^7.1.0(#5079)
- Bump
@metamask/utilsfrom^9.1.0to^10.0.0(#4831)
- Add
deleteAfterResultoption to accept method to delay removal of approval request from state (#4715)
- 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
typescriptfrom~5.0.4to~5.2.2(#4576, #4584)
- Bump TypeScript version to
~5.0.4and setmoduleResolutionoption toNode16(#3645) - Bump
@metamask/base-controllerfrom^6.0.1from^6.0.2(#4544) - Bump
@metamask/utilsfrom^9.0.0to^9.1.0(#4529)
- Bump
@metamask/rpc-errorsfrom6.2.1to^6.3.1(#4516) - Bump
@metamask/utilsfrom^8.3.0to^9.0.0(#4516) - Bump
@metamask/base-controllerto^6.0.1(#4517)
- BREAKING: Bump minimum Node version to 18.18 (#3611)
- Bump
@metamask/base-controllerto^6.0.0(#4352)
- 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
- BREAKING: Bump
@metamask/base-controllerto^5.0.0(#4039)- This version has a number of breaking changes. See the changelog for more.
- BREAKING: Narrow
ApprovalControllerMessengertype parametersAllowedActionandAllowedEventfromstringtonever(#4031)- Allowlisting or using any external actions or events will now produce a type error.
- Bump
@metamask/rpc-errorsto^6.2.1(#3954)
- Bump
@metamask/base-controllerto^4.0.1(#3695)
- Add
titleandiconoptions tosuccessanderrormethods (#3675)
- BREAKING: Bump
@metamask/base-controllerto ^4.0.0 (TODO: THIS PR)- This is breaking because the type of the
messengerhas backward-incompatible changes. See the changelog for this package for more.
- This is breaking because the type of the
- Bump
@metamask/utilsto ^8.2.0 (#1957)
- Add
showoption forstartFlow(#1886)- This option lets you initiate a new approval flow without triggering the UI immediately.
- Bump dependency on
@metamask/rpc-errorsto ^6.1.0 (#1653)
- BREAKING: Move
eth-rpc-errors@^4.0.2dependency to@metamask/rpc-errors@^6.0.2(#1743)- Upon upgrading, you may need to also use
@metamask/rpc-errors@^6.0.2, which restricts valid data that can be used to build messages
- Upon upgrading, you may need to also use
- Bump dependency on
@metamask/utilsto ^8.1.0 (#1639) - Bump dependency on
@metamask/base-controllerto ^3.2.3
- Update TypeScript to v4.8.x (#1718)
- Bump dependency on
@metamask/base-controllerto ^3.2.1
- Update
@metamask/utilsto^6.2.0(#1514)
- Add
successanderrormethods to display result pages (#1442)
- Add
setFlowLoadingTextmethod to ApprovalController (#1419)
- Add
startFlowandendFlowmethods to ApprovalController (#1394)
- Fix ApprovalController constructor so that it accepts a messenger created by calling
getRestrictedwithout having type parameters explicitly specified (#1417)
- Optional feedback when accepting an approval request (#1396)
- BREAKING: Bump to Node 16 (#1262)
- Replace
@metamask/controller-utilsdependency with@metamask/utils(#1370)
- deps: eth-rpc-errors@4.0.0->4.0.2 (#1215)
- Option to exclude types from rate limiting (#1185)
- 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
- Add
updateRequestStateaction toApprovalController(#1059)
- 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:- Everything in
src/approval
All changes listed after this point were applied to this package following the monorepo conversion.
- Everything in
-