Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

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

Merged
jdevcs merged 13 commits into
1.xfrom
junaid/commonchainid
Sep 22, 2021
Merged

add tx.chainId if tx.common.chainId not provided#4293
jdevcs merged 13 commits into
1.xfrom
junaid/commonchainid

Conversation

@jdevcs

@jdevcs jdevcs commented Sep 6, 2021

Copy link
Copy Markdown
Contributor

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

render Bot commented Sep 6, 2021

Copy link
Copy Markdown

@coveralls

coveralls commented Sep 6, 2021

Copy link
Copy Markdown

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
Comment thread packages/web3-eth-accounts/src/index.js Outdated

@Spacesai1or Spacesai1or left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread packages/web3-eth-accounts/src/index.js Outdated
Comment thread packages/web3-eth-accounts/src/index.js
Comment thread packages/web3-eth-accounts/src/index.js Outdated
luu-alex
luu-alex previously approved these changes Sep 16, 2021
Spacesai1or
Spacesai1or previously approved these changes Sep 16, 2021
@jdevcs
jdevcs dismissed stale reviews from Spacesai1or and luu-alex via 24a56eb September 20, 2021 12:29
@jdevcs
jdevcs requested a review from nazarhussain September 22, 2021 11:12
@jdevcs
jdevcs requested a review from Spacesai1or September 22, 2021 11:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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