fix infura rpc detection (#16585)

feature/default_network_editable
legobeat 2 years ago committed by GitHub
parent 82dc628fa3
commit 0e573e1e24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      ui/components/app/loading-network-screen/loading-network-screen.container.js

@ -19,7 +19,8 @@ const mapStateToProps = (state) => {
const providerChainId = provider?.chainId; const providerChainId = provider?.chainId;
const isDeprecatedNetwork = const isDeprecatedNetwork =
DEPRECATED_TEST_NET_CHAINIDS.includes(providerChainId); 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; const showDeprecatedRpcUrlWarning = isDeprecatedNetwork && isInfuraRpcUrl;
return { return {

Loading…
Cancel
Save