Skip to content

Commit

Permalink
[Fix] Max count = 1
Browse files Browse the repository at this point in the history
  • Loading branch information
tunghp2002 committed Jan 3, 2025
1 parent 26b38f0 commit aac84f7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/extension-koni-ui/src/utils/earning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export function autoSelectValidatorOptimally (validators: ValidatorInfo[], maxCo
if (result.length >= maxCount) {
shuffle<ValidatorInfo>(result);

return result.slice(0, maxCount - 1);
return result.slice(0, maxCount === 1 ? maxCount : maxCount - 1);
}

shuffle<ValidatorInfo>(notPreSelected);
Expand Down

0 comments on commit aac84f7

Please sign in to comment.