diff --git a/backend/pkg/api/api_test.go b/backend/pkg/api/api_test.go index c422bf17f..15e4b8a64 100644 --- a/backend/pkg/api/api_test.go +++ b/backend/pkg/api/api_test.go @@ -389,6 +389,7 @@ func TestPublicAndSharedDashboards(t *testing.T) { numValidators := resp.Data.Validators.Exited + resp.Data.Validators.Offline + resp.Data.Validators.Pending + resp.Data.Validators.Online + resp.Data.Validators.Slashed assert.Greater(t, numValidators, uint64(0), "dashboard should contain at least one validator") assert.Greater(t, len(resp.Data.Groups), 0, "dashboard should contain at least one group") + assert.Greater(t, resp.Data.Network, uint64(0), "dashboard should contain a network id greater than 0") }) t.Run(fmt.Sprintf("[%s]: test group summary", dashboardId.id), func(t *testing.T) { diff --git a/backend/pkg/api/data_access/vdb_management.go b/backend/pkg/api/data_access/vdb_management.go index 9163a51ab..a96dced54 100644 --- a/backend/pkg/api/data_access/vdb_management.go +++ b/backend/pkg/api/data_access/vdb_management.go @@ -287,8 +287,9 @@ func (d *DataAccessService) GetValidatorDashboardOverview(ctx context.Context, d id = $1` return d.alloyReader.GetContext(ctx, &data.Network, query, dashboardId.Id) }) + } else { // load the chain id from the config in case of public dashboards + data.Network = utils.Config.Chain.ClConfig.DepositChainID } - // TODO handle network of validator set dashboards // Groups if dashboardId.Validators == nil && !dashboardId.AggregateGroups {