-
Notifications
You must be signed in to change notification settings - Fork 625
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
chore: transfer authz nits #3586
Conversation
…d potential pitfalls
updatedTransferAuthz, ok := res.Updated.(*types.TransferAuthorization) | ||
suite.Require().True(ok) | ||
|
||
remainder := updatedTransferAuthz.Allocations[0].SpendLimit.AmountOf(sdk.DefaultBondDenom) | ||
suite.Require().True(types.UnboundedSpendLimit().Equal(remainder)) | ||
suite.Require().True(res.Accept) | ||
suite.Require().False(res.Delete) | ||
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.
I was going to do a stateful lookup using the authz keeper to maintain the same checks but we don't actually register the transfer authorization for these tests, its bypassed. I think this is fine tho!
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.
You are the greatest and best 🙏 ❤️
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #3586 +/- ##
=======================================
Coverage 78.79% 78.79%
=======================================
Files 182 182
Lines 12688 12688
=======================================
Hits 9998 9998
Misses 2258 2258
Partials 432 432
|
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.
LGTM!
* chore: optimise transfer authz to consume less gas for unbounded spend limits (#3586) (cherry picked from commit f6e8f03) # Conflicts: # modules/apps/transfer/types/transfer_authorization.go * resolve conflicts --------- Co-authored-by: Damian Nolan <[email protected]>
* chore: optimise transfer authz to consume less gas for unbounded spend limits (#3586) (cherry picked from commit f6e8f03) # Conflicts: # modules/apps/transfer/types/transfer_authorization.go * resolve conflicts --------- Co-authored-by: Damian Nolan <[email protected]>
Description
#3454 (comment)
nil
to consume less gas and avoid potential pitfallscloses: #XXXX
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/
) or specification (x/<module>/spec/
).godoc
comments.Files changed
in the Github PR explorer.Codecov Report
in the comment section below once CI passes.