Skip to content
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

add tx.chainId if tx.common.chainId not provided #4293

Merged
merged 13 commits into from Sep 22, 2021
Merged

Conversation

jdevcs
Copy link
Contributor

@jdevcs jdevcs commented Sep 6, 2021

Description

#4208

Throw error if user provided tx.chainId and tx.common.customChain.chainIdplus these are not matching.

Not considering tx.chainId if tx.common.customChain.chainId is provided for web3.eth.accounts.signTransaction function ,

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:unit with success.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran npm run build and tested dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have updated the CHANGELOG.md file in the root folder.

@render
Copy link

render bot commented Sep 6, 2021

@coveralls
Copy link

coveralls commented Sep 6, 2021

Pull Request Test Coverage Report for Build 1261469566

  • 1 of 16 (6.25%) changed or added relevant lines in 1 file are covered.
  • 40 unchanged lines in 2 files lost coverage.
  • Overall coverage decreased (-0.4%) to 72.548%

Changes Missing Coverage Covered Lines Changed/Added Lines %
packages/web3-eth-accounts/src/index.js 1 16 6.25%
Files with Coverage Reduction New Missed Lines %
packages/web3-eth-accounts/src/index.js 1 23.77%
packages/web3-eth-accounts/lib/index.js 39 85.36%
Totals Coverage Status
Change from base Build 1260518134: -0.4%
Covered Lines: 3334
Relevant Lines: 4340

💛 - Coveralls

@jdevcs jdevcs marked this pull request as ready for review September 7, 2021 10:22
Copy link
Contributor

@spacesailor24 spacesailor24 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a formatting suggestion

packages/web3-eth-accounts/src/index.js Outdated Show resolved Hide resolved
packages/web3-eth-accounts/src/index.js Show resolved Hide resolved
packages/web3-eth-accounts/src/index.js Outdated Show resolved Hide resolved
luu-alex
luu-alex previously approved these changes Sep 16, 2021
spacesailor24
spacesailor24 previously approved these changes Sep 16, 2021
@jdevcs jdevcs dismissed stale reviews from spacesailor24 and luu-alex via 24a56eb September 20, 2021 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't require chainId if common is present [eth.accounts.signTransaction]
5 participants