Skip to content

Conversation

@lnbc1QWFyb24
Copy link
Contributor

Description

The MEW provider does not support the wallet_addEthereumChain and wallet_switchEthereumChain, so this PR sets those fields to null when creating the provider, which will throw an unsupported error when called.

Fixes #1044

Checklist

  • The version field in package.json is incremented following semantic versioning
  • The box that allows repo maintainers to update this PR is checked
  • I tested locally to make sure this feature/fix works
  • This PR passes the Circle CI checks

Copy link
Contributor

@taylorjdawson taylorjdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aaronbarnardsound I think we should re-init mew on chain switch (if possible) rather than just not supporting the operation

@lnbc1QWFyb24
Copy link
Contributor Author

@taylorjdawson I believe that MEW only supports mainnet - https://myetherwallet.github.io/MEWconnect-Protocol-Documentation/mewconnect_provider.html#methods
Check the chainId parameter.

@lnbc1QWFyb24 lnbc1QWFyb24 merged commit 8d32be4 into v2-web3-onboard-develop Jun 30, 2022
@lnbc1QWFyb24 lnbc1QWFyb24 deleted the fix/mew-set-chain branch June 30, 2022 00:07
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 this pull request may close these issues.

[Bug]: MEW module cannot change network on desktop and cannot connect on mobile

4 participants