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

Our injected Ethereum provider never gets the 'wallet_addEthereumChain' request #10

Open
bkbooth opened this issue Sep 1, 2022 · 0 comments · May be fixed by #11
Open

Our injected Ethereum provider never gets the 'wallet_addEthereumChain' request #10

bkbooth opened this issue Sep 1, 2022 · 0 comments · May be fixed by #11

Comments

@bkbooth
Copy link

bkbooth commented Sep 1, 2022

We're developing a multi-chain wallet which supports a number of EVM chains. When a user in your application switches which chain they're on, I'd expect to receive a wallet_addEthereumChain (or wallet_switchEthereumChain) request, but it doesn't happen for us. I've tested and confirmed that it works with MetaMask, our provider is mostly compatible with MetaMask's provider.

I noticed these lines:

const ethereumFN:any = {
request: '',
...ethereum
}

I suspect that's where it's falling down for us. Our provider is a JS class, so I think methods aren't being spread onto the new ethereumFN object correctly. Is there a reason the provider is spread onto a new object like this?

@bkbooth bkbooth linked a pull request Sep 2, 2022 that will close this 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

Successfully merging a pull request may close this issue.

1 participant