-
Notifications
You must be signed in to change notification settings - Fork 41
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 DeleteSafeDelegateDto
to zod
#1314
Conversation
Pull Request Test Coverage Report for Build 8326533776Details
💛 - Coveralls |
expect(result.success).toBe(true); | ||
}); | ||
|
||
it.each(['delegate' as const, 'safe' as const])( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick: it.each<keyof DeleteSafeDelegateDto>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 40242cf.
export const DeleteSafeDelegateDtoSchema = z.object({ | ||
delegate: AddressSchema, | ||
safe: AddressSchema, | ||
signature: z.string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use the HexSchema
here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added in 40242cf, with test.
Summary
This migrates the validation of
DeleteSafeDelegateDto
tozod
.Changes
DeleteSafeDelegateDtoValidationPipe
and associated schemas.DeleteSafeDelegateDtoSchema
and infer type from it.