added checker and log.warn to updateMethodTypeStatic
Mikelle mikhwall@gmail.com
Wed, 24 Mar 2021 22:36:07 +0300
1 files changed,
3 insertions(+),
0 deletions(-)
jump to
M
priceupdater/priceupdater.go
→
priceupdater/priceupdater.go
@@ -173,6 +173,9 @@ 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") + } case UpdateMethodTypeIgnore: continue }