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

Dispute actions info box: Consider cases where the round is appealed #84

Merged
merged 3 commits into from
Mar 17, 2021

Conversation

fabriziovigevani
Copy link
Member

Info box: Considers cases where round was appealed.

If a keeper voted in consensus with the plurality we would always show a positive message stating that they will receive rewards.
This is inaccurate as the round could have been appealed, making the final ruling different from the keeper's outcome during voting phase

For more context see #72

@vercel
Copy link

vercel bot commented Mar 15, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/1hive/celeste-dashboard/ALn3h5tVfMPfm9c4xRVW5XFXtNwK
✅ Preview: https://celeste-dashboard-git-info-copy-appealed-1hive.vercel.app

Copy link
Member

@rperez89 rperez89 left a comment

Choose a reason for hiding this comment

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

LGTM just one minnor suggestion if you feel that might suit here

if (hasVotedInConsensus) {
background = backgroundColor[appeal ? 'negative' : 'positive']
icon = appeal ? IconVotingFailed : IconRewardsGreen
paragraph = appeal ? (
Copy link
Member

Choose a reason for hiding this comment

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

maybe we can have this as an use memo or maybe get the data from a function instead of doing so many ? :

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah i'll try to do an early return and see how it looks.
What do you mean getting the dats from a function? As you may notice i already separated this part in its own function, but there are so many different cases and conditions that i couldn't find a way to separate it and make it cleaner.

But we can try to do the early return. Also regarding the useMemo, note that the function is already inside an useMemo

Copy link
Member Author

Choose a reason for hiding this comment

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

created an issue #90

@fabriziovigevani fabriziovigevani merged commit e13b142 into master Mar 17, 2021
@fabriziovigevani fabriziovigevani deleted the info-copy-appealed branch March 17, 2021 15:41
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