Merged
Conversation
b0f6b67 to
68f861c
Compare
mcmire
commented
Nov 17, 2023
| }, | ||
| "dependencies": { | ||
| "@metamask/base-controller": "^3.2.3", | ||
| "@metamask/base-controller": "^4.0.0", |
Contributor
Author
There was a problem hiding this comment.
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.
3 tasks
68f861c to
9045a26
Compare
Member
|
Anything else we need to include in this before it's ready? |
Contributor
Author
|
@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 |
Contributor
adonesky1
reviewed
Nov 21, 2023
Comment on lines
+11
to
+18
| - 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)) |
Contributor
Author
|
Update: We're also looking to pull in #2078. |
MajorLift
reviewed
Nov 22, 2023
MajorLift
reviewed
Nov 22, 2023
MajorLift
reviewed
Nov 22, 2023
MajorLift
reviewed
Nov 22, 2023
MajorLift
reviewed
Nov 22, 2023
MajorLift
reviewed
Nov 22, 2023
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>
MajorLift
reviewed
Nov 22, 2023
adonesky1
reviewed
Nov 22, 2023
Comment on lines
+11
to
+24
| - **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)) |
adonesky1
reviewed
Nov 22, 2023
Comment on lines
-33
to
+43
| "@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", |
shanejonas
previously approved these changes
Nov 22, 2023
matthewwalsh0
previously approved these changes
Nov 22, 2023
FrederikBolding
previously approved these changes
Nov 22, 2023
Co-authored-by: Jongsun Suh <jongsun.suh@icloud.com>
47ef4c6
Mrtenz
approved these changes
Nov 22, 2023
adonesky1
approved these changes
Nov 22, 2023
MajorLift
approved these changes
Nov 22, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.