-
-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 93.0.0 #2063
Release 93.0.0 #2063
Conversation
b0f6b67
to
68f861c
Compare
@@ -30,7 +30,7 @@ | |||
"test:watch": "jest --watch" | |||
}, | |||
"dependencies": { | |||
"@metamask/base-controller": "^3.2.3", | |||
"@metamask/base-controller": "^4.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is here as it was added automatically, but this package is not being released yet, as there are other pending items to complete in order to publish this package.
68f861c
to
9045a26
Compare
Anything else we need to include in this before it's ready? |
@MajorLift Did you want to get #2051 in this release? it will be a breaking change, so we might want to group it together with the other breaking changes to |
- Add new handler to `permissionRpcMethods.handlers` for `wallet_revokePermissions` RPC method ([#1889](https://github.com/MetaMask/core/pull/1889)) | ||
|
||
### Changed | ||
- **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063)) | ||
- This is breaking because the type of the `messenger` has backward-incompatible changes. See the changelog for this package for more. | ||
- **BREAKING:** Update `PermittedRpcMethodHooks` type so it must support signature for `wallet_revokePermission` hook ([#1889](https://github.com/MetaMask/core/pull/1889)) | ||
- Bump `@metamask/approval-controller` to ^5.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063)) | ||
- Bump `@metamask/controller-utils` to ^6.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! @shanejonas wdyt?
Update: We're also looking to pull in #2078. |
Re-add initApprovals method to allow client to finish initialisation before creating approvals. Remove unnecessary gas property update during initialisation since transactions are not added to the state until gas properties are updated. Normalise the gas fee values provided to speedUpTransaction and stopTransaction to support the extension arguments. Update the transaction after the afterSign hook to persist any updated properties. Report success to the result callback after publish is skipped to unblock the UI during the MMI flows. Set the value parameter to 0x0 if not specified. Limit properties updated by updateCustodianTransaction so it can initially be used for hash and status updates only, with more general MMI updates continuing to use updateTransaction. Align nonce logic with mobile. Update post transaction balance of swaps transactions after internal transactions.
…2078) ## Motivation The controller-messenger pattern implemented by `BaseControllerV2` is intended to be used by all of our controllers. Currently, the default `BaseController` name points to the older base controller implementation, which needs to be deprecated and only used for temporary backwards compatibility while all controllers are brought up-to-date. ## Explanation In this commit, we export `BaseControllerV2` as the default `BaseController`, and add a `@deprecated` tsdoc tag to the old `BaseController` class as well as export it under the new name `BaseControllerV1` to discourage future usage. This aligns with the `PollingController` naming scheme, where the up-to-date version is the default, and outdated mixins are named with qualifiers (`PollingControllerOnly`, `PollingControllerV1`). ## Impact Existing controller classes in core that extend from the old base controller are not affected — they now simply extend from `BaseControllerV1` instead of `BaseController`. External packages will need to update any instances of `extends BaseController` to `extends BaseControllerV1` and `extends BaseControllerV2` to `extends BaseController`, along with accompanying changes to import statements. --------- Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
…ot initialized with internal actions/events in allow lists (#2051) ## Explanation - `RestrictedControllerMessenger` constructor and `ControllerMessenger.getRestricted()` method now raise a type error if an internal action is passed into `allowedActions`, or an internal event into `allowedEvents`. - ` Type 'string' is not assignable to type 'never'.` - `Type '"SomeController:internalAction"' is not assignable to type '"OtherController:externalAction1" | "OtherController:externalAction2"'.` - Fixes breaking tests in downstream controllers in core repo. ## Impact - The `allowed{Actions,Events}` arrays in `ControllerMessenger.getRestricted()` now align with the `Allowed{Actions,Events}` generic params of `RestrictedControllerMessenger`: Both only enumerate external actions/events. - This commit disallows `allowed{Actions,Events}` arrays that contain an incomplete list of internal actions/events. - A partial list doesn't provide any useful information as all internal actions/events will be available to the messenger regardless of whether any of them are allowlisted. - A partial list also gives the confusing impression that some internal actions/events can be *disallowed* through omission, which is not true as of #2050. --------- Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
Co-authored-by: Jongsun Suh <jongsun.suh@icloud.com>
Co-authored-by: Jongsun Suh <jongsun.suh@icloud.com>
- **BREAKING**: `TokenRatesControllerState` now has required `contractExchangeRatesByChainId` property which an object keyed by `chainId` and `nativeCurrency` ([#2015](https://github.com/MetaMask/core/pull/2015)) | ||
- **BREAKING**: `TokenRatesController` constructor params now requires `getNetworkClientById` ([#2015](https://github.com/MetaMask/core/pull/2015)) | ||
- Add types `CurrencyRateControllerEvents` and `CurrencyRateControllerActions` ([#2029](https://github.com/MetaMask/core/pull/2029)) | ||
- Add polling-related methods to TokenRatesController ([#2015](https://github.com/MetaMask/core/pull/2015)) | ||
- `startPollingByNetworkClientId` | ||
- `stopPollingByPollingToken` | ||
- `stopAllPolling` | ||
- `_executePoll` | ||
- Add `updateExchangeRatesByChainId` method to TokenRatesController ([#2015](https://github.com/MetaMask/core/pull/2015)) | ||
- This is a lower-level version of `updateExchangeRates` that takes chain ID, native currency, and token addresses. | ||
- `TokenRatesController` constructor params now accepts optional `interval` and `threshold` ([#2015](https://github.com/MetaMask/core/pull/2015)) | ||
- `TokenRatesController.fetchExchangeRate()` now accepts an optional `tokenAddresses` as the last parameter ([#2015](https://github.com/MetaMask/core/pull/2015)) | ||
- `TokenRatesController.getChainSlug()` now accepts an optional `chainId` parameter ([#2015](https://github.com/MetaMask/core/pull/2015)) | ||
- `TokenRatesController.fetchAndMapExchangeRates()` now accepts an optional `tokenAddresses` as the last parameter ([#2015](https://github.com/MetaMask/core/pull/2015)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks right to me. @jiexi can you confirm?
"@metamask/base-controller": "^3.2.3", | ||
"@metamask/controller-utils": "^5.0.2", | ||
"@metamask/base-controller": "^4.0.0", | ||
"@metamask/controller-utils": "^6.0.0", | ||
"@metamask/json-rpc-engine": "^7.3.0", | ||
"@metamask/network-controller": "^16.0.0", | ||
"@metamask/network-controller": "^17.0.0", | ||
"@metamask/rpc-errors": "^6.1.0", | ||
"@metamask/selected-network-controller": "^3.1.2", | ||
"@metamask/selected-network-controller": "^4.0.0", | ||
"@metamask/swappable-obj-proxy": "^2.1.0", | ||
"@metamask/utils": "^8.2.0" | ||
}, | ||
"devDependencies": { | ||
"@metamask/approval-controller": "^4.1.0", | ||
"@metamask/approval-controller": "^5.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BelfordZ any concerns with these bumps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Co-authored-by: Jongsun Suh <jongsun.suh@icloud.com>
47ef4c6
This release primarily features backward-incompatible type fixes and changes to the messenger types in
base-controller
. As a result, all of the controllers are being bumped.