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

Refactored grant related code for readability #647

Merged
merged 1 commit into from
Dec 13, 2023

Conversation

thehenrytsai
Copy link
Contributor

  • Turned RecordsGrantAuthorization.authorizeQuery/Read/Write parameters into input instead for readability
  • Renamed authorize() to authorizeOwner()
  • Renamed authorizeProtocolRecord() to verifyProtocolRecordScope()
  • Renamed authorizeFlatRecord() to verifyFlatRecordScope()
  • Renamed GrantAuthorization.authorizeGenericMessage() to GrantAuthorization.performBaseValidation()
  • Renamed validateMessageSignatureIntegrity() to validateSignatureStructure()
  • Introduced RecordsPermissionsGrantMessage for readability

Copy link

codesandbox bot commented Dec 8, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (41d3550) 98.82% compared to head (365935e) 98.83%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #647   +/-   ##
=======================================
  Coverage   98.82%   98.83%           
=======================================
  Files          71       71           
  Lines        9181     9240   +59     
  Branches     1391     1391           
=======================================
+ Hits         9073     9132   +59     
  Misses        100      100           
  Partials        8        8           

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

Copy link
Member

@LiranCohen LiranCohen left a comment

Choose a reason for hiding this comment

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

This is great! Definitely an improvement for readability without keeping too much context in certain areas.

@thehenrytsai thehenrytsai merged commit a6f95fb into main Dec 13, 2023
4 checks passed
@thehenrytsai thehenrytsai deleted the henrytsai/grant-refactoring branch December 13, 2023 22:53
thehenrytsai added a commit that referenced this pull request Dec 29, 2023
* main:
  Export `TestDataGenerator` class (#649)
  Refactoring of grant related code for readability (#647)
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.

3 participants