arnaucube
arnaucube/hermez-nodePublic Self-hosted repository
added checker and log.warn to updateMethodTypeStatic
Mikelle mikhwall@gmail.com
Wed, 24 Mar 2021 22:36:07 +0300
commit

7b6dd0899ee0dd6f2fc54b1345e0a599ae12e472

parent

f07fd82822d45461ec58cda75bccf34c17bd2897

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 }