-
-
Notifications
You must be signed in to change notification settings - Fork 187
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
Refactor controllers to use "getState"
action, "stateChange"
event types defined in base-controller
#2029
Refactor controllers to use "getState"
action, "stateChange"
event types defined in base-controller
#2029
Conversation
b180817
to
13940f1
Compare
135a396
to
37769c2
Compare
13940f1
to
591c234
Compare
monorepo
] Refactor controllers to use "getState"
action, "stateChange"
event types defined in base-controller
monorepo
] Refactor controllers to use "getState"
action, "stateChange"
event types defined in base-controller
"getState"
action, "stateChange"
event types defined in base-controller
…`BaseControllerV2`
…ith `ControllerGetStateAction`, `ControllerStateChangeEvent`
582ea07
to
0cb0dda
Compare
…e "getState" action and "stateChange" event across all 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.
Looks good!
0cb0dda
to
1bae4b3
Compare
@mcmire I removed some changes in |
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.
Maybe better to wait until after v91 is merged before merging this, to avoid complicating that release |
@Gudahtt Good call! Holding off for now. |
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!
Motivation
"getState"
action and"stateChange"
event are defined inbase-controller
, and are common to all controllers.base-controller
] Fix allany
usage, apply universal supertype for functions #1890 defines polymorphic typesControllerGetStateAction
andControllerStateChangeEvent
.Explanation
"getState"
action and"stateChange"
event types are defined using theControllerGetStateAction
andControllerStateChangeEvent
types frombase-controller
.Impact
"getState"
action and a"stateChange"
event, and can accept them without requiring type casting inbase-controller
.immer
can now be removed as a dependency from 7 packages.References
base-controller
] Fix allany
usage, apply universal supertype for functions #1890Changelog
@metamask/base-controller
ControllerGetStateAction
,ControllerStateChangeEvent
typesChecklist