useWallet() returns no wallet when metamask is connected to ropsten
See original GitHub issueAs title suggests, no account address as the wallet is returned from useWallet() when connected to Ropsten using Metamask.
const { wallet } = useWallet()
console.log(wallet) // > null
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (3 by maintainers)
Top Results From Across the Web
useWallet() sometimes return null account value in it's object
MetaMask hides wallet addresses by default to preserve privacy. If you're using MM, you should use @web3-react/metamask .
Read more >Ethereum Provider API - MetaMask Docs
Returns true if the provider is connected to the current chain, and false otherwise. If the provider is not connected, the page will...
Read more >API Documentation - Binance Wallet - GitBook
The biggest difference between Binance Chain Wallet and MetaMask is we inject ... const { account, connect, reset, status } = useWallet(). return...
Read more >@web3-onboard/react - npm
useConnectWallet. This hook allows you to connect the user's wallet and track the state of the connection status and the wallet that is...
Read more >Chapter 2: Ethereum Basics · GitBook
It is easy to use and convenient for testing, as it is able to connect to a variety of Ethereum nodes and test...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Haha, yeah that’s right. Thanks for troubleshooting with me
Hey @garythung
The
useWallethook provides an error parameter. You can use that error to detect whether a user is on the wrong network by typechecking the error. Something like this: