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
I copy/paste the examples from the useEnsAvatar documentation page.
Expected Behavior
I expect them to compile and run successfully
Steps To Reproduce
Example from documentation:
import { useEnsAvatar } from 'wagmi'
function App() {
const ensAvatar = useEnsAvatar({
address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
chainId: 1,
})
}
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
The issue is the documentation gives incorrect examples. The documentation at https://wagmi.sh/react/hooks/useEnsAvatar indicates that function needs to have a name supplied to it as the key determining thing to look up, but then other examples go on to use address as an option for what to look up. The underlying viem getEnsAvatar function doesn't take address, and the Typescript compilation fails if address is used.
The text was updated successfully, but these errors were encountered:
Feel free to update the documentation! Usually takes less time to do that than create a bug.
I know I can submit a pull request for the documentation update. However, it's unclear to me whether this was a mistake in the implementation (a bug that the intended method of using it doesn't work) or documentation (the feature's not going to change, and the documentation needs to change), so hence filing an issue so it could be discussed and properly acted upon.
This issue has been locked since it has been closed for more than 14 days.
If you found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest wagmi version. If you have any other comments you can create a new discussion.
Is there an existing issue for this?
Package Version
1.3
Current Behavior
I copy/paste the examples from the
useEnsAvatar
documentation page.Expected Behavior
I expect them to compile and run successfully
Steps To Reproduce
Example from documentation:
Link to Minimal Reproducible Example (StackBlitz, CodeSandbox, GitHub repo etc.)
No response
Anything else?
The issue is the documentation gives incorrect examples. The documentation at https://wagmi.sh/react/hooks/useEnsAvatar indicates that function needs to have a
name
supplied to it as the key determining thing to look up, but then other examples go on to useaddress
as an option for what to look up. The underlying viemgetEnsAvatar
function doesn't takeaddress
, and the Typescript compilation fails ifaddress
is used.The text was updated successfully, but these errors were encountered: