Approve Milestone
Component to approve a milestone with form, button and dialog variants.
MilestoneApproveEscrowsNEW
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/approve-milestone/form
Important Notes
- You can modify the form as you prefer.
- The <ApproveMilestoneButton milestoneIndex={0} /> requests the milestone index. You can change it to the milestone index you want to approve based on the escrow you are working on.
- 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.
Required Providers
<TrustlessWorkProvider />
<WalletProvider />
<EscrowProvider />
Related Blocks
Change Milestone Status
EscrowsComponent to change milestone status wit...
MilestoneStatus+1
Initialize Escrow
EscrowsComponent to initialize an escrow with d...
InitializeEscrows+1
Fund Escrow
EscrowsComponent to fund an escrow using form, ...
FundingEscrows+1
Resolve Dispute
EscrowsComponent to resolve disputes with form,...
DisputeResolve+1