Skip to content

Commit

Permalink
fix: wrong epoch number in patron history item
Browse files Browse the repository at this point in the history
  • Loading branch information
aziolek committed Feb 26, 2024
1 parent 720ba89 commit 62cc54c
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,10 @@ const EarnHistoryItem: FC<EarnHistoryItemProps> = ({ isLast, ...rest }) => {
const title = useMemo(() => {
switch (type) {
case 'patron_mode_donation':
return t('epochDonation', { epoch: epochTimestampHappenedIn });
// Donation happened in epoch N, but affects epoch N - 1.
return t('epochDonation', {
epoch: epochTimestampHappenedIn ? epochTimestampHappenedIn - 1 : '',
});
case 'allocation':
return isPersonalOnlyAllocation
? i18n.t('common.personalAllocation')
Expand Down

0 comments on commit 62cc54c

Please sign in to comment.