-
-
Notifications
You must be signed in to change notification settings - Fork 193
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(controller-utils): replace any
with types for type safety
#3975
Conversation
Pipeline is failing for changes made related to forcing BN type. due to a missed up usage on AssetsController which is currently being addressed by #3933 |
328a61d
to
d508dd1
Compare
any
with types for type safety
181cd7e
to
d2e119f
Compare
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.
A couple of nits, but looks good.
The change to isNetworkType
, BNToHex
, and fractionBN
are breaking — can you note that in the PR description?
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.
Explanation
The current implementation uses any type for parameters in certain utility functions within controller-utils, which lacks type safety and can lead to runtime errors if incorrect values are passed. This approach needs to change to ensure the reliability and maintainability of the codebase.
References
controller-utils
: Replace use ofany
with proper types (non-test files only) #3717Changelog
@metamask/controller-utils
Fixed
Checklist