diff --git a/ui/address/SolidityscanReport.tsx b/ui/address/SolidityscanReport.tsx
index 5cdb32e30a..f5596b8016 100644
--- a/ui/address/SolidityscanReport.tsx
+++ b/ui/address/SolidityscanReport.tsx
@@ -45,6 +45,30 @@ interface Props {
hash: string;
}
+type ItemProps = {
+ item: DistributionItem;
+ vulnerabilities: SolidityscanReport['scan_report']['scan_summary']['issue_severity_distribution'];
+ vulnerabilitiesCount: number;
+}
+
+const SolidityScanReportItem = ({ item, vulnerabilities, vulnerabilitiesCount }: ItemProps) => {
+ const bgBar = useColorModeValue('blackAlpha.50', 'whiteAlpha.50');
+ const yetAnotherGrayColor = useColorModeValue('gray.400', 'gray.500');
+
+ return (
+ <>
+
+
+ { item.name }
+ 0 ? 'text' : yetAnotherGrayColor }>{ vulnerabilities[item.id] }
+
+
+
+
+ >
+ );
+};
+
const SolidityscanReport = ({ className, hash }: Props) => {
const { isOpen, onToggle, onClose } = useDisclosure();
@@ -58,7 +82,6 @@ const SolidityscanReport = ({ className, hash }: Props) => {
const score = Number(data?.scan_report.scan_summary.score_v2);
- const bgBar = useColorModeValue('blackAlpha.50', 'whiteAlpha.50');
const chartGrayColor = useColorModeValue('gray.100', 'gray.700');
const yetAnotherGrayColor = useColorModeValue('gray.400', 'gray.500');
const popoverBgColor = useColorModeValue('white', 'gray.900');
@@ -136,16 +159,7 @@ const SolidityscanReport = ({ className, hash }: Props) => {
Vulnerabilities distribution
{ DISTRIBUTION_ITEMS.map(item => (
- <>
-
-
- { item.name }
- 0 ? 'text' : yetAnotherGrayColor }>{ vulnerabilities[item.id] }
-
-
-
-
- >
+
)) }
diff --git a/ui/pages/Address.tsx b/ui/pages/Address.tsx
index eb4b95dc36..d7f869a0e1 100644
--- a/ui/pages/Address.tsx
+++ b/ui/pages/Address.tsx
@@ -189,7 +189,7 @@ const AddressPageContent = () => {
- { addressQuery.data?.is_contract && config.UI.views.address.solidityscanEnabled && }
+ { addressQuery.data?.is_contract && addressQuery.data?.is_verified && config.UI.views.address.solidityscanEnabled && }
);