parent
13f7f1814f
commit
26b70cdf9f
@ -28,7 +28,8 @@ function createExtrinsic (api: ApiPromise, payout: PayoutValidator | PayoutValid
|
||||
payout.reduce((calls: SubmittableExtrinsic<'promise'>[], { eras, validatorId }): SubmittableExtrinsic<'promise'>[] =>
|
||||
calls.concat(
|
||||
...eras.map(({ era }) => api.tx.staking.payoutStakers(validatorId, era))
|
||||
), [])
|
||||
), []
|
||||
).filter((_, index) => index < 40)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@ -20,7 +20,7 @@ function getRewards ([[stashIds], available]: [[string[]], DeriveStakerReward[][
|
||||
const allRewards: Record<string, DeriveStakerReward[]> = {};
|
||||
|
||||
stashIds.forEach((stashId, index): void => {
|
||||
allRewards[stashId] = available[index];
|
||||
allRewards[stashId] = available[index].filter(({ eraReward }) => !eraReward.isZero());
|
||||
});
|
||||
|
||||
return {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user