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

chore: validate incorrect case key for EnumCoder #2486

Merged

Conversation

petertonysmith94
Copy link
Contributor

Summary

  • Added validation for EnumCoder to ensure case key is found successfully.
  • Added documentation for the error code INVALID_DECODE_VALUE.
  • Readability changes for enum example docs.

@petertonysmith94 petertonysmith94 added docs Requests pertinent to documentation chore Issue is a chore labels Jun 10, 2024
@petertonysmith94 petertonysmith94 added this to the 0.x mainnet milestone Jun 10, 2024
@petertonysmith94 petertonysmith94 self-assigned this Jun 10, 2024
Copy link
Contributor

@danielbate danielbate left a comment

Choose a reason for hiding this comment

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

Looking good, just some thoughts on adding additional context to describe the snippets.

apps/docs/src/guide/types/enums.md Show resolved Hide resolved
apps/docs/src/guide/types/enums.md Show resolved Hide resolved
apps/docs/src/guide/types/enums.md Show resolved Hide resolved
apps/docs-snippets/src/guide/types/enums.test.ts Outdated Show resolved Hide resolved
Co-authored-by: Daniel Bate <djbate23@gmail.com>
Co-authored-by: Daniel Bate <djbate23@gmail.com>
Copy link
Member

@maschad maschad 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, left some suggestions

apps/docs/src/guide/errors/error-codes.md Show resolved Hide resolved
apps/docs/src/guide/types/enums.md Show resolved Hide resolved
Copy link
Contributor

Coverage Report:

Lines Branches Functions Statements
45.47%(+0.06%) 38.57%(+0.11%) 42.28%(+0.09%) 45.24%(+0.06%)
Changed Files:
Ok File (✨=New File) Lines Branches Functions Statements
🔴 packages/abi-coder/src/encoding/coders/EnumCoder.ts 79.16%
(+1.89%)
76.92%
(+1.92%)
100%
(+0%)
79.16%
(+1.89%)

@petertonysmith94 petertonysmith94 merged commit be92daf into master Jun 11, 2024
20 checks passed
@petertonysmith94 petertonysmith94 deleted the ps/docs/adding-error-code-for-invalid-decode-value branch June 11, 2024 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Issue is a chore docs Requests pertinent to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants