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

Use @metamask/eth-query instead of Ethers #58

Open
mcmire opened this issue Nov 22, 2023 · 0 comments
Open

Use @metamask/eth-query instead of Ethers #58

mcmire opened this issue Nov 22, 2023 · 0 comments

Comments

@mcmire
Copy link
Contributor

mcmire commented Nov 22, 2023

It seems that the recent change to switch from ethjs-query to Ethers (#39) has caused a regression: when the network is switched, this.web3 still points to the previous network. This happens because Web3Provider saves a copy of the sendAsync method on the given provider, so even if nonce-tracker is given a provider proxy, this.web3 still has a reference to the sendAsync method from the previous provider object. (This was reported in Slack — see the shared libraries channel.)

This is a common problem with Ethers. Although Ethers has some nice features, we probably don't need to pull it in here, and we can use @metamask/eth-query (which provides TypeScript support, unlike @metamask/ethjs-query) instead.

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

No branches or pull requests

1 participant