align aura/babe without staking

This commit is contained in:
Jaco Greeff
2021-01-14 00:03:28 +01:00
parent b2cf9aed83
commit e46fd07d39
+2 -3
View File
@@ -35,6 +35,7 @@ function queryAura (api: ApiInterfaceRx): Observable<DeriveSessionInfo> {
[
false,
api.registry.createType('u64', 1),
// we may have aura without staking (permissioned)
api.consts.staking?.sessionsPerEra || api.registry.createType('SessionIndex', 1)
],
indexes
@@ -51,9 +52,7 @@ function queryBabe (api: ApiInterfaceRx): Observable<DeriveSessionInfo> {
true,
api.consts.babe.epochDuration,
// we may have babe without staking (permissioned)
api.consts.staking
? api.consts.staking.sessionsPerEra
: api.registry.createType('SessionIndex')
api.consts.staking?.sessionsPerEra || api.registry.createType('SessionIndex', 1)
],
indexes
])