From 149558a1e98759d3a77cd8eef20499229d7eb246 Mon Sep 17 00:00:00 2001 From: autumncrypto Date: Sat, 28 Mar 2026 05:39:21 +0000 Subject: [PATCH] Fix incorrect copy-paste usage of isLoading and data.hash in useWriteContractSponsored example Fixed inconsistencies in the `useWriteContractSponsored` example in the README. Replaced `isLoading` with `isPending` to match the behavior of mutations in TanStack Query v5. Updated transaction hash display from `data?.hash` to `data`, since the hook returns the transaction hash directly (not an object). These changes align the documentation with the actual hook implementation and prevent confusion when integrating the example. --- packages/agw-react/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/agw-react/README.md b/packages/agw-react/README.md index 533c102d..1266e3b3 100644 --- a/packages/agw-react/README.md +++ b/packages/agw-react/README.md @@ -115,7 +115,7 @@ export default function SponsoredContractWrite() { writeContractSponsored, data, error, - isLoading, + isPending, isSuccess, } = useWriteContractSponsored(); @@ -130,10 +130,10 @@ export default function SponsoredContractWrite() { return (
- - {isSuccess &&
Transaction Hash: {data?.hash}
} + {isSuccess &&
Transaction Hash: {data}
} {error &&
Error: {error.message}
}
);