From ba442eaadb13771cdab68d220f31d4f7fd01e897 Mon Sep 17 00:00:00 2001 From: ligi Date: Mon, 5 Dec 2022 02:00:49 +0100 Subject: [PATCH] Do not shadow chainId --- processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt b/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt index dc91087d..8d16e129 100644 --- a/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt +++ b/processor/src/main/kotlin/org/ethereum/lists/chains/Main.kt @@ -446,9 +446,9 @@ fun checkChain(chainFile: File, connectRPC: Boolean, verbose: Boolean = false) { } catch (e: Exception) { } - chainId?.let { chainId -> - if (chainIdAsLong != chainId.toLong()) { - error("RPC chainId (${chainId.toLong()}) does not match chainId from json ($chainIdAsLong)") + chainId?.let { nonNullChainId -> + if (chainIdAsLong != nonNullChainId.toLong()) { + error("RPC chainId (${nonNullChainId.toLong()}) does not match chainId from json ($chainIdAsLong)") } } }