Skip to content

Commit

Permalink
fix: incorrect daily transactio value
Browse files Browse the repository at this point in the history
  • Loading branch information
aashaykapoor-bimaplan committed Sep 26, 2024
1 parent 93fb9e8 commit 94bccf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const DailyTransaction = (blocks: DailyTransactionProps) => {
const chartData = blocks.blocks?.reduce(
(acc: { [key: string]: number }, block: any) => {
const time = dayjs(Number(block.time)).format('HH:mm');
const value = +block.value / 3600;

const value = +block.value;
acc[time] = (acc[time] || 0) + value;
return acc;
},
Expand Down Expand Up @@ -96,7 +95,6 @@ const DailyTransaction = (blocks: DailyTransactionProps) => {
dataKey="time"
tick={{
fontSize: 10,

className: 'fill-heading',
}}
/>
Expand Down
3 changes: 1 addition & 2 deletions packages/app-explorer/src/systems/Home/components/TPS.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export const TPS = (props: TPSProps) => {
: [];

const averageTPS =
blocks.reduce((sum: any, block: any) => sum + Number(block.value), 0) /
blocks.length;
blocks.reduce((sum: any, block: any) => sum + Number(block.value), 0) / 24;

const highestValue = Math.max(
...chartDataArray.map((data: any) => Number(data.value)),
Expand Down

0 comments on commit 94bccf1

Please sign in to comment.