Replies: 5 comments
-
I'd like t bump it to see if there's anyone that encountered this error, or if a workaround can be found. I feel that the two |
Beta Was this translation helpful? Give feedback.
-
Why has this not been answered? |
Beta Was this translation helpful? Give feedback.
-
Hope it helps. |
Beta Was this translation helpful? Give feedback.
-
unfortunately the problem is at TypeScript level, where two objects diff for that optional |
Beta Was this translation helpful? Give feedback.
-
Yeah, I ended up having to scrap the whole using walletClient for getContract. |
Beta Was this translation helpful? Give feedback.
-
I'm creating an SDK plugin that has hooks accepting a
WalletClient
object to be used withviem
library methods.The plugin is intended to be used in react applications using
wagmi
, similarly toSince
wagmi
andviem
are very interconnected I was expect that theviem
WalletClient object to be the same aswagmi
WalletClient object. Instead I noticed that they're different, causing an error when using the hook.Specifically, the value
account
inwagmi
is always of typeAccount
, while inviem
isAccount | undefined
. Is this intended or should be reported as a bug? And if it's intended, why it's different with the same name? Any suggestion on how to correctly use it?My idea is to import types of
wagm
in my SDK plugin ad mention that I want to accept awagmi
WalletClient
object, still not sure if this will bring other incompatibility. My suggestion would be to keep the same types betweenwagmi
andviem
.Beta Was this translation helpful? Give feedback.
All reactions