From c68c221b6611743de3439c048524157c990d896a Mon Sep 17 00:00:00 2001 From: tarikgul Date: Tue, 13 Feb 2024 10:51:20 -0500 Subject: [PATCH] update nit --- src/controllers/accounts/AccountsStakingPayoutsController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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');