Skip to content

Commit 3db0efc

Browse files
committed
fix: chart and query numbers
1 parent cdcfa3a commit 3db0efc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

web/src/hooks/queries/useHomePageQuery.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const homePageQuery = graphql(`
1111
disputes(first: 3) {
1212
id
1313
}
14-
counters(first: 1000, where: { id_gt: $timeframe }) {
14+
counters(first: 366, where: { id_gt: $timeframe }) {
1515
id
1616
stakedPNK
1717
paidETH
@@ -24,7 +24,7 @@ const homePageQuery = graphql(`
2424
name
2525
numberDisputes
2626
feeForJuror
27-
stake
27+
effectiveStake
2828
}
2929
}
3030
`);

web/src/pages/Home/CourtOverview/Chart.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ const Chart: React.FC = () => {
8888

8989
const processedStakedPNKData = courtsChartData?.reduce(
9090
(accData: StakedPNKByCourtsChartData, current) => {
91-
if (BigInt(current.stake) > 0) {
91+
if (BigInt(current.effectiveStake) > 0) {
9292
return {
9393
labels: [...accData.labels, current.name ?? ""],
94-
stakes: [...accData.stakes, parseFloat(formatUnits(current.stake, 18))],
95-
totalStake: accData.totalStake + parseFloat(formatUnits(current.stake, 18)),
94+
stakes: [...accData.stakes, parseFloat(formatUnits(current.effectiveStake, 18))],
95+
totalStake: accData.totalStake + parseFloat(formatUnits(current.effectiveStake, 18)),
9696
};
9797
}
9898
return accData;

0 commit comments

Comments
 (0)