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

refactor: Small clarifications to authz docs and one error description #11506

Merged
merged 5 commits into from
Apr 3, 2022

Conversation

ivan-gavran
Copy link
Contributor

Description

This small PR is trying to clarify the documentation that I found ambiguous when reading it.
Furthermore, it makes one error message more precise ("non-negative" --> "positive").

In particular:

  • I clarified that the field AcceptResponse.Accept will be set to true when an authorization is accepted, but will not be set to false otherwise (instead, the function Accept will return an error).
  • I clarified that the field AcceptResponse.Updated will not always be populated: it will be nil unless there are real changes to the authorization
  • I changed the error message in the send_authorization.go function, when IsAllPositive() returns false from spend limit cannot be negitive to spend limit must be positive. I emphasized the fact that spend limit must be positive in the documentation.

This is my first contribution to the Cosmos-SDK codebase so if I made some mistake the process (wrt the checklist), guide me patiently, pls.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • added ! to the type prefix if API or client breaking change
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification: NOTE: does not apply, these are clarification changes
  • followed the guidelines for building modules: NOTE: does not apply, these are clarification changes
  • included the necessary unit and integration tests: NOTE: does not apply, these are clarification changes
  • added a changelog entry to CHANGELOG.md: NOTE: does not apply, these are clarification changes
  • included comments for documenting Go code NOTE: does not apply, these are clarification changes
  • updated the relevant documentation or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed ! in the type prefix if API or client breaking change
  • confirmed all author checklist items have been addressed
  • reviewed state machine logic
  • reviewed API design and naming
  • reviewed documentation is accurate
  • reviewed tests and test coverage
  • manually tested (if applicable)

@github-actions github-actions bot added C:x/authz C:x/bank T: ADR An issue or PR relating to an architectural decision record labels Mar 30, 2022
Copy link
Contributor

@atheeshp atheeshp left a comment

Choose a reason for hiding this comment

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

lgtm, thanks @ivan-gavran !

@amaury1093 amaury1093 changed the title [refactor] Small clarifications to authz docs and one error description refactor: Small clarifications to authz docs and one error description Apr 1, 2022
@amaury1093 amaury1093 added the A:automerge Automatically merge PR once all prerequisites pass. label Apr 1, 2022
@mergify mergify bot merged commit 9f543b1 into cosmos:master Apr 3, 2022
@ivan-gavran ivan-gavran deleted the ivan/authzDocsChanges branch April 5, 2022 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass. C:x/authz C:x/bank T: ADR An issue or PR relating to an architectural decision record
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants