useResolveDispute
Resolves escrow disputes by distributing funds to the approver and service provider as determined by the dispute resolver.
Usage
This custom hook exposes a mutation function to resolve 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
resolveDispute
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:
ResolveDisputePayload
: An object containing the required fields to resolve the 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?