-
-
Notifications
You must be signed in to change notification settings - Fork 256
Closed
Labels
bugSomething isn't workingSomething isn't workingteam-wallet-frameworkDeprecated: Please use `team-core-platform` instead.Deprecated: Please use `team-core-platform` instead.
Description
References
- Follow-up from fix(deps): bump
@metamask/composable-controllerfrom^3.0.0to^6.0.2metamask-mobile#10011
Motivation
The ComposableController API is currently not working as expected in downstream consumers (mobile).
Explanation
- The
BaseControllerV1Instancetype needs to be fixed to accommodate controller versions used in mobile that inherit fromBaseControllerV1.Type 'PhishingController | AccountsController | AccountTrackerController | AddressBookController | ... 22 more ... | SwapsController' does not satisfy the constraint 'ControllerInstance'. Type 'AccountTrackerController' is not assignable to type 'ControllerInstance'. Type 'AccountTrackerController' is not assignable to type 'BaseControllerV1Instance'. Types have separate declarations of a private property 'initialConfig'.ts(2344)
- The
ChildControllersoptional generic parameter should either be converted into a required parameter, or annotated in jsdoc to make it clear that a full list of controllers can be supplied by the consumer as a type argument. - Fix
LegacyComposableControllerStateConstraintto{ [name: string]: Record<any, any> }, since index signature ofinterfacetypes used for V1 state objects is not fixed tostring. - Test on mobile engine whether runtime checks
isBaseController()andisBaseControllerV1()are functioning as intended.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingteam-wallet-frameworkDeprecated: Please use `team-core-platform` instead.Deprecated: Please use `team-core-platform` instead.