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

Make isAllowedAddress private #2985

Merged
merged 3 commits into from
Jan 9, 2023

Conversation

chatton
Copy link
Contributor

@chatton chatton commented Jan 9, 2023

Description

Make isAllowedAddress private. This PR also fixes compilation issues in the unit tests.

part of: #2960

Commit Message / Changelog Entry

N/A

see the guidelines for commit messages. (view raw markdown for examples)


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md).
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests.
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/).
  • Added relevant godoc comments.
  • Provide a commit message to be used for the changelog entry in the PR description for review.
  • Re-reviewed Files changed in the Github PR explorer.
  • Review Codecov Report in the comment section below once CI passes.

Comment on lines +111 to +119
func isAllowedAddress(ctx sdk.Context, receiver string, allowedAddrs []string) bool {
for _, addr := range allowedAddrs {
ctx.GasMeter().ConsumeGas(gasCostPerIteration, "transfer authorization")
if addr == receiver {
return true
}
}
return false
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I moved this to the bottom of the file as it was in between multiple public methods.

@chatton chatton marked this pull request as ready for review January 9, 2023 13:01
var (
_ authz.Authorization = &TransferAuthorization{}
)
var _ authz.Authorization = &TransferAuthorization{}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is required to make formatting pass

Copy link
Member

@damiannolan damiannolan left a comment

Choose a reason for hiding this comment

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

🚀

@chatton chatton merged commit 49f8112 into feat/authz-ics20 Jan 9, 2023
@chatton chatton deleted the cian/make-is-allowed-address-private branch January 9, 2023 16:34
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