Skip to content

Commit

Permalink
fix infura rpc detection
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed Nov 18, 2022
1 parent 4c809a3 commit 44343ef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ const mapStateToProps = (state) => {
const providerChainId = provider?.chainId;
const isDeprecatedNetwork =
DEPRECATED_TEST_NET_CHAINIDS.includes(providerChainId);
const isInfuraRpcUrl = provider?.rpcUrl?.match('infura');
const isInfuraRpcUrl =
provider?.rpcUrl && new URL(provider.rpcUrl).host.endsWith('.infura.io');
const showDeprecatedRpcUrlWarning = isDeprecatedNetwork && isInfuraRpcUrl;

return {
Expand Down

0 comments on commit 44343ef

Please sign in to comment.