Info changes for no staking (but with babe)

This commit is contained in:
Jaco Greeff
2021-01-14 00:01:42 +01:00
parent c632030437
commit b2cf9aed83
2 changed files with 2 additions and 1 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ function queryBabe (api: ApiInterfaceRx): Observable<DeriveSessionInfo> {
[
true,
api.consts.babe.epochDuration,
// we may have babe without staking (only epoch)
// we may have babe without staking (permissioned)
api.consts.staking
? api.consts.staking.sessionsPerEra
: api.registry.createType('SessionIndex')
@@ -43,6 +43,7 @@ function queryBabe (api: ApiInterfaceRx): Observable<[DeriveSessionInfo, ResultS
switchMap((info): Observable<[DeriveSessionInfo, ResultSlots | ResultSlotsNoSession]> =>
combineLatest([
of(info),
// we may have no staking, but have babe (permissioned)
api.query.staking
? api.queryMulti<ResultSlots>([
api.query.babe.currentSlot,