Skip to content
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

useWallet() sometimes return null account value in it's object #232

Open
softwaredev927 opened this issue Sep 12, 2022 · 1 comment
Open

Comments

@softwaredev927
Copy link

Code which I implemented to my react app for getting metamask info

<UseWalletProvider
                    chainId={NETWORK === 'mainnet' ? 1 : 4}
                    connectors={{
                    ...
</UseWalletProvider>
...

const wallet = useWallet()

wallet sometimes returns null account value in it's object like below.

account: null
balance: "-1"
chainId: 4
connect: ƒ (t)
connector: "injected"
connectors: {fortmatic: Array(2), frame: Array(2), injected: Array(2), portis: Array(2), provided: Array(2), …}
error: null
ethereum: undefined
getBlockNumber: ƒ ()
networkName: "Rinkeby"
reset: ƒ ()
status: "connected"
type: null
...

With above issue, it's working fine when I refresh browser. Please let me know what should I do to solve this kinda issue.

@kingcozz
Copy link

kingcozz commented Oct 3, 2022

having same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants