Skip to content

Commit

Permalink
update nit
Browse files Browse the repository at this point in the history
  • Loading branch information
TarikGul committed Feb 13, 2024
1 parent 2aa515d commit c68c221
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<u32>;
const currentEraMaybeOption = (await apiAt.query.staking.currentEra()) as u32 & Option<u32>;
if (currentEraMaybeOption instanceof Option) {
if (currentEraMaybeOption.isNone) {
throw new InternalServerError('CurrentEra is None when Some was expected');
Expand Down

0 comments on commit c68c221

Please sign in to comment.