-
Notifications
You must be signed in to change notification settings - Fork 5k
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: Remove the unnecessary chainId parameter #5888
refactor: Remove the unnecessary chainId parameter #5888
Conversation
Thank you for this, it looks like this was added mistakenly. |
Pull Request Test Coverage Report for Build 4560520082Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
This looks like it'll be a breaking change but its also a redundant parameter that effects the d.ts file. |
Yep, breaking change. But, in any case, we want to merge it, lint actions should be passing. |
Is there anything else I need to work on? |
@in74mz nope, i think you are all good to go. I'll debug this when I have the time. Can you make an issue for this PR and make link it to this PR? |
I have just created this issue and linked it with this PR. |
Because |
@spacesailor24 Agreed. Will merge after solving test issue, theres a lint failure in the tests #4841 (comment) I believe it is the same issue this PR faces
I think we should merge this and the other pr I linked. it'll break lint tests until next release, so we should merge them before a cut-off. thoughts? |
@luu-alex Yes seems to be an erroneously reported failing test. I'm less inclined to merge #4841 though as it has a higher likelihood of breaking typescript user's code for no real benefit. I understand #4841 is a matter of correctness, but no other users seems to have reported the issue and it isn't an issue in 4.x |
So, I think this MR should be closed as it is fixed in 4.x version, and because changing it at version 1.x could trouble some users if they updated their npm package after this change came while they expect non-breaking changes to their TypeScript code. (By the way, there is an EIP (https://eips.ethereum.org/EIPS/eip-1191) for using the chain Id when calculating the checksum. This is the reason for this parameter addition. Even though, it was not implemented in web3.js later.) |
Description
Fixes #5949
The toChecksumAddress() function had an unnecessary chainId parameter.
In fact, the chainId parameter is not used within the toChecksumAddress() function, so I've removed it because it might raise questions about why it exists when you want to use that function.
(web3.js/packages/web3-utils/types/index.d.ts)