Skip to content

Commit

Permalink
finished ASM2
Browse files Browse the repository at this point in the history
  • Loading branch information
Levironexe committed Oct 29, 2024
1 parent 2ac07b5 commit 360f08b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/section/contract-scan-result-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const calculateSafetyScore = (metrics: AnalysisMetrics): number => {
const totalDeduction =
(metrics.high_issues * deductions.high) +
(metrics.medium_issues * deductions.medium) +
(metrics.low_issues * deductions.low);
(metrics.low_issues * deductions.low) +
(metrics.informational_issues * deductions.informational) +
(metrics.optimization_issues * deductions.optimization);

Expand Down
3 changes: 2 additions & 1 deletion components/section/vulnerability.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ interface VulnerabilityProps {
}

const Vulnerability: React.FC<VulnerabilityProps> = ({ vulnList }) => {
const [openIndex, setOpenIndex] = useState<number | null>(null)

if (!vulnList) {
return <div>No vulnerabilities found</div>;
}

const [openIndex, setOpenIndex] = useState<number | null>(null)
const toggleQuestion = (index: number) => {
setOpenIndex(openIndex === index ? null : index)
}
Expand Down

0 comments on commit 360f08b

Please sign in to comment.