Info changes for no staking (but with babe)
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user