-
Notifications
You must be signed in to change notification settings - Fork 60
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 SafeApp
to zod
#1296
Migrate SafeApp
to zod
#1296
Conversation
Pull Request Test Coverage Report for Build 8265913486Details
💛 - Coveralls |
tags: z.array(z.string()), | ||
features: z.array(z.string()), | ||
socialProfiles: z.array(SafeAppSocialProfileSchema), | ||
iconUrl: z.string().url().nullish().default(null), |
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.
Outside of the scope of this PR but we need add this to the SDK.
Co-authored-by: Aaron Cook <aaron@safe.global>
…teway into zod-safe-apps
Thanks for the suggestion @iamacook! I've committed it, in fact, I had the exact same code and relaxed the validation later (see this difff) because I'm not sure it makes a lot of sense to validate the But I also think your suggestion is right since it should be tackled in a separate PR, and we are purely migrating the validation mechanism here 👍🏻 Thanks again! |
Summary
This migrates the validation of
SafeApp
tozod
.Changes
SafeAppValidator
and associated schema.SafeAppSchema
and infers type(s) from it.iconUrl
fromstring
tostring | null
.