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

Validate that initial permissions type matches validation struct #2293

Merged
merged 3 commits into from
Mar 20, 2024

Conversation

Mrtenz
Copy link
Member

@Mrtenz Mrtenz commented Mar 20, 2024

By using Superstruct's Describe type, we can validate that a struct is assignable to a type. In this case, we make sure that the validation struct in snaps-utils matches the type in snaps-sdk. I had to make a small change to the type to get validation to pass.

@Mrtenz Mrtenz requested a review from a team as a code owner March 20, 2024 09:39
Copy link

codecov bot commented Mar 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.60%. Comparing base (081b0f7) to head (3f259c2).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2293   +/-   ##
=======================================
  Coverage   96.60%   96.60%           
=======================================
  Files         337      337           
  Lines        7629     7630    +1     
  Branches     1186     1186           
=======================================
+ Hits         7370     7371    +1     
  Misses        259      259           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Mrtenz Mrtenz merged commit 3b94315 into main Mar 20, 2024
150 checks passed
@Mrtenz Mrtenz deleted the mrtenz/validate-permissions-struct branch March 20, 2024 10: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.

2 participants