diff --git a/packages/app/src/library/Graphs/PayoutLine.tsx b/packages/app/src/library/Graphs/PayoutLine.tsx index 10e6ba35ee..67fe907618 100644 --- a/packages/app/src/library/Graphs/PayoutLine.tsx +++ b/packages/app/src/library/Graphs/PayoutLine.tsx @@ -141,7 +141,7 @@ export const PayoutLine = ({ datasets: [ { label: t('payout'), - data: combinedPayouts.map(({ reward }) => reward), + data: combinedPayouts.map(({ reward }: { reward: number }) => reward), borderColor: color, pointStyle: undefined, pointRadius: 0, diff --git a/packages/app/src/library/Graphs/Utils.ts b/packages/app/src/library/Graphs/Utils.ts index 51bf51ac32..fc3af39518 100644 --- a/packages/app/src/library/Graphs/Utils.ts +++ b/packages/app/src/library/Graphs/Utils.ts @@ -126,7 +126,7 @@ export const calculateDailyPayouts = ( // Calculate average payouts per day export const calculatePayoutAverages = ( - payouts: RewardResults, + payouts: AnyJson, fromDate: Date, days: number, avgDays: number @@ -162,7 +162,7 @@ export const calculatePayoutAverages = ( // If on last reward and is a zero (current era still processing), use previous reward to // prevent misleading dip const reward = - i === payouts.length - 1 && payouts[i].reward === '0' + i === payouts.length - 1 && payouts[i].reward === 0 ? payoutsAverages[i - 1].reward : total / num