Skip to content

Commit

Permalink
Merge pull request #117 from Developer-DAO/embiem/replace-default-pro…
Browse files Browse the repository at this point in the history
…vider-with-infura-only

Use InfuraProvider instead of defaultProvider
  • Loading branch information
willhblackburn authored Aug 22, 2022
2 parents acbd538 + e50bc37 commit 6711c59
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 6711c59

Please sign in to comment.