From 955e8ccbccac65a538cdd7c7769a413ae78fc5f8 Mon Sep 17 00:00:00 2001 From: Keith Date: Wed, 12 Apr 2023 10:41:52 +0800 Subject: [PATCH] fix: filter metadata files out of source code This commit fixes the source code list by filtering files those not ending with .sol, so only solidity files will be displayed --- components/ContractInfo/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/ContractInfo/index.tsx b/components/ContractInfo/index.tsx index b4f1bdd1..cd40c27b 100644 --- a/components/ContractInfo/index.tsx +++ b/components/ContractInfo/index.tsx @@ -216,7 +216,10 @@ const ContractInfo: React.FC<{ address: string; contract: PolyjuiceContractProps {contract_source_code ? ( <> {Array.isArray(sourcify_metadata) ? ( - sourcify_metadata.slice(1).map(code => { + sourcify_metadata.map(code => { + if (!code.name.endsWith('.sol')) { + return null + } return (