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

provider.chainId is invalid hex number #1274

Closed
Velenir opened this issue Jan 13, 2020 · 2 comments · Fixed by #1275
Closed

provider.chainId is invalid hex number #1274

Velenir opened this issue Jan 13, 2020 · 2 comments · Fixed by #1275

Comments

@Velenir
Copy link

Velenir commented Jan 13, 2020

chainId property on provider | window.web3 | window.ethereum returns an incorrect non-hex string, at least on Android 7.

For example "Ox1" for mainnet instead of "0x1", that's letter "O" in there. Provider injected by desktop browser extension has correct chainId

@estebanmino
Copy link
Contributor

Hi @Velenir thanks for reporting.

@jishankai
Copy link

Hi. I'm a dapp developer. I got undefined when I was trying to get chainId by using window.web3.currentProvider.chainId or window.ethereum.chainId on MetaMask Mobile. It works well on Chrome.

How could I fix this?

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

Successfully merging a pull request may close this issue.

3 participants