kleros-v2 icon indicating copy to clipboard operation
kleros-v2 copied to clipboard

refactor: return typed parameters [WIP]

Open jaybuidl opened this issue 1 year ago • 3 comments

WIP: Still requires migrating the subgraph

Context: https://github.com/wagmi-dev/wagmi/discussions/2866#discussioncomment-7512415


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 avatar Nov 08 '23 18:11 jaybuidl

Deploy Preview for kleros-v2 ready!

Name Link
Latest commit 4ef3e8a9c2a1311509518581fada38c4bfcea26f
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.

netlify[bot] avatar Nov 08 '23 18:11 netlify[bot]

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

View more on Code Climate.

codeclimate[bot] avatar Nov 08 '23 18:11 codeclimate[bot]

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

sonarqubecloud[bot] avatar Nov 08 '23 18:11 sonarqubecloud[bot]