-
Notifications
You must be signed in to change notification settings - Fork 975
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
WalletContextState is not getting updated, so cannot get any value like publicKey or connected #73
Comments
This has been resolved by wrapping the app with context. |
Yeah, you need to wrap the app -- or more specifically, any component subtree you expect to call the |
Thanks for the questions and answers. I was briefly stuck on this. |
can somebody give me an example on how should I wrap my component with context? |
@justinbalaguer See https://github.com/solana-labs/wallet-adapter/blob/master/packages/starter/example/components/ContextProvider.tsx In the example Next.js app, this is used to wrap the entire app: https://github.com/solana-labs/wallet-adapter/blob/master/packages/starter/example/pages/_app.tsx |
I successfully connect to the wallet:
Code is below, but publicKey is not getting updated after I am connected so
useEffects
is not triggered aka I am not getting anything fromuseWallet
:The text was updated successfully, but these errors were encountered: