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

feat: use injected web3 rpc if available #16

Open
wants to merge 2 commits into
base: eternalsafe
Choose a base branch
from

Conversation

ManOfCode89
Copy link

@ManOfCode89 ManOfCode89 commented Aug 25, 2024

What it solves

Allows user to use injected web3 rpc
should use custom web3 rpc if provided

How to test it

Checklist

  • I've tested the branch on mobile 📱
  • I've written a unit/e2e test for it (if applicable) 🧑‍💻

Copy link

vercel bot commented Aug 25, 2024

@ManOfCode89 is attempting to deploy a commit to the Eternal Safe Team on Vercel.

A member of the Team first needs to authorize it.

@ManOfCode89 ManOfCode89 changed the title feat/use-injected-web3-rpc-if-available feat: use injected web3 rpc if available Aug 25, 2024
Copy link
Contributor

@devanoneth devanoneth left a comment

Choose a reason for hiding this comment

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

1 code change, but otherwise looks great! Thanks for this contribution! <3

if (wallet && wallet.chainId === chainId) {
const internalWeb3 = createWeb3(wallet.provider)
setWeb3(MulticallWrapper.wrap(internalWeb3, 50))
if (internalWeb3) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add dispatch(closeByGroupKey({ groupKey: RPC_URL_ERROR_KEY })) above this line please so that the "Your wallet seems to be connected to the wrong network" notification is automatically dismissed after the user does set their wallet to the right network? Thanks!

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.

2 participants