mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
fix infura rpc detection (#16585)
This commit is contained in:
parent
82dc628fa3
commit
0e573e1e24
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user