Skip to content

Commit

Permalink
Merge pull request #1468 from blockscout/fe-1462
Browse files Browse the repository at this point in the history
solidity scan report changes
  • Loading branch information
tom2drum authored Jan 5, 2024
2 parents 92073ca + a47828b commit 55cb598
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ui/address/SolidityscanReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,24 @@ const SolidityscanReport = ({ className, hash }: Props) => {
const yetAnotherGrayColor = useColorModeValue('gray.400', 'gray.500');
const popoverBgColor = useColorModeValue('white', 'gray.900');

const greatScoreColor = useColorModeValue('green.600', 'green.400');
const averageScoreColor = useColorModeValue('purple.600', 'purple.400');
const lowScoreColor = useColorModeValue('red.600', 'red.400');

if (isError || !score) {
return null;
}

let scoreColor;
let scoreLevel;
if (score >= 80) {
scoreColor = 'green.600';
scoreColor = greatScoreColor;
scoreLevel = 'GREAT';
} else if (score >= 30) {
scoreColor = 'orange.600';
scoreColor = averageScoreColor;
scoreLevel = 'AVERAGE';
} else {
scoreColor = 'red.600';
scoreColor = lowScoreColor;
scoreLevel = 'LOW';
}

Expand All @@ -112,7 +116,6 @@ const SolidityscanReport = ({ className, hash }: Props) => {
<Button
className={ className }
color={ scoreColor }
borderColor={ scoreColor }
size="sm"
variant="outline"
colorScheme="gray"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 55cb598

Please sign in to comment.