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

Migrate TransactionType to zod #1396

Merged
merged 6 commits into from
Apr 24, 2024
Merged

Migrate TransactionType to zod #1396

merged 6 commits into from
Apr 24, 2024

Conversation

iamacook
Copy link
Member

@iamacook iamacook commented Apr 12, 2024

Summary

This migrates the transactionType schema and all related validation to zod.

Changes

  • transactionTypeSchema migrated to TransactionTypeSchema and TransactionTypeValidator removed
  • ethereumTransactionTypeSchema migrated to EthereumTransactionTypeSchema, extended from EthereumTransactionSchema
  • moduleTransactionTypeSchema migrated to ModuleTransactionTypeSchema, extended from ModuleTransactionSchema
  • multisigTransactionTypeSchema migrated to MultisigTransactionTypeSchema, extended from MultisigTransactionSchema
  • buildPageSchema removed
  • Redundant AJV schemas removed:
    • erc20TransferSchema
    • erc721TransferSchema]
    • nativeTokenTransferSchema
    • transferSchema
    • dataDecodedSchema (andDataDecodedValidator)
  • Type inferred from above schemas
  • Associated tests updated

@iamacook iamacook self-assigned this Apr 12, 2024
@iamacook iamacook marked this pull request as ready for review April 12, 2024 08:58
@iamacook iamacook requested a review from a team as a code owner April 12, 2024 08:58
@coveralls
Copy link

coveralls commented Apr 12, 2024

Pull Request Test Coverage Report for Build 8796886222

Details

  • 26 of 26 (100.0%) changed or added relevant lines in 6 files are covered.
  • 2 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.04%) to 92.238%

Files with Coverage Reduction New Missed Lines %
src/validation/providers/generic.validator.ts 1 90.0%
src/validation/providers/json-schema.service.ts 1 66.67%
Totals Coverage Status
Change from base Build 8796283711: 0.04%
Covered Lines: 6846
Relevant Lines: 7162

💛 - Coveralls

Base automatically changed from multisig-transaction-zod to main April 23, 2024 07:09
@iamacook iamacook marked this pull request as draft April 23, 2024 07:29
@iamacook iamacook marked this pull request as ready for review April 23, 2024 08:01
@fmrsabino fmrsabino added the in review Someone is reviewing this Pull Request label Apr 24, 2024
Copy link
Contributor

@fmrsabino fmrsabino left a comment

Choose a reason for hiding this comment

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

👏 🚀

@fmrsabino fmrsabino removed the in review Someone is reviewing this Pull Request label Apr 24, 2024
@iamacook iamacook merged commit a59bcab into main Apr 24, 2024
16 checks passed
@iamacook iamacook deleted the transaction-types-zod branch April 24, 2024 13:20
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.

4 participants