Commit a47828bf authored by isstuev's avatar isstuev

solidity scan report changes

parent 4afed289
...@@ -84,6 +84,10 @@ const SolidityscanReport = ({ className, hash }: Props) => { ...@@ -84,6 +84,10 @@ const SolidityscanReport = ({ className, hash }: Props) => {
const yetAnotherGrayColor = useColorModeValue('gray.400', 'gray.500'); const yetAnotherGrayColor = useColorModeValue('gray.400', 'gray.500');
const popoverBgColor = useColorModeValue('white', 'gray.900'); 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) { if (isError || !score) {
return null; return null;
} }
...@@ -91,13 +95,13 @@ const SolidityscanReport = ({ className, hash }: Props) => { ...@@ -91,13 +95,13 @@ const SolidityscanReport = ({ className, hash }: Props) => {
let scoreColor; let scoreColor;
let scoreLevel; let scoreLevel;
if (score >= 80) { if (score >= 80) {
scoreColor = 'green.600'; scoreColor = greatScoreColor;
scoreLevel = 'GREAT'; scoreLevel = 'GREAT';
} else if (score >= 30) { } else if (score >= 30) {
scoreColor = 'orange.600'; scoreColor = averageScoreColor;
scoreLevel = 'AVERAGE'; scoreLevel = 'AVERAGE';
} else { } else {
scoreColor = 'red.600'; scoreColor = lowScoreColor;
scoreLevel = 'LOW'; scoreLevel = 'LOW';
} }
...@@ -112,7 +116,6 @@ const SolidityscanReport = ({ className, hash }: Props) => { ...@@ -112,7 +116,6 @@ const SolidityscanReport = ({ className, hash }: Props) => {
<Button <Button
className={ className } className={ className }
color={ scoreColor } color={ scoreColor }
borderColor={ scoreColor }
size="sm" size="sm"
variant="outline" variant="outline"
colorScheme="gray" colorScheme="gray"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment