Skip to content

Commit

Permalink
adding symbol denom
Browse files Browse the repository at this point in the history
  • Loading branch information
kosegor committed Nov 7, 2023
1 parent 225b434 commit 65cdfad
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion x/metoken/keeper/price.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,18 @@ func (k Keeper) SetPricesToOracle() error {
continue
}

k.oracleKeeper.SetExchangeRateWithEvent(*k.ctx, index.Denom, iPrice.Price)
indexToken, err := k.leverageKeeper.GetTokenSettings(*k.ctx, index.Denom)
if err != nil {
k.Logger().Debug(
"setting price to oracle: couldn't get token settings",
"denom", index.Denom,
"error", err.Error(),
"block_time", k.ctx.BlockTime(),
)
continue
}

k.oracleKeeper.SetExchangeRateWithEvent(*k.ctx, indexToken.SymbolDenom, iPrice.Price)
}

return nil
Expand Down

0 comments on commit 65cdfad

Please sign in to comment.