Skip to content

Commit

Permalink
log asset failure
Browse files Browse the repository at this point in the history
  • Loading branch information
bonedaddy committed Mar 25, 2021
1 parent 7c9ab6c commit a559efe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/gondx/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -393,18 +393,18 @@ func handleIndexUpdates(db *db.Database, bc *bclient.Client, logger *zap.Logger,
func updateTVL(bc *bclient.Client, mc *multicall.Multicall, logger *zap.Logger, db *db.Database, name string) error {
ip, err := bc.GetIndexPool(name)
if err != nil {
logger.Error("failed to get index pool", zap.Error(err))
logger.Error("failed to get index pool", zap.Error(err), zap.String("pool", name))
return err
}
poolAddress := getPoolAddress(strings.ToLower(name))
tvl, err := bc.GetTotalValueLocked(ip, mc, logger, poolAddress)
if err != nil {
logger.Error("failed to get total value locked", zap.Error(err))
logger.Error("failed to get total value locked", zap.Error(err), zap.String("pool", name))
return nil
}
err = db.RecordValueLocked(strings.ToLower(name), tvl)
if err != nil {
logger.Error("failed to record total value locked", zap.Error(err))
logger.Error("failed to record total value locked", zap.Error(err), zap.String("pool", name))
return err
}
return nil
Expand Down

0 comments on commit a559efe

Please sign in to comment.