Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
kosegor committed Nov 13, 2023
1 parent 5d1cb29 commit 8c3e9cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
11 changes: 10 additions & 1 deletion x/metoken/keeper/mocks_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,16 @@ func (o Oracle) AllMedianPrices(_ sdk.Context) otypes.Prices {
return o.prices
}

func (o Oracle) SetExchangeRateWithEvent(_ sdk.Context, _ string, _ sdk.Dec) {
func (o Oracle) SetExchangeRateWithEvent(_ sdk.Context, denom string, rate sdk.Dec) {
o.prices = append(
o.prices, otypes.Price{
ExchangeRateTuple: otypes.NewExchangeRateTuple(
denom,
rate,
),
BlockNum: uint64(1),
},
)
}

func NewOracleMock() Oracle {
Expand Down
4 changes: 2 additions & 2 deletions x/metoken/keeper/price.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func (k Keeper) SetPricesToOracle() error {
for _, index := range indexes {
iPrice, err := k.Prices(index)
if err != nil {
k.Logger().Debug(
k.Logger().Error(
"setting price to oracle: couldn't calculate the price",
"denom", index.Denom,
"error", err.Error(),
Expand All @@ -113,7 +113,7 @@ func (k Keeper) SetPricesToOracle() error {

indexToken, err := k.leverageKeeper.GetTokenSettings(*k.ctx, index.Denom)
if err != nil {
k.Logger().Debug(
k.Logger().Error(
"setting price to oracle: couldn't get token settings",
"denom", index.Denom,
"error", err.Error(),
Expand Down

0 comments on commit 8c3e9cf

Please sign in to comment.