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
{{ message }}
Repository navigation
Thirdweb changing return type of wagmi useAccount hook #6810
When implementing Thirdweb into my Next.js app, I had noticed unusual type errors. They were about type string not being assignable to type Address (0x${string}).
I checked the type of the address I was getting from wagmi's useAccount hook and it was returning string | uindefined which was not the case before.
After removing the <ThirdwebProvider> from my app it was back to returning the correct types.
I have not used thirdweb before, however, I am positive that this is not the intended behaviour, since the address should maintain the type set by wagmi & viem to maintain type safety. Many web3 libraries do support the Address type therefore I am unable to implement thirdweb into my application, and converting every instance of useAccount instance that returns the address top the Address type is not desired.
Activity
linear commentedon Apr 22, 2025
TOOL-4226 Thirdweb changing return type of wagmi useAccount hook
jnsdls commentedon Apr 22, 2025
hi @encryptedDegen - thirdweb does use the option to override the internal types of AbiType
You can learn about that configuration here: https://abitype.dev/config
In the short term you should be able to add a similar declaration into your own app to do the opposite:
In the longer term we may re-visit this, but it would likely have to come with a major version bump to
thirdweb.-- Edit
Not closing this issue because it is useful to track the need / requirements for more/less strict types.
0xDAEF0F commentedon Apr 24, 2025
0xDAEF0F commentedon Apr 25, 2025
github-actions commentedon May 3, 2025
This issue has been inactive for 7 days. It is now marked as stale and will be closed in 2 days if no further activity occurs.