useStartDispute
Responsible for setting the escrow in dispute state. Changes the value of the escrow's "dispute_flag" property to true.
Usage
This custom hook exposes a mutation function to start a dispute in an escrow.
Description of Return Values
isPending
A boolean status flag indicating whether the mutation is currently in progress. Useful for showing loaders or disabling UI elements during the process.isError
A boolean status flag that becomestrue
if the mutation fails.isSuccess
A boolean status flag that becomestrue
once the mutation completes successfully.
Mutation Function
startDispute
This is the main mutation function. Internally, it wrapsmutate
ormutateAsync
and is responsible for building and returning an unsigned transaction based on the provided payload.
Argument:
StartDisputePayload
: An object containing the required fields to start a dispute in the escrow.
Return Value:
unsignedTransaction
: An object representing the constructed transaction, ready to be signed by your wallet and broadcast.
Usage Example
Last updated
Was this helpful?