-
Notifications
You must be signed in to change notification settings - Fork 70
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
Fix allowed_msg uncapped spend limit bug #284
Conversation
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.
Why is this different than OSS?
https://github.com/cosmos/cosmos-sdk/blob/main/x/feegrant/filtered_fee.go#L70-L87
OSS version has the same feegrant allowed_msg implementation as the one we have, so it's likely that the OSS version also has this bug |
Apply the OSS fix: cosmos/cosmos-sdk#16097 |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #284 +/- ##
==========================================
+ Coverage 54.93% 54.98% +0.04%
==========================================
Files 619 619
Lines 51509 51524 +15
==========================================
+ Hits 28297 28329 +32
+ Misses 21185 21162 -23
- Partials 2027 2033 +6
|
Describe your changes and provide context
A grantee can use uncapped grant from a grantee when a grant is using AllowedMsgAllowance type, even with the SpendLimit specified. This issue is resulted from the types.Any Allowance object inside the AllowedMsgAllowance is not updated correctly.
This PR fixes this issue and adds according unit tests to the AllowedMsgAllowance.
Testing performed to validate your change