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

Add chain to the Metamask if it does not exist #69

Merged
merged 3 commits into from
Oct 10, 2023

Conversation

OjusWiZard
Copy link
Contributor

Fixes #51

  • Modified the addEthereumChain function to await while sending the wallet_switchEthereumChain message to the Web3Provider. It was not awaiting the promise earlier, so the error was not caught if the network was absent. Now, the whole try-catch flow works as expected.
  • Also, updated the chain details to clear the metamask warnings.

Metamask warning

Screencast.from.2023-10-07.23-49-00.webm

Copy link
Member

@MantisClone MantisClone left a comment

Choose a reason for hiding this comment

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

Nice one! Thank you for your contribution!

@MantisClone MantisClone merged commit 56d6df2 into RequestNetwork:master Oct 10, 2023
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.

Request Create error when xdai hasn't been added to Metamask
2 participants