Skip to content

Commit

Permalink
fix denom
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Mar 17, 2022
1 parent 1e6c45c commit 8b2c9df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/leverage/keeper/grpc_query.go
Original file line number Diff line number Diff line change
Expand Up @@ -438,11 +438,11 @@ func (q Querier) CollateralValue(
if len(req.Denom) == 0 {
tokens = q.Keeper.GetBorrowerCollateral(ctx, lender)
} else {
if !q.Keeper.IsAcceptedToken(ctx, req.Denom) {
return nil, status.Error(codes.InvalidArgument, "not accepted Token denom")
if !q.Keeper.IsAcceptedUToken(ctx, req.Denom) {
return nil, status.Error(codes.InvalidArgument, "not accepted uToken denom")
}

collateral := q.Keeper.GetCollateralAmount(ctx, lender, q.Keeper.FromTokenToUTokenDenom(ctx, req.Denom))
collateral := q.Keeper.GetCollateralAmount(ctx, lender, req.Denom)

tokens = sdk.NewCoins(collateral)
}
Expand Down

0 comments on commit 8b2c9df

Please sign in to comment.