How would you go about using viem as a peer dependency in an npm package? #570
salieflewis
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Currently I have this weird setup for Public Clients that allows the user to configure an environment variable to handle the transport.
However, for Wallet Clients, there is a top level await in the example code when the account is expected to be provided by a browser extension, so I created this
useWalletClient
hook to fetch that instance, but obviously it doesn't not run if the user is not connected, so it throws an error.Thoughts and guidance around these patterns?
Beta Was this translation helpful? Give feedback.
All reactions