Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Check all validators
Browse files Browse the repository at this point in the history
gaquarius authored and atodorov committed Jan 10, 2024
1 parent 4e3c728 commit fa1bda9
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/contexts/Payouts/index.tsx
Original file line number Diff line number Diff line change
@@ -151,13 +151,16 @@ export const PayoutsProvider = ({
// Helper function to check which eras a validator was exposed in.
const validatorExposedEras = (validator: string) => {
const exposedEras: string[] = [];
for (const era of erasToCheck)
for (const era of erasToCheck) {
if (
Object.values(
Object.keys(getLocalEraExposure(network, era, activeAccount))
)?.[0] === validator
(
Object.values(
Object.keys(getLocalEraExposure(network, era, activeAccount))
) ?? []
).includes(validator)
)
exposedEras.push(era);
}
return exposedEras;
};

0 comments on commit fa1bda9

Please sign in to comment.