Fix derive session.info with no staking

This commit is contained in:
Jaco Greeff
2021-01-13 23:59:59 +01:00
parent 9dc683d289
commit c632030437
+4 -1
View File
@@ -50,7 +50,10 @@ function queryBabe (api: ApiInterfaceRx): Observable<DeriveSessionInfo> {
[
true,
api.consts.babe.epochDuration,
api.consts.staking.sessionsPerEra
// we may have babe without staking (only epoch)
api.consts.staking
? api.consts.staking.sessionsPerEra
: api.registry.createType('SessionIndex')
],
indexes
])