Adjust to KitchensinkRuntimeSessionKeys in derive (#5138)

This commit is contained in:
Jaco
2022-08-06 14:52:28 +03:00
committed by GitHub
parent f0c45733ee
commit edb0a40843
+2 -2
View File
@@ -4,7 +4,7 @@
import type { Observable } from 'rxjs';
import type { Option } from '@polkadot/types';
import type { AccountId } from '@polkadot/types/interfaces';
import type { NodeRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { KitchensinkRuntimeSessionKeys } from '@polkadot/types/lookup';
import type { DeriveApi } from '../types';
import type { DeriveStakingKeys } from './types';
@@ -12,7 +12,7 @@ import { combineLatest, map, of, switchMap } from 'rxjs';
import { firstMemo, memo } from '../util';
function extractsIds (stashId: Uint8Array | string, queuedKeys: [AccountId, NodeRuntimeSessionKeys | AccountId[]][], nextKeys: Option<NodeRuntimeSessionKeys>): DeriveStakingKeys {
function extractsIds (stashId: Uint8Array | string, queuedKeys: [AccountId, KitchensinkRuntimeSessionKeys | AccountId[]][], nextKeys: Option<KitchensinkRuntimeSessionKeys>): DeriveStakingKeys {
const sessionIds = (queuedKeys.find(([currentId]) => currentId.eq(stashId)) || [undefined, [] as AccountId[]])[1];
const nextSessionIds = nextKeys.unwrapOr([] as AccountId[]);