Skip to content

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

@mcmire

Description

@mcmire

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions