-
-
Notifications
You must be signed in to change notification settings - Fork 190
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
feat(controller-utils): support bn.js v4 input to BN functions #4844
Merged
Conversation
This file contains 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
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
legobeat
force-pushed
the
utils-bn4-input-support
branch
4 times, most recently
from
October 24, 2024 02:45
31a26c3
to
5603e03
Compare
legobeat
force-pushed
the
utils-bn4-input-support
branch
from
October 24, 2024 02:46
5603e03
to
3c66f62
Compare
legobeat
commented
Oct 24, 2024
legobeat
force-pushed
the
utils-bn4-input-support
branch
3 times, most recently
from
October 24, 2024 17:23
adaf327
to
5e5dfd5
Compare
mikesposito
approved these changes
Oct 25, 2024
cryptodev-2s
approved these changes
Oct 25, 2024
legobeat
force-pushed
the
utils-bn4-input-support
branch
from
October 25, 2024 15:16
5e5dfd5
to
29770a7
Compare
Affected functions: - BNToHex - fractionBN - fromHex - toHex If input is v4 instance, return as v4. Otherwise use v5, as previously.
legobeat
force-pushed
the
utils-bn4-input-support
branch
from
October 25, 2024 22:26
29770a7
to
c83e1cd
Compare
7 tasks
Gudahtt
added a commit
that referenced
this pull request
Nov 1, 2024
The `@metamask/create-release-branch` package has been updated one minor version. This was done to get support for `npm:` aliases, which is needed to re-introduce #4844 (which was reverted).
4 tasks
Gudahtt
added a commit
that referenced
this pull request
Nov 1, 2024
## Explanation The `@metamask/create-release-branch` package has been updated one minor version. This was done to get support for `npm:` aliases, which is needed to re-introduce #4844 (which was reverted). ## References Unblocks the re-application of #4844 ## Changelog N/A ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've highlighted breaking changes using the "BREAKING" category above as appropriate - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes
Gudahtt
pushed a commit
that referenced
this pull request
Nov 1, 2024
4 tasks
Gudahtt
pushed a commit
that referenced
this pull request
Nov 1, 2024
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.
Explanation
BNToHex
fractionBN
fromHex
toHex
fractionBN
now uses the original BN implementation when passed a v4 BN instanceReferences
bn.js
is imported downstream. Making this support explicit facilitates resolving the type issue without requiring a prior full migration off bn.js v4 or resorting to peppering ts-expect-errors all over.Changelog
@metamask/controller-utils
bn.js
v4 library:BNToHex
fractionBN
fromHex
toHex
fractionToBN
now returns output using the samebn.js
library version that created the inputChecklist