Skip to content
Unverified Commit 73b9a839 authored by Ankan's avatar Ankan Committed by GitHub
Browse files

[Staking] Runtime api if era rewards are pending to be claimed (#4301)

closes https://github.com/paritytech/polkadot-sdk/issues/426.
related to https://github.com/paritytech/polkadot-sdk/pull/1189.

Would help offchain programs to query if there are unclaimed pages of
rewards for a given era.

The logic could look like below

```js
// loop as long as all era pages are claimed.
while (api.call.stakingApi.pendingRewards(era, validator_stash)) {
  api.tx.staking.payout_stakers(validator_stash, era)
}
```
parent 2a497d29
Pipeline #470382 passed with warnings with stages
in 1 hour, 14 minutes, and 24 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment