Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
Alok committed Apr 18, 2024
1 parent 55164bb commit b1ca313
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions pkg/apiserver/dashboard.go
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,9 @@ func (s *Service) configureDashboard() error {
s.statMu.RLock()
defer s.statMu.RUnlock()

start := s.lastBlock - uint64(limit*page)

if start < 0 {
start = s.lastBlock
start := s.lastBlock
if s.lastBlock > uint64(limit*page) {
start = s.lastBlock - uint64(limit*page)
}

dash := make([]*DashboardOut, 0)
Expand All @@ -410,10 +409,8 @@ func (s *Service) configureDashboard() error {
bidders = make([]*BidderAllowance, 0)
}

providers := make([]*ProviderBalances, 0)
for _, p := range s.providerStakes.Values() {
providers = append(providers, p)
}
providers := s.providerStakes.Values()

dashEntry := &DashboardOut{
Block: stats,
Providers: providers,
Expand Down

0 comments on commit b1ca313

Please sign in to comment.