Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(BEDS-1184) return el rewards for guest dashboards #1314

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from

Conversation

remoterami
Copy link
Contributor

No description provided.

@@ -678,7 +677,7 @@ func (d *DataAccessService) GetValidatorDashboardGroupRewards(ctx context.Contex
ret.ProposalClSlashingIncReward = ret.ProposalClSlashingIncReward.Add(entry.SlasherRewards.Mul(gWei))
}

ret.Proposal.Income = ret.Proposal.Income.Add(elRewards)
ret.Proposal.Income = ret.Proposal.Income.Add(d.convertElToMain(elRewards).Mul(decimal.NewFromInt(d.config.Frontend.ElCurrencyDivisor)))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue: You're converting the EL currency to the main currency and adding it to a field that contains values in the CL currency. On Gnosis, this would mean that you've converted xDai to GNO and then added it to a mGNO value. This field should be a ClElValue struct.

Copy link
Contributor Author

@remoterami remoterami Feb 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applied your suggestion. Could also just make use of the already existing ret.ProposalElReward, but keeping it explicit to reduce any future source of error also shouldn't hurt

Also if it's fine from the API side, would you please fix the frontend data type issue? 😅

Copy link

cloudflare-workers-and-pages bot commented Feb 7, 2025

Deploying beaconchain with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6c8cc4b
Status: ✅  Deploy successful!
Preview URL: https://ce3652d2.beaconchain.pages.dev
Branch Preview URL: https://beds-1184-fix-el-rewards.beaconchain.pages.dev

View logs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants