Skip to content

Commit

Permalink
fix: remove all mentions of group offline event
Browse files Browse the repository at this point in the history
See: BEDS-847
  • Loading branch information
LuccaBitfly committed Oct 22, 2024
1 parent 79cb565 commit 36b1339
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
15 changes: 1 addition & 14 deletions backend/pkg/api/data_access/notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -559,19 +559,6 @@ func (d *DataAccessService) GetValidatorDashboardNotificationDetails(ctx context
continue
}
notificationDetails.ValidatorBackOnline = append(notificationDetails.ValidatorBackOnline, t.NotificationEventValidatorBackOnline{Index: curNotification.ValidatorIndex, EpochCount: curNotification.Epoch})
case types.ValidatorGroupIsOfflineEventName:
// TODO type / collection not present yet, skipping
/*curNotification, ok := not.(*notification.validatorGroupIsOfflineNotification)
if !ok {
return nil, fmt.Errorf("failed to cast notification to validatorGroupIsOfflineNotification")
}
if curNotification.Status == 0 {
notificationDetails.GroupOffline = ...
notificationDetails.GroupOfflineReminder = ...
} else {
notificationDetails.GroupBackOnline = ...
}
*/
case types.ValidatorReceivedWithdrawalEventName:
curNotification, ok := notification.(*n.ValidatorWithdrawalNotification)
if !ok {
Expand Down Expand Up @@ -1869,7 +1856,7 @@ func (d *DataAccessService) GetNotificationSettingsDashboards(ctx context.Contex
switch eventName {
case types.ValidatorIsOfflineEventName:
settings.IsValidatorOfflineSubscribed = true
case types.GroupIsOfflineEventName:
case types.ValidatorGroupEfficiencyEventName:
settings.IsGroupEfficiencyBelowSubscribed = true
settings.GroupEfficiencyBelowThreshold = event.Threshold
case types.ValidatorMissedAttestationEventName:
Expand Down
4 changes: 1 addition & 3 deletions backend/pkg/commons/types/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ const (
ValidatorMissedProposalEventName EventName = "validator_proposal_missed"
ValidatorExecutedProposalEventName EventName = "validator_proposal_submitted"

ValidatorDidSlashEventName EventName = "validator_did_slash"
ValidatorGroupIsOfflineEventName EventName = "validator_group_is_offline"
ValidatorDidSlashEventName EventName = "validator_did_slash"

ValidatorReceivedDepositEventName EventName = "validator_received_deposit"
NetworkSlashingEventName EventName = "network_slashing"
Expand All @@ -86,7 +85,6 @@ const (
// Validator dashboard events
ValidatorIsOfflineEventName EventName = "validator_is_offline"
ValidatorIsOnlineEventName EventName = "validator_is_online"
GroupIsOfflineEventName EventName = "group_is_offline" // TODO @BACKEND TEAM: probably remove this and all relevant code
ValidatorGroupEfficiencyEventName EventName = "validator_group_efficiency"
ValidatorMissedAttestationEventName EventName = "validator_attestation_missed"
ValidatorProposalEventName EventName = "validator_proposal"
Expand Down

0 comments on commit 36b1339

Please sign in to comment.