Resolve Dispute
Component to resolve disputes with form, button and dialog variants.
DisputeResolveEscrows
Installation
Before installing the block, make sure you have the required providers and blocks. You can read more in the dependencies section based on the block you are using.
1npx trustless-work add escrows/single-release/resolve-dispute/formImportant Notes
- This form includes all the fields required by the resolve dispute payload (body requested for the tw endpoint, see documentation above) type, but it is intended for testing purposes only. You can adapt it to your needs—for example, if you always will use the same approverAmount, you can simplify the form to request only the fields you actually need. Any fixed data can be set directly in the payload before submitting the action
- The single-release <ResolveDisputeButton distributions={[{ address: 'GAG...JDS', amount: 10 }]} /> requests the the distribution amounts. The multi-release <ResolveDisputeButton milestoneIndex={0} distributions={[{ address: 'GAG...JDS', amount: 10 }]} /> requests the milestone index and the distribution amounts.
- Make sure to select an escrow before extracting data with selectedEscrow from the escrowProvider context. If you don't call setSelectedEscrow, the endpoint will not work.
- If you don't want to use the escrowProvider context, you'll need to provide the payload through an alternative method. Keep in mind that while part of the payload may come from the form, some fields—such as contractId—will not be requested in the form. These values need to be retrieved from an escrow, which is why using a context is the recommended approach.
- The showSelectMilestone prop is optional and defaults to false. If you want to select a milestone, you can set it to true. Only available for multi-release escrows.
- The milestoneIndex prop is optional and defaults to 0. If you want to select a milestone, you can set it to the milestone index. Only available for multi-release escrows.
Required Providers
<ReactQueryClientProvider />
<TrustlessWorkProvider />
<WalletProvider />
<EscrowProvider />
Related Blocks
Dispute
EscrowsAction to raise a dispute in the escrow ...
DisputeEscrows+1
Initialize Escrow
EscrowsComponent to initialize an escrow with d...
InitializeEscrows+1
Approve Milestone
EscrowsComponent to approve a milestone with fo...
MilestoneApprove+1
Change Milestone Status
EscrowsComponent to change milestone status wit...
MilestoneStatus+1