Skip to content

Commit

Permalink
Use InfuraProvider instead of defaultProvider
Browse files Browse the repository at this point in the history
  • Loading branch information
embiem committed Aug 22, 2022
1 parent 75b9acf commit e50bc37
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/next-app/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,9 @@ const provider = ({ chainId, connector }: GetProviderArgs) => {
infura: infuraId,
});
case "goerli":
return ethers.getDefaultProvider(chain.goerli.id, {
infura: infuraId,
});
return new ethers.providers.InfuraProvider(chain.goerli.id, infuraId);
case "mainnet":
return ethers.getDefaultProvider(chain.mainnet.id, {
infura: infuraId,
});
return new ethers.providers.InfuraProvider(chain.mainnet.id, infuraId);
default:
console.error("Unsupported chainName:", chainName);
break;
Expand Down

0 comments on commit e50bc37

Please sign in to comment.