Skip to content

Thirdweb changing return type of wagmi useAccount hook #6810

Closed as not planned
@encryptedDegen

Description

@encryptedDegen

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.

Package versions

Wagmi version: 2.14.16
viem cersion: 2.27.3
@thirdweb-dev/wagmi-adapter version: 0.2.58
thirdweb version: 5.95.2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions