Skip to content

Commit

Permalink
Merge pull request #404 from gobitfly/BIDS-3096/Aggregate_validator_d…
Browse files Browse the repository at this point in the history
…ashboard_group_deposits

Aggregate for deposits
  • Loading branch information
Eisei24 authored Jun 12, 2024
2 parents 3dd3548 + 0c63ec9 commit bf24fca
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions backend/pkg/api/data_access/vdb_deposits.go
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,11 @@ func (d *DataAccessService) GetValidatorDashboardElDeposits(dashboardId t.VDBId,
Valid: row.Valid,
}
if row.GroupId.Valid {
responseData[i].GroupId = uint64(row.GroupId.Int64)
if dashboardId.AggregateGroups {
responseData[i].GroupId = t.DefaultGroupId
} else {
responseData[i].GroupId = uint64(row.GroupId.Int64)
}
} else {
responseData[i].GroupId = t.DefaultGroupId
}
Expand Down Expand Up @@ -277,7 +281,11 @@ func (d *DataAccessService) GetValidatorDashboardClDeposits(dashboardId t.VDBId,
Signature: t.Hash(hexutil.Encode(row.Signature)),
}
if row.GroupId.Valid {
responseData[i].GroupId = uint64(row.GroupId.Int64)
if dashboardId.AggregateGroups {
responseData[i].GroupId = t.DefaultGroupId
} else {
responseData[i].GroupId = uint64(row.GroupId.Int64)
}
} else {
responseData[i].GroupId = t.DefaultGroupId
}
Expand Down

0 comments on commit bf24fca

Please sign in to comment.