# Ideas to improve the Creditcoin-cli's 'distribute-rewards' command processor

**URL:** <https://community.creditcoin.org/t/ideas-to-improve-the-creditcoin-clis-distribute-rewards-command-processor/4930>\
**Category:** Suggestion\
**Created:** [July 7, 2023, 8:48am UTC](https://community.creditcoin.org/t/ideas-to-improve-the-creditcoin-clis-distribute-rewards-command-processor/4930 "2023-07-07T08:48:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![doebrmann](https://avatars.discourse-cdn.com/v4/letter/d/dbc845/32.png) [@doebrmann](https://community.creditcoin.org/u/doebrmann)\
**Post date:** [July 7, 2023, 8:48am UTC](https://community.creditcoin.org/t/ideas-to-improve-the-creditcoin-clis-distribute-rewards-command-processor/4930/1 "2023-07-07T08:48:30Z")

</div>

I know the payout(claiming staking rewards) action should be done within 84 era(or something).

If there is era time-limits,  
How about adding some validation logics following that check if an era option value is correct or not.

* * *

## if ( era \< 1 || era \> 84 ) { throw new Error( “Era value must be between 1 and 84” ); }

to the code ([creditcoin/scripts/cc-cli/src/commands/distributeRewards.ts at 91450dc31ca0d2c494835b24357dc111dd8ecd01 · gluwa/creditcoin · GitHub](https://github.com/gluwa/creditcoin/blob/91450dc31ca0d2c494835b24357dc111dd8ecd01/scripts/cc-cli/src/commands/distributeRewards.ts#L59))
