Merge pull request #676 from hermeznetwork/feature/warnLogPriceUpdate

added checker and log.warn to updateMethodTypeStatic
This commit is contained in:
Danilo Pantani
2021-03-31 12:40:01 -03:00
committed by GitHub

View File

@@ -173,6 +173,10 @@ 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,",
"token", token.Symbol)
}
case UpdateMethodTypeIgnore: case UpdateMethodTypeIgnore:
continue continue
} }