Merge pull request #676 from hermeznetwork/feature/warnLogPriceUpdate added checker and log.warn to updateMethodTypeStatic
Danilo Pantani danpantani@gmail.com
Wed, 31 Mar 2021 12:40:01 -0300
1 files changed,
4 insertions(+),
0 deletions(-)
jump to
M
priceupdater/priceupdater.go
→
priceupdater/priceupdater.go
@@ -173,6 +173,10 @@ case UpdateMethodTypeCoingeckoV3:
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 }