Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
ThanhNhann committed Oct 15, 2024
1 parent 605316f commit 7c1fc05
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions x/oracle/keeper/band_oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ func (k *Keeper) GetPrice(ctx context.Context, base, quote string) *math.LegacyD
// query ref by using GetBandPriceState
basePriceState := k.GetBandPriceState(ctx, base)
if basePriceState == nil || basePriceState.Rate.IsZero() {
k.Logger(ctx).Info("Can not get price state of base denom %s: price state is nil or rate is zero", base)
return nil
}

Expand All @@ -289,6 +290,7 @@ func (k *Keeper) GetPrice(ctx context.Context, base, quote string) *math.LegacyD

quotePriceState := k.GetBandPriceState(ctx, quote)
if quotePriceState == nil || quotePriceState.Rate.IsZero() {
k.Logger(ctx).Info("Can not get price state of quote denom %s: price state is nil or rate is zero", quote)
return nil
}

Expand Down

0 comments on commit 7c1fc05

Please sign in to comment.