-
Notifications
You must be signed in to change notification settings - Fork 170
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
Consider module max withdraw in max_withdraw query #2462
Conversation
WalkthroughThe update involves refining the logic for calculating a user's maximum withdrawal amount in the Changes
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 (
|
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.
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (1)
- x/leverage/keeper/grpc_query.go (1 hunks)
Files skipped from review as they are similar to previous changes (1)
- x/leverage/keeper/grpc_query.go
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. @toteki please check as well, this is related to the recent update you were doing as well.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2462 +/- ##
==========================================
- Coverage 75.38% 68.91% -6.48%
==========================================
Files 100 184 +84
Lines 8025 10866 +2841
==========================================
+ Hits 6050 7488 +1438
- Misses 1589 2766 +1177
- Partials 386 612 +226
|
there was a linter issue, I fixed it. |
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.
Thx! Additionally we might do the analogical change to MaxWithdraw message. I decided to only touch the query though, because its not consensus affecting. |
Fix max_withdraw function so it considers MaxModuleWithdraw.
There are cases in which MaxModuleWithdraw is smaller than user MaxWithdraw. When it happens umee allows user to select invalid withdraw amount that will result in error when broadcasting transaction
Summary by CodeRabbit
userMaxWithdraw
method call to useq.Keeper.userMaxWithdraw
for better functionality.uToken.Amount
andmoduleMaxWithdraw
for enhanced processing.