Browse Source

added checker and log.warn to updateMethodTypeStatic

develop
Mikelle 3 years ago
parent
commit
7b6dd0899e
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      priceupdater/priceupdater.go

+ 3
- 0
priceupdater/priceupdater.go

@ -173,6 +173,9 @@ func (p *PriceUpdater) UpdatePrices(ctx context.Context) {
tokenPrice, err = p.getTokenPriceCoingecko(ctx, token.Addr) tokenPrice, err = p.getTokenPriceCoingecko(ctx, token.Addr)
case UpdateMethodTypeStatic: case UpdateMethodTypeStatic:
tokenPrice = token.StaticValue tokenPrice = token.StaticValue
if tokenPrice == float64(0) {
log.Warn("token price is set to 0. Probably StaticValue is not put in the configuration file")
}
case UpdateMethodTypeIgnore: case UpdateMethodTypeIgnore:
continue continue
} }

Loading…
Cancel
Save