@@ -10,7 +10,7 @@ import Tooltip from "@/components/ui/Tooltip.vue"
1010import AmountInCurrency from " @/components/AmountInCurrency.vue"
1111
1212/** Services */
13- import { formatBytes , comma , shareOfTotalString } from " @/services/utils"
13+ import { formatBytes , comma , truncateDecimalPart } from " @/services/utils"
1414
1515/** API */
1616import { fetchRollups , fetchRollupsCount } from " @/services/api/rollup"
@@ -70,18 +70,6 @@ const isRefetching = ref(false)
7070const rollups = ref ([])
7171const count = ref (0 )
7272
73- const totalSize = computed (() =>
74- rollups .value .reduce ((acc , rollup ) => {
75- return acc + rollup .size
76- }, 0 ),
77- )
78-
79- const totalFee = computed (() =>
80- rollups .value .reduce ((acc , rollup ) => {
81- return acc + + rollup .fee
82- }, 0 ),
83- )
84-
8573const utiaPerMB = (rollup ) => {
8674 let totalRollupMB = rollup .size / (1024 * 1024 )
8775
@@ -304,18 +292,14 @@ const handleNext = () => {
304292 <Flex direction =" column" gap =" 4" >
305293 <Text size =" 13" weight =" 600" color =" primary" >{{ formatBytes(r.size) }}</Text >
306294
307- <Text size =" 12" weight =" 600" color =" tertiary"
308- >{{ shareOfTotalString(r.size, totalSize) }}%</Text
309- >
295+ <Text size =" 12" weight =" 600" color =" tertiary" >{{ truncateDecimalPart(r.size_pct * 100, 2) }}%</Text >
310296 </Flex >
311297
312298 <template #content >
313299 <Flex align =" end" gap =" 8" >
314300 <Text size =" 12" weight =" 600" color =" tertiary" >Share of total size</Text >
315301
316- <Text size =" 12" weight =" 600" color =" primary"
317- >{{ shareOfTotalString(r.size, totalSize) }}%</Text
318- >
302+ <Text size =" 12" weight =" 600" color =" primary" >{{ truncateDecimalPart(r.size_pct * 100, 2) }}%</Text >
319303 </Flex >
320304 </template >
321305 </Tooltip >
@@ -324,8 +308,22 @@ const handleNext = () => {
324308 </td >
325309 <td >
326310 <NuxtLink :to =" `/rollup/${r.slug}`" >
327- <Flex align =" center" >
328- <Text size =" 13" weight =" 600" color =" primary" >{{ comma(r.blobs_count) }}</Text >
311+ <Flex align =" start" justify =" center" direction =" column" gap =" 4" >
312+ <Tooltip position =" start" delay =" 400" >
313+ <Flex direction =" column" gap =" 4" >
314+ <Text size =" 13" weight =" 600" color =" primary" >{{ comma(r.blobs_count) }}</Text >
315+
316+ <Text size =" 12" weight =" 600" color =" tertiary" >{{ truncateDecimalPart(r.blobs_count_pct * 100, 2) }}%</Text >
317+ </Flex >
318+
319+ <template #content >
320+ <Flex align =" end" gap =" 8" >
321+ <Text size =" 12" weight =" 600" color =" tertiary" >Share of total blobs count</Text >
322+
323+ <Text size =" 12" weight =" 600" color =" primary" >{{ truncateDecimalPart(r.blobs_count_pct * 100, 2) }}%</Text >
324+ </Flex >
325+ </template >
326+ </Tooltip >
329327 </Flex >
330328 </NuxtLink >
331329 </td >
@@ -335,17 +333,13 @@ const handleNext = () => {
335333 <AmountInCurrency :amount =" { value: r.fee }" />
336334
337335 <Tooltip position =" start" delay =" 400" >
338- <Text size =" 12" weight =" 600" color =" tertiary"
339- >{{ shareOfTotalString(r.fee, totalFee) }}%</Text
340- >
336+ <Text size =" 12" weight =" 600" color =" tertiary" >{{ truncateDecimalPart(r.fee_pct * 100, 2) }}%</Text >
341337
342338 <template #content >
343339 <Flex align =" end" gap =" 8" >
344- <Text size =" 12" weight =" 600" color =" tertiary" >Share of total fee</Text >
340+ <Text size =" 12" weight =" 600" color =" tertiary" >Share of total fee paid </Text >
345341
346- <Text size =" 12" weight =" 600" color =" primary"
347- >{{ shareOfTotalString(r.fee, totalFee) }}%</Text
348- >
342+ <Text size =" 12" weight =" 600" color =" primary" >{{ truncateDecimalPart(r.fee_pct * 100, 2) }}%</Text >
349343 </Flex >
350344 </template >
351345 </Tooltip >
0 commit comments