Browse Source

Merge pull request #676 from hermeznetwork/feature/warnLogPriceUpdate

added checker and log.warn to updateMethodTypeStatic
develop
Danilo Pantani 3 years ago
committed by GitHub
parent
commit
2dba819696
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      priceupdater/priceupdater.go

+ 4
- 0
priceupdater/priceupdater.go

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

Loading…
Cancel
Save