-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
@Thoughtscript we can hide the buttons only if the contract is finished:
I don't sure if this code follow this workflow |
for info the fees are necessary to create a dispute, they are the arbitration fees |
@Thoughtscript in your example I don't understand how a party can create a dispute |
@n1c01a5 - Thank you for clarifying the dispute creation flow - I'll modify that and then resubmit! |
@n1c01a5 - reviewed: https://github.com/kleros/kleros-api/blob/develop/src/constants/contract.js - switching check to: |
Per: https://github.com/kleros/kleros-api/blob/develop/src/constants/contract.js - I believe the check should block display of dispute button only if the status is `4` or contract `resolved`.
Support for contract amount
@@ -132,9 +138,10 @@ class Contract extends PureComponent { | |||
<div className="description Contract-content-item">{contract.data.description}</div> | |||
{contract.data.status !== 4 && !contract.data.partyAFee && !contract.data.partyBFee ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to create a const DISPUTE_RESOLVED = 4
instead 4
<div style={this.hideEmptyContractEl(contract)} className="Contract-content-actions-button Contract-actions-button-left" onClick={this.createDispute}>Create dispute</div> | ||
{contract.data.partyA === accounts.data[0] && <div style={this.hideEmptyContractEl(contract)} className="Contract-content-actions-button Contract-content-actions-button-right" onClick={this.createPay}>Pay</div>} | ||
{contract.data.partyB === accounts.data[0] && <div style={this.hideEmptyContractEl(contract)} className="Contract-content-actions-button Contract-content-actions-button-right" onClick={this.createReimburse}>Reimburse</div>} | ||
{this.showEmptyContractEl(contract) && <div className="Contract-content-item">No contractual fees remain</div>} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the message is more "The contract has ended".
Ideally it would be good to have the contract status as:
- Bob pays Alice
- Bob refunds Alice
- Bob wins the dispute
- Bob made a timeout
Hides buttons when zero fees - displays "No contractual fees remain".
For issue: #10