-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: type Address
is not correctly picked even after configuring underlying AddressType
#1712
Comments
Thanks for reporting! Seems like there is a version mismatch between packages. Created wevm/references#74 that should fix this once rolled out downstream. Aside: Noticed the TypeScript version in the project you shared does not meet minimum required for wagmi. Should be at least 4.7.4 (currently 4.7.2). |
Thanks so much @tmm 🙌 |
This bug has returned. |
@meltingice will have a fix shortly. in the future, feel free to create a new issue. going to eliminate this issue from creeping up in the future with some upcoming changes. |
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
0.10.10
Current Behavior
As mentioned in this comment #1330 (comment) if you try to configure the underlying
AddressType
it works but things such as typeConnectorData
(specifically stuff fromwagmi/connectors
) still have types as0x{string}
.Expected Behavior
Once configured the underlying
AddressType
tostring
as mentioned in #1330 (comment) it should be reflected everywhere.Steps To Reproduce
Example repo link: https://github.com/technophile-04/se-2/tree/issue/wagmi
if you clone the repo checkout to
issue/wagmi
branch and go toBurnerConnector.ts
you will find some typescript errors because in some places AdressType still refers to 0x{string} even after adding the declaration file.Link to Minimal Reproducible Example (CodeSandbox, StackBlitz, etc.)
https://github.com/technophile-04/se-2/tree/issue/wagmi
Anything else?
I think the reason for this is how wagmi is handling dependency of 'abitype'(I may be wrong here though) , checkout below SS :
The above SS is of
node_modules
ofnexjs
directory. As we can see thecore
does not haveabitype
in itsnode_modules
and thus using theabitype
from our repo and using anything fromcore
is inferring correct type forAddressType : string
but if we look atconnectors
directory in above SS there isabitype
in itsnode_modules
because of which its takingabitype
from its directory instead of targetingabitype
of our repo. Since importing stuff fromconnectors
inBurnerConnector.ts
the types forAddressTypes
there are0x{string}
.can this line be causing issue in wagmi ? https://github.com/wagmi-dev/wagmi/blob/b846be6b1a3c0a6c967dc22c3fde7d3acdbf0607/tsconfig.json#L27
For more description checkout scaffold-eth/scaffold-eth-2#96 (comment)
The text was updated successfully, but these errors were encountered: