How to use the @ethersproject/providers.FallbackProvider function in @ethersproject/providers

To help you get started, we’ve selected a few @ethersproject/providers examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Mrtenz / FindETH / src / components / Main / Main.tsx View on Github external
const initialize = () => {
    const provider =
      window.web3 && window.web3.currentProvider
        ? new Web3Provider(window.web3.currentProvider)
        : new FallbackProvider([
            new JsonRpcProvider('https://api.mycryptoapi.com/eth'),
            new InfuraProvider(),
            new EtherscanProvider()
          ]);

    handleConnect(provider);
  };

@ethersproject/providers

Ethereum Providers for ethers.

MIT
Latest version published 2 years ago

Package Health Score

59 / 100
Full package analysis