Fix incorrect copy-paste usage of isLoading and data.hash in useWriteContractSponsored example#425
Conversation
…ContractSponsored 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.
|
PR SummaryLow Risk Overview Written by Cursor Bugbot for commit 149558a. This will update automatically on new commits. Configure here. |
Fixed inconsistencies in the
useWriteContractSponsoredexample in the README.Replaced
isLoadingwithisPendingto match the behavior of mutations in TanStack Query v5. Updated transaction hash display fromdata?.hashtodata, 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.
PR-Codex overview
This PR focuses on updating the state management in the
SponsoredContractWritecomponent, changing the loading state variable and adjusting the display of the transaction hash.Detailed summary
isLoadingwithisPendingfor button disabling and loading indication.isPendingstate.data?.hashtodata.