diff --git a/src/controllers/accounts/AccountsStakingPayoutsController.ts b/src/controllers/accounts/AccountsStakingPayoutsController.ts index 8d231750a..c6308820d 100644 --- a/src/controllers/accounts/AccountsStakingPayoutsController.ts +++ b/src/controllers/accounts/AccountsStakingPayoutsController.ts @@ -121,7 +121,7 @@ export default class AccountsStakingPayoutsController extends AbstractController private async getEraAndHash(apiAt: ApiDecoration<'promise'>, era?: number) { let currentEra: number; - const currentEraMaybeOption = (await apiAt.query.session.currentIndex()) as u32 & Option; + const currentEraMaybeOption = (await apiAt.query.staking.currentEra()) as u32 & Option; if (currentEraMaybeOption instanceof Option) { if (currentEraMaybeOption.isNone) { throw new InternalServerError('CurrentEra is None when Some was expected');