Skip to main content

Documentation Index

Fetch the complete documentation index at: https://staging-docs.orderly.network/llms.txt

Use this file to discover all available pages before exploring further.

Subscribe to on-chain events (e.g. transaction completed) for connected wallet.

Example

useWalletSubscription({
  onMessage: (data: any) => {
    const { side, transStatus } = data;

    if (transStatus === "COMPLETED") {
      let msg = `${side} completed`;
      toast.success(msg);
    } else if (transStatus === "FAILED") {
      let msg = `${side} failed`;
      toast.error(msg);
    }
  }
});