You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
freeatnet
changed the title
Return type of useSendUserOperation is inconsistent with react-query pattern
Return type of useSendUserOperation is inconsistent with useMutation return type
Apr 22, 2024
Steps to reproduce:
useSendUserOperation
hook.result.data
in a branch whereresult.isSuccess
is true.Expected: based on original react-query types, when
isSuccess
is true,data
should haveTData
type.Observed:
data
isTData | undefined
.Same issue applies to
isError
anderror
.Quick triage suggests original types get mangled by
Omit<UseMutationResult<…>, 'mutate'>
. Wagmi seems to use a customUnionOmit
utility type to deal with the same problem.The text was updated successfully, but these errors were encountered: