Skip to content

Commit

Permalink
L1-63: Fix paid out rewards eras order
Browse files Browse the repository at this point in the history
  • Loading branch information
youPickItUp committed Oct 23, 2024
1 parent e9de768 commit 54ddf6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/page-staking/src/useSortedTargets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const OPT_MULTI = {
function getLegacyRewards (ledger: PalletStakingStakingLedger, claimedRewardsEras: Vec<u32>): u32[] {
const legacyRewards = ledger.legacyClaimedRewards || (ledger as unknown as OldLedger).claimedRewards || [];

return legacyRewards.concat(claimedRewardsEras.toArray());
return legacyRewards.concat(claimedRewardsEras.toArray().reverse());
}

function mapIndex (mapBy: TargetSortBy): (info: ValidatorInfo, index: number) => ValidatorInfo {
Expand Down

0 comments on commit 54ddf6a

Please sign in to comment.