Skip to content

Commit

Permalink
Fix redundant
Browse files Browse the repository at this point in the history
  • Loading branch information
kryzasada committed Nov 13, 2024
1 parent 651b9f8 commit d86ffc4
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/contexts/Staking/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,9 +355,8 @@ export const StakingProvider = ({
);

const result: Exposure[] = [];
let i = 0;
for (const pagedResult of pagedResults) {
const validator = validatorKeys[i];
pagedResults.forEach((pagedResult, index) => {
const validator = validatorKeys[index];
const { own, total } = validators[validator];
const others = pagedResult.reduce(
(prev: ExposureOther[], [, v]: AnyApi) => {
Expand All @@ -381,8 +380,7 @@ export const StakingProvider = ({
})),
},
});
i++;
}
});
return result;
};

Expand Down

0 comments on commit d86ffc4

Please sign in to comment.