Skip to content

Commit

Permalink
lint++
Browse files Browse the repository at this point in the history
  • Loading branch information
toteki committed Dec 1, 2022
1 parent c6043bd commit 8af5a0c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/leverage/keeper/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,19 @@ func (k Keeper) TokenSymbolPrice(ctx sdk.Context, baseDenom string) (sdk.Dec, ui
}

if t.Blacklist {
return sdk.ZeroDec(), uint32(t.Exponent), types.ErrBlacklisted
return sdk.ZeroDec(), t.Exponent, types.ErrBlacklisted
}

price, err := k.oracleKeeper.GetExchangeRate(ctx, t.SymbolDenom)
if err != nil {
return sdk.ZeroDec(), uint32(t.Exponent), sdkerrors.Wrap(err, "oracle")
return sdk.ZeroDec(), t.Exponent, sdkerrors.Wrap(err, "oracle")
}

if price.IsNil() || !price.IsPositive() {
return sdk.ZeroDec(), uint32(t.Exponent), sdkerrors.Wrap(types.ErrInvalidOraclePrice, baseDenom)
return sdk.ZeroDec(), t.Exponent, sdkerrors.Wrap(types.ErrInvalidOraclePrice, baseDenom)
}

return price, uint32(t.Exponent), nil
return price, t.Exponent, nil
}

// exponent multiplies an sdk.Dec by 10^n. n can be negative.
Expand Down

0 comments on commit 8af5a0c

Please sign in to comment.