From 3b36759dad71ea08d6982206be42cc9b673ba597 Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Wed, 14 Aug 2024 10:44:33 -0400 Subject: [PATCH] updating based in comments in #23806 --- .../rpc-method-middleware/handlers/ethereum-chain-utils.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.ts b/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.ts index bcaa49b0410f..916b1524d56f 100644 --- a/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.ts +++ b/app/scripts/lib/rpc-method-middleware/handlers/ethereum-chain-utils.ts @@ -153,12 +153,13 @@ export function validateAddEthereumChainParams( }; const firstValidRPCUrl = rpcUrls.find( - (rpcUrl) => typeof rpcUrl === 'string' && isLocalhostOrHttps(rpcUrl), + (rpcUrl): rpcUrl is string => + typeof rpcUrl === 'string' && isLocalhostOrHttps(rpcUrl), ); const firstValidBlockExplorerUrl = blockExplorerUrls !== null && Array.isArray(blockExplorerUrls) ? blockExplorerUrls.find( - (blockExplorerUrl) => + (blockExplorerUrl): blockExplorerUrl is string => typeof blockExplorerUrl === 'string' && isLocalhostOrHttps(blockExplorerUrl), )