Skip to content

refactor: return typed parameters [WIP] #1322

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

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

jaybuidl
Copy link
Member

@jaybuidl jaybuidl commented Nov 8, 2023

WIP: Still requires migrating the subgraph

Context: wevm/wagmi#2866 (reply in thread)


PR-Codex overview

Focus of this PR:

This PR focuses on refactoring and improving the code related to juror balances and stake display in the CourtDetails page.

Detailed summary:

  • Updated the InputDisplay component in InputDisplay.tsx and the StakeWithdraw component in StakeWithdraw.tsx to use the stakedInCourt property from the jurorBalance object instead of accessing the array index directly.
  • Updated the DisputeKitClassic.sol, DisputeKitSybilResistant.sol, and SortitionModule.sol contracts to use the JurorBalance struct and access the juror balance properties directly.
  • Updated the StakeWithdrawButton.tsx component to use the stakedInCourt property from the jurorBalance object instead of accessing the array index directly.
  • Added the JurorBalance struct to the KlerosCore.sol contract and updated the getJurorBalance function to return the JurorBalance struct.
  • Updated the JurorStakeDisplay.tsx and JurorBalanceDisplay components to use the stakedInCourt property from the jurorBalance object instead of accessing the array index directly.

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

@jaybuidl jaybuidl requested a review from alcercu November 8, 2023 18:34
Copy link

netlify bot commented Nov 8, 2023

Deploy Preview for kleros-v2 ready!

Name Link
🔨 Latest commit 4ef3e8a
🔍 Latest deploy log https://app.netlify.com/sites/kleros-v2/deploys/654bd4b78490a700080916a9
😎 Deploy Preview https://deploy-preview-1322--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.

@jaybuidl jaybuidl added Type: Enhancement ✨ Compatibility: ABI change 🗯 Smart contract ABI is changing. Package: Web Court web frontend Package: Contracts Court smart contracts Package: Subgraph Court subgraph labels Nov 8, 2023
Copy link

codeclimate bot commented Nov 8, 2023

Code Climate has analyzed commit 4ef3e8a and detected 0 issues on this pull request.

View more on Code Climate.

Copy link

sonarqubecloud bot commented Nov 8, 2023

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compatibility: ABI change 🗯 Smart contract ABI is changing. Package: Contracts Court smart contracts Package: Subgraph Court subgraph Package: Web Court web frontend Type: Enhancement ✨
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant