-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
fix(deps): bump @metamask/composable-controller
from ^3.0.0
to ^6.0.2
#10011
fix(deps): bump @metamask/composable-controller
from ^3.0.0
to ^6.0.2
#10011
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
app/core/Engine.ts
Outdated
this.datamodel = new ComposableController({ | ||
this.datamodel = new ComposableController< | ||
EngineState, | ||
Controllers[keyof Controllers] |
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.
We're seeing an error on this line that requires the following hotfix:
Remove the ControllerInstance
generic constraint from the ChildControllers
generic parameter of ComposableController
.
Fundamentally, the ControllerInstance
type needs to be fixed so that BaseControllerV1
instances are assignable.
ComposableController
6.0.2
upgrade@metamask/composable-controller
from ^3.0.0
to ^6.0.2
…e supplied to mobile controller-messenger
…gnatureControllerState` is not included in `EngineState`
3fd34e5
to
bc1392b
Compare
…trollers` type members and `BaseControllerV1Instance` type
bc1392b
to
ee088b1
Compare
Description
Applies
ComposableController
API changes introduced to the controller in the following series of PRs:ComposableController
to extendBaseControllerV2
core#3590 (v5.0.0
)#controllers
field core#3904 (v6.0.0
)stateChange
events of V1 controllers with messenger, type fixes core#3964 (v6.0.0
)v6.0.2
)Provides hotfix for type error caused by mismatch between the
ControllerInstance
generic constraint to theChildControllers
generic parameter of theComposableController
class.Controllers
type, it should be safe to apply this@ts-expect-error
, since we're overloading theChildControllers
generic parameter with known information about the input child controllers (Controllers[keyof Controllers]
).Required follow-up changes
ComposableController
:BaseControllerV1Instance
type needs to be fixed to accommodate controller versions used in mobile that inherit fromBaseControllerV1
.ChildControllers
optional generic parameter, making it clearer that a full list of controllers can be supplied by the consumer.LegacyComposableControllerStateConstraint
to{ [name: string]: Record<any, any> }
, since index signature ofinterface
types used for V1 state objects is not fixed tostring
.isBaseController()
andisBaseControllerV1()
are functioning as intended.On mobile, upgrade the affected controllers to V2:
AccountTrackerController
NftController
TokenRatesController
TransactionController
AssetsContractController
: set to be upgraded to non-controller that uses messenger but doesn't inherit fromBaseControllerV2
.ComposableController
will need to be updated to accommodated non-controllersNftDetectionController
: current release inherits fromBaseControllerV2
, but should be upgraded to non-controller.SwapsController
: V2 upgrade unavailableRelated issues
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist