Skip to content

Commit

Permalink
other fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Leouarz committed Nov 12, 2024
1 parent ea883f4 commit 4f492ab
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions packages/page-staking/src/Payouts/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,14 @@ function groupByValidator (allRewards: Record<string, DeriveStakerReward[]>): Pa
});
}

entry.available = entry.available.add(value);
if (!reward.isClaimed) {
entry.available = entry.available.add(value);
}

entry.total = entry.total.add(total);
} else {
grouped.push({
available: value,
available: !reward.isClaimed ? value : new BN(0),
eras: [{
era: reward.era,
isClaimed: reward.isClaimed,
Expand Down Expand Up @@ -241,7 +244,7 @@ function Payouts ({ className = '', historyDepth, isInElection, ownPools, ownVal
<PayButton
isAll
isDisabled={isInElection}
payout={validators}
payout={validators?.filter((x) => x.eras.some((y) => !y.isClaimed))}
/>
</Button.Group>
<ElectionBanner isInElection={isInElection} />
Expand Down

0 comments on commit 4f492ab

Please sign in to comment.