-
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
feat: additional leverage queries #617
Conversation
@@ -23,7 +23,7 @@ func (k Keeper) TokenPrice(ctx sdk.Context, denom string) (sdk.Dec, error) { | |||
|
|||
price, err := k.oracleKeeper.GetExchangeRateBase(ctx, denom) | |||
if err != nil { | |||
return sdk.ZeroDec(), err | |||
return sdk.ZeroDec(), sdkerrors.Wrap(err, "oracle") |
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 find myself having to use the rule "denom in error message is capitalized, so the error must be coming from oracle" a lot.
It will be better to prefix this one error return with a label since it's the only place where leverage calls an oracle function.
Just need edit: leaving out |
Let's not forget the CLI command handlers too. No need to add a boat load of tests for them, but lets at least have the CLI handlers 👍 |
Codecov Report
@@ Coverage Diff @@
## main #617 +/- ##
==========================================
- Coverage 48.45% 48.08% -0.37%
==========================================
Files 63 64 +1
Lines 7940 8801 +861
==========================================
+ Hits 3847 4232 +385
- Misses 3835 4311 +476
Partials 258 258
|
(cherry picked from commit c0935d0)
Description
Author Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
!
to the type prefix if API or client breaking changeCHANGELOG.md
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...
!
in the type prefix if API or client breaking change