Commit 067a31db authored by Igor Stuev's avatar Igor Stuev Committed by GitHub

Merge pull request #650 from blockscout/blick-tooltips

block gas usage tooltips
parents b0b127c0 0943d372
...@@ -63,8 +63,16 @@ const BlocksTableItem = ({ data, isPending, enableTimeIncrement }: Props) => { ...@@ -63,8 +63,16 @@ const BlocksTableItem = ({ data, isPending, enableTimeIncrement }: Props) => {
<Td fontSize="sm"> <Td fontSize="sm">
<Box>{ BigNumber(data.gas_used || 0).toFormat() }</Box> <Box>{ BigNumber(data.gas_used || 0).toFormat() }</Box>
<Flex mt={ 2 }> <Flex mt={ 2 }>
<Tooltip label="Gas Used %">
<Box>
<Utilization colorScheme="gray" value={ BigNumber(data.gas_used || 0).dividedBy(BigNumber(data.gas_limit)).toNumber() }/> <Utilization colorScheme="gray" value={ BigNumber(data.gas_used || 0).dividedBy(BigNumber(data.gas_limit)).toNumber() }/>
</Box>
</Tooltip>
<Tooltip label="% of Gas Target">
<Box>
<GasUsedToTargetRatio ml={ 2 } value={ data.gas_target_percentage || undefined }/> <GasUsedToTargetRatio ml={ 2 } value={ data.gas_target_percentage || undefined }/>
</Box>
</Tooltip>
</Flex> </Flex>
</Td> </Td>
<Td fontSize="sm">{ totalReward.toFixed(8) }</Td> <Td fontSize="sm">{ totalReward.toFixed(8) }</Td>
......
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