-
Notifications
You must be signed in to change notification settings - Fork 586
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
Add additional tests and comments for Transfer Authz #6484
Add additional tests and comments for Transfer Authz #6484
Conversation
WalkthroughThe changes in the Changes
Sequence Diagram(s) (Beta)sequenceDiagram
participant User
participant TransferAuthorization
participant Allocation
User->>TransferAuthorization: Call Accept with msg
TransferAuthorization->>Allocation: Directly access fields in Allocations[index]
Allocation-->>TransferAuthorization: Update SpendLimit
TransferAuthorization->>User: Return result
Assessment against linked issues
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
@@ -71,47 +72,6 @@ func (suite *TypesTestSuite) TestTransferAuthorizationAccept() { | |||
suite.Require().Nil(res.Updated) | |||
}, | |||
}, | |||
{ |
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.
moved down to have multi denom tests together
…e-and-write-tests-to-cover-all-cases
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (2)
- modules/apps/transfer/types/transfer_authorization.go (3 hunks)
- modules/apps/transfer/types/transfer_authorization_test.go (3 hunks)
Additional context used
Path-based instructions (2)
modules/apps/transfer/types/transfer_authorization.go (1)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.modules/apps/transfer/types/transfer_authorization_test.go (2)
Pattern
**/*.go
: Review the Golang code for conformity with the Uber Golang style guide, highlighting any deviations.
Pattern
**/*_test.go
: "Assess the unit test code assessing sufficient code coverage for the changes associated in the pull request"
Additional comments not posted (7)
modules/apps/transfer/types/transfer_authorization.go (4)
57-57
: LGTM! The check for allowed receiver addresses enhances security.
61-61
: Good addition of memo validation to ensure data integrity.
Line range hint
73-85
: Proper handling of unbounded spend limits ensures robustness in spend limit logic.
89-90
: Efficient cleanup of zero spend limit allocations helps maintain state integrity.modules/apps/transfer/types/transfer_authorization_test.go (3)
12-12
: Necessary import ofibcerrors
for handling specific error types in tests.
211-248
: Comprehensive test case added for handling multiple allocations and multidenom transfers, enhancing coverage.
250-319
: Important test cases added for error handling when spend limits are exceeded or denominations are not in the allocation.
…e-and-write-tests-to-cover-all-cases
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.
🔥
…e-and-write-tests-to-cover-all-cases
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.
Nice! Thank you @chatton 🙏
…e-and-write-tests-to-cover-all-cases
Quality Gate failed for 'ibc-go'Failed conditions |
…e-and-write-tests-to-cover-all-cases
Description
closes: #6474
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.
docs/
).godoc
comments.Files changed
in the GitHub PR explorer.SonarCloud Report
in the comment section below once CI passes.Summary by CodeRabbit
Bug Fixes
Tests