Trustless Work
Decorative triangle background

Load Escrow

Component to load an escrow using form, button and dialog variants.

LoadEscrowsIndexerNEW

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/load-escrow/form

Important Notes
  • This form includes all the fields required by the load escrow 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 status, 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 <LoadEscrowButton contractId='CAZ6UQX7...' /> requests the contractId.
  • When the escrow is loaded, the selectedEscrow state is updated with the escrow data. So, you can use the selectedEscrow state to show the escrow data in the UI or something else.
  • If you don't want to use the escrowProvider context, you'll need to provide the payload through an alternative method.
Required Providers
<ReactQueryClientProvider />
<TrustlessWorkProvider />
<WalletProvider />
<EscrowProvider />
Load Escrow | Trustless Work Blocks