diff --git a/backend/pkg/api/types/notifications.go b/backend/pkg/api/types/notifications.go index 6ab389248..0094c6ee2 100644 --- a/backend/pkg/api/types/notifications.go +++ b/backend/pkg/api/types/notifications.go @@ -36,7 +36,7 @@ type NotificationDashboardsTableRow struct { GroupId uint64 `json:"group_id"` GroupName string `json:"group_name"` EntityCount uint64 `json:"entity_count"` - EventTypes []string `json:"event_types" tstype:"('validator_online' | 'validator_offline' | 'group_online' | 'group_offline' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'got_slashed' | 'has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[]" faker:"slice_len=2, oneof: validator_online, validator_offline, group_online, group_offline, attestation_missed, proposal_success, proposal_missed, proposal_upcoming, max_collateral, min_collateral, sync, withdrawal, got_slashed, has_slashed, incoming_tx, outgoing_tx, transfer_erc20, transfer_erc721, transfer_erc1155"` + EventTypes []string `json:"event_types" tstype:"('validator_online' | 'validator_offline' | 'group_online' | 'group_offline' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'validator_got_slashed' | 'validator_has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[]" faker:"slice_len=2, oneof: validator_online, validator_offline, group_online, group_offline, attestation_missed, proposal_success, proposal_missed, proposal_upcoming, max_collateral, min_collateral, sync, withdrawal, validator_got_slashed, validator_has_slashed, incoming_tx, outgoing_tx, transfer_erc20, transfer_erc721, transfer_erc1155"` } type InternalGetUserNotificationDashboardsResponse ApiPagingResponse[NotificationDashboardsTableRow] diff --git a/frontend/components/notifications/DashboardsTable.vue b/frontend/components/notifications/DashboardsTable.vue index 14e086daf..c4134f283 100644 --- a/frontend/components/notifications/DashboardsTable.vue +++ b/frontend/components/notifications/DashboardsTable.vue @@ -51,14 +51,10 @@ const mapEventtypeToText = (eventType: NotificationDashboardsTableRow['event_typ switch (eventType) { case 'attestation_missed': return $t('notifications.dashboards.event_type.attestation_missed') - case 'got_slashed': - return $t('notifications.dashboards.event_type.got_slashed') case 'group_offline': return $t('notifications.dashboards.event_type.group_offline') case 'group_online': return $t('notifications.dashboards.event_type.group_online') - case 'has_slashed': - return $t('notifications.dashboards.event_type.has_slashed') case 'incoming_tx': return $t('notifications.dashboards.event_type.incoming_tx') case 'max_collateral': @@ -81,6 +77,10 @@ const mapEventtypeToText = (eventType: NotificationDashboardsTableRow['event_typ return $t('notifications.dashboards.event_type.transfer_erc721') case 'transfer_erc1155': return $t('notifications.dashboards.event_type.transfer_erc1155') + case 'validator_got_slashed': + return $t('notifications.dashboards.event_type.got_slashed') + case 'validator_has_slashed': + return $t('notifications.dashboards.event_type.has_slashed') case 'validator_offline': return $t('notifications.dashboards.event_type.validator_offline') case 'validator_online': diff --git a/frontend/types/api/notifications.ts b/frontend/types/api/notifications.ts index 08c039dea..b237514e4 100644 --- a/frontend/types/api/notifications.ts +++ b/frontend/types/api/notifications.ts @@ -42,7 +42,7 @@ export interface NotificationDashboardsTableRow { group_id: number /* uint64 */; group_name: string; entity_count: number /* uint64 */; - event_types: ('validator_online' | 'validator_offline' | 'group_online' | 'group_offline' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'got_slashed' | 'has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[]; + event_types: ('validator_online' | 'validator_offline' | 'group_online' | 'group_offline' | 'attestation_missed' | 'proposal_success' | 'proposal_missed' | 'proposal_upcoming' | 'max_collateral' | 'min_collateral' | 'sync' | 'withdrawal' | 'validator_got_slashed' | 'validator_has_slashed' | 'incoming_tx' | 'outgoing_tx' | 'transfer_erc20' | 'transfer_erc721' | 'transfer_erc1155')[]; } export type InternalGetUserNotificationDashboardsResponse = ApiPagingResponse; export interface NotificationEventGroup {