Account
useWalletSubscription
Hook to subscribe to on-chain wallet events like deposit and withdrawal completions.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Hook to subscribe to on-chain wallet events like deposit and withdrawal completions.
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);
}
}
});