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

eth.Transaction: fix RequiredFields behavior for legacy transactions #95

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

ryanschneider
Copy link
Contributor

This was spotted by @ggarri, the extra return nil isn't needed and should be removed.

I considered calling RequiredFields inside Transaction.UnmarshallJSON but ultimately decided against that since it seemed like too much of a behavorial changes, and I can see a use case where someone wants to unmarshal are partial tx w/o error, and they can always call .RequiredFields separately like I do in the unit test.

I also noticed that two of the older unit tests were missing chainId fields so added those.

@ryanschneider ryanschneider merged commit 2869eff into master Sep 25, 2023
1 check passed
@ryanschneider ryanschneider deleted the legacy-required-fields-fix branch September 25, 2023 19:48
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.

2 participants