Skip to content

Commit f6e7f49

Browse files
committed
fix(api): handle excess balance withdrawals
1 parent 838a936 commit f6e7f49

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

backend/pkg/api/data_access/vdb_withdrawals.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ func (d *DataAccessService) GetValidatorDashboardClWithdrawals(ctx context.Conte
369369
Type string `db:"type"`
370370
// cursor
371371
Slot uint64 `db:"slot"`
372-
SlotIndex uint64 `db:"index"`
372+
SlotIndex int64 `db:"index"`
373373
}
374374

375375
// there is a pre- and a post-pectra table in db; only query from respective tables if possible to increase compatibility and simplicity

backend/pkg/api/types/data_access.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ type CLWithdrawalsCursor struct {
120120
GenericCursor
121121

122122
Slot uint64
123-
SlotIndex uint64
123+
SlotIndex int64
124124
Amount decimal.Decimal
125125
}
126126

backend/pkg/api/types/validator_dashboard.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ type VDBWithdrawalsClTableRow struct {
310310
RejectReason *string `json:"reject_reason,omitempty" tstype:"'full_queue' | 'unknown_pubkey' | 'no_execution_withdrawal_credentials' | 'address_mismatch' | 'inactive' | 'exiting' | 'too_young' | 'pending_withdrawals' | 'not_compounding' | 'insufficient_effective_balance' | 'excess_balance'" faker:"oneof: full_queue, unknown_pubkey, no_execution_withdrawal_credentials, address_mismatch, inactive, exiting, too_young, pending_withdrawals, not_compounding, insufficient_effective_balance, excess_balance"`
311311
// unique
312312
Slot uint64 `json:"slot"`
313-
SlotIndex uint64 `json:"slot_index"`
313+
SlotIndex int64 `json:"slot_index"`
314314
}
315315
type GetValidatorDashboardConsensusLayerWithdrawalsResponse ApiPagingResponse[VDBWithdrawalsClTableRow]
316316

frontend/types/api/validator_dashboard.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ export interface VDBWithdrawalsClTableRow {
274274
* unique
275275
*/
276276
slot: number /* uint64 */;
277-
slot_index: number /* uint64 */;
277+
slot_index: number /* int64 */;
278278
}
279279
export type GetValidatorDashboardConsensusLayerWithdrawalsResponse = ApiPagingResponse<VDBWithdrawalsClTableRow>;
280280
export interface VDBTotalExecutionWithdrawalsData {

0 commit comments

Comments
 (0)