Closed Harman-singh-waraich closed 2 weeks ago
The updates enhance the user interface by introducing maintenance buttons for managing disputes, allowing users to pass periods, execute rulings, and distribute rewards. These components integrate with Kleros Core contracts and utilize new hooks for improved state management. Additionally, a new field, nbVotes
, has been added to the currentRound
object in the disputeDetailsQuery
GraphQL query to enrich the dispute details.
Files / Directories | Change Summary |
---|---|
web/src/hooks/queries/useDisputeDetailsQuery.ts |
Added a new field nbVotes to the currentRound object in the disputeDetailsQuery GraphQL query. |
web/src/pages/Cases/CaseDetails/index.tsx |
Added MaintenanceButtons import, created HeaderContainer styled component, and updated structure to include MaintenanceButtons . |
web/src/pages/Cases/CaseDetails/MaintenanceButtons/*.tsx |
Introduced new components for various dispute actions: MaintenanceButtons , DrawButton , ExecuteRulingButton , PassPeriodButton , and WithdrawAppealFees . |
web/src/hooks/useTransactionBatcher.tsx |
Implemented useTransactionBatcher custom hook for facilitating batch transactions in a blockchain context. |
sequenceDiagram
participant User
participant UI as MaintenanceButtons UI
participant Contract as Kleros Core Contracts
User ->> UI: Click Pass Period Button
UI ->> Contract: passPeriod(dispute.id)
Contract ->> UI: Confirmation
User ->> UI: Click Execute Ruling Button
UI ->> Contract: executeRuling(dispute.id)
Contract ->> UI: Confirmation
User ->> UI: Click Distribute Rewards Button
UI ->> Contract: execute(dispute.id, dispute.currentRoundIndex, 20)
Contract ->> UI: Confirmation
Objective | Addressed | Explanation |
---|---|---|
Add maintenance buttons for dispute actions (#1601) | ✅ | |
Disable button if prepareCall fails (#1601) | ✅ | |
Display error message for failed prepareCall (#1601) | ❓ | Unclear if error messages are implemented in the UI. |
In the realm where disputes arise,
Maintenance buttons now surprise,
With actions swift and seamless flair,
Passing periods, rulings fair.
Rewards now flow, no task too tall,
Contracts heed the maintenance call.
Cheers to progress, big and small! 🌟
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Name | Link |
---|---|
Latest commit | 097bbaa4fced855bac4812720dc771f3df1b3a73 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/66b0a2df7dbbb600089d5ee8 |
Name | Link |
---|---|
Latest commit | |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/66b34bdde38124b2613b9819 |
Deploy Preview | https://deploy-preview-1645--kleros-v2-testnet.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/66b34a97ff0755a5c43e8f68 |
Code Climate has analyzed commit 097bbaa4 and detected 17 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 3 |
Duplication | 6 |
Style | 8 |
View more on Code Climate.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
closes #1601
Summary by CodeRabbit
New Features
MaintenanceButtons
component for managing maintenance actions related to disputes.DrawButton
,ExecuteRulingButton
, andPassPeriodButton
.DistributeRewards
component for reward distribution management.useTransactionBatcher
custom hook to facilitate batching of contract transactions.Enhancements
CaseDetails
page structure to incorporate theMaintenanceButtons
.nbVotes
field to thedisputeDetailsQuery
for improved tracking of disputes.PR-Codex overview
This PR introduces various updates related to dispute details, maintenance, and contract batching.
Detailed summary
jurorsDrawn
andjurorRewardsDispersed
to roundsTransactionBatcher
contract for batch transactions