Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
gusin13 committed Dec 4, 2024
1 parent 2642299 commit e2de0e4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions internal/services/stats.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,11 @@ func (s *Services) GetOverallStats(
price, err := s.GetLatestBtcPriceUsd(ctx)
if err != nil {
log.Ctx(ctx).Error().Err(err).Msg("error while fetching latest btc price")
btcPrice = nil
btcPrice = nil // return empty field if error
} else {
roundedPrice := math.Round(price*100) / 100
btcPrice = &roundedPrice
}
roundedPrice := math.Round(price*100) / 100
btcPrice = &roundedPrice
}

return &OverallStatsPublic{
Expand Down

0 comments on commit e2de0e4

Please sign in to comment.