Skip to content

Commit

Permalink
Merge pull request #218 from gobitfly/implement_dashboard_handlers
Browse files Browse the repository at this point in the history
fix scaling of cl rewards in summary view
  • Loading branch information
peterbitfly authored Apr 22, 2024
2 parents a4090ce + 75a3ee6 commit defc999
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/pkg/api/data_access/data_access.go
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ func (d *DataAccessService) GetValidatorDashboardOverview(dashboardId t.VDBId) (
efficiencyField = &data.Efficiency.AllTime
}
(*rewardsField).El = decimal.NewFromInt(queryResult.BlocksElReward.Int64)
(*rewardsField).Cl = decimal.NewFromInt(queryResult.BalanceEnd.Int64 + queryResult.WithdrawalsAmount.Int64 - queryResult.BalanceStart.Int64 - queryResult.DepositsAmount.Int64)
(*rewardsField).Cl = decimal.NewFromInt(queryResult.BalanceEnd.Int64 + queryResult.WithdrawalsAmount.Int64 - queryResult.BalanceStart.Int64 - queryResult.DepositsAmount.Int64).Mul(decimal.NewFromInt(1e9))
*efficiencyField = d.calculateTotalEfficiency(queryResult.AttestationEfficiency, queryResult.ProposerEfficiency, queryResult.SyncEfficiency)
return nil
})
Expand Down

0 comments on commit defc999

Please sign in to comment.