Maintaining a Web3 Provider singleton #1188
Unanswered
ac-cb
asked this question in
Developer Support
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi! Have a question about using the WC client/provider in React. We're wondering whether it is important to maintain the same Web3 instance during the lifetime of the user's session.
For simplicity's sake, we're setting up / tearing down the WC provider in various places with hooks + context.
Will there be unexpected behavior if we do not maintain a Web3Provider singleton?
Looking inside here:
https://github.com/WalletConnect/walletconnect-monorepo/blob/v1.0/packages/providers/web3-provider/src/index.ts#L214
It seems that perhaps we do want to maintain a single connection / singleton.
Am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions