Skip to content

Add commit reveal support #1312

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

Merged
merged 29 commits into from
Jan 10, 2024
Merged

Add commit reveal support #1312

merged 29 commits into from
Jan 10, 2024

Conversation

alcercu
Copy link
Contributor

@alcercu alcercu commented Oct 30, 2023

PR-Codex overview

This PR focuses on adding new features and making improvements to the codebase.

Detailed summary:

  • Added isUndefined function to utils/index.ts
  • Added catchShortMessage function to utils/index.ts
  • Added useIsDesktop hook to hooks/useIsDesktop.tsx
  • Updated isLastRound function in utils/isLastRound.ts
  • Added InfoCard component to components/InfoCard.tsx
  • Added PendingVotesBox component to pages/Cases/CaseDetails/Voting/PendingVotesBox.tsx
  • Added JustificationArea component to pages/Cases/CaseDetails/Voting/Classic/JustificationArea.tsx
  • Updated HeroImage component in components/HeroImage.tsx
  • Updated contactDetails function in consts/eip712-messages.ts
  • Updated VoteWithCommitExtraInfo component in components/Popup/ExtraInfo/VoteWithCommitExtraInfo.tsx
  • Added useSigningAccount hook to hooks/useSigningAccount.tsx
  • Updated Filters component in components/CasesDisplay/Filters.tsx
  • Updated CasesGrid component in components/CasesDisplay/CasesGrid.tsx
  • Updated CasesFetcher component in pages/Cases/CasesFetcher.tsx

The following files were skipped due to too many changes: web/src/pages/Cases/CasesFetcher.tsx, web/src/pages/Cases/CaseDetails/Voting/Classic/index.tsx, web/src/pages/Cases/CaseDetails/Voting/Classic/Vote.tsx, web/src/pages/Cases/CaseDetails/Voting/VotingHistory.tsx, web/src/pages/Cases/CaseDetails/Voting/Classic/OptionsContainer.tsx, web/src/pages/Cases/CaseDetails/Voting/Classic/Commit.tsx, web/src/pages/Cases/CaseDetails/Timeline.tsx, web/src/pages/Cases/CaseDetails/Voting/Classic/Reveal.tsx, web/src/pages/Cases/CaseDetails/Voting/index.tsx

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@netlify
Copy link

netlify bot commented Oct 30, 2023

Deploy Preview for kleros-v2 ready!

Name Link
🔨 Latest commit 0165b1d
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2/deploys/659ee5132f46d500082f40c3
😎 Deploy Preview https://deploy-preview-1312--kleros-v2.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@alcercu alcercu marked this pull request as ready for review January 9, 2024 15:17
@alcercu alcercu requested a review from kemuru January 9, 2024 15:18
Copy link
Contributor

@kemuru kemuru left a comment

Choose a reason for hiding this comment

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

code is looking good, but for some reason the Commit voting options' buttons are not working?

2024-01-09.20-15-59.mp4

I then tested creating a case in a court without Commit/reveal activated, voting directly works good:

2024-01-09.23-18-29.mp4

@alcercu
Copy link
Contributor Author

alcercu commented Jan 10, 2024

code is looking good, but for some reason the Commit voting options' buttons are not working?

2024-01-09.20-15-59.mp4
I then tested creating a case in a court without Commit/reveal activated, voting directly works good:

2024-01-09.23-18-29.mp4

It works for me 🤔 did it prompt you to sign a message? try deleting the localstorage

@kemuru
Copy link
Contributor

kemuru commented Jan 10, 2024

code is looking good, but for some reason the Commit voting options' buttons are not working?
2024-01-09.20-15-59.mp4
I then tested creating a case in a court without Commit/reveal activated, voting directly works good:
2024-01-09.23-18-29.mp4

It works for me 🤔 did it prompt you to sign a message? try deleting the localstorage

its not prompting, yep I tried deleting localStorage and same problem. I now spotted this error in the console:

image

@kemuru
Copy link
Contributor

kemuru commented Jan 10, 2024

@alcercu Got this error when voting one option, and then because the subgraph was really slow I was able to click on another option which maybe was saved in localStorage and then at the time of reveal it errored since the options didn't match (but worked when deleting localStorage since it bruteforced the choice)

image

@jaybuidl jaybuidl linked an issue Jan 10, 2024 that may be closed by this pull request
Copy link

codeclimate bot commented Jan 10, 2024

Code Climate has analyzed commit 0165b1d and detected 190 issues on this pull request.

Here's the issue category breakdown:

Category Count
Complexity 12
Duplication 28
Style 150

View more on Code Climate.

Copy link

@jaybuidl jaybuidl merged commit 0165b1d into dev Jan 10, 2024
@jaybuidl jaybuidl deleted the feat(web)/commit-reveal branch January 10, 2024 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hidden Votes (commit/reveal scheme)
3 participants