Skip to content

Commit

Permalink
Revert "Calculate total smeshing rewards"
Browse files Browse the repository at this point in the history
This reverts commit 2d69ea8.
  • Loading branch information
kacpersaw committed Nov 9, 2023
1 parent 2d69ea8 commit 2005026
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/Home/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const Home = () => {
const accounts = data && data.accounts[data.accounts.length - 1];
const accountsChartData = data && data.accounts;

const smeshingReward = data && data.rewards.reduce((accumulator, currentVal) => accumulator + currentVal.amt, 0);
const smeshingReward = data && data.rewards[data.rewards.length - 1];
const smeshingRewardChartData = data && data.rewards;

const circulation = data && data.circulation.reduce((accumulator, currentVal) => accumulator + currentVal.amt, 0);
Expand Down Expand Up @@ -186,7 +186,7 @@ const Home = () => {
title="Smeshing Rewards"
url={`${deployConfig.explorerUrl}rewards`}
showValue
value={smeshingReward && formatSmidge(smeshingReward)}
value={smeshingReward && formatSmidge(smeshingReward.amt)}
toolTipMess="The total amount of coins awarded to smeshers since genesis. The graph displays the total rewards amount awarded to smeshers at the end of previous epochs. Smeshers are rewarded for submitting blocks with transactions to the network, for participating in the Spacemesh consensus protocol and for publishing proof of space time proofs."
>
<BarChartCustom data={data && smeshingRewardChartData} dataMeasure="" tooltipFilter={formatSmidge} />
Expand Down

0 comments on commit 2005026

Please sign in to comment.