Skip to content

useAddCompleteTxIntention

Adds a complete transaction intention. Wraps addCompleteTxIntention and stores the resulting intention in the context store.

Import

ts
import { useAddCompleteTxIntention } from "@midl/executor-react";

Example

ts
const { addCompleteTxIntention } = useAddCompleteTxIntention();
addCompleteTxIntention({ assetsToWithdraw: [address1, address2] });

Parameters

NameTypeDescription
configConfig(optional) Custom configuration to override the default.
storeMidlContextStore(optional) Custom store to override the default.

Returns

NameTypeDescription
addCompleteTxIntention(variables: AddCompleteTxIntentionVariables) => voidMutation function to add a complete transaction intention.
addCompleteTxIntentionAsync(variables: AddCompleteTxIntentionVariables) => Promise<TransactionIntention>Async mutation function.
...restobjectAdditional mutation state from React Query.

AddCompleteTxIntentionVariables

The AddCompleteTxIntentionVariables type uses the same structure as the Withdrawal type.

See the Withdrawal documentation for a detailed description of its fields and usage.