Internal derive adjustments (#4888)

This commit is contained in:
Jaco
2022-06-02 10:39:11 +03:00
committed by GitHub
parent 4d02c78fe2
commit 45d6c00816
3 changed files with 25 additions and 16 deletions
+4 -2
View File
@@ -39,12 +39,14 @@ export function keysMulti (instanceId: string, api: DeriveApi): (stashIds: (Uint
combineLatest([
of(queuedKeys),
api.consts.session?.dedupKeyPrefix
? api.query.session.nextKeys.multi(stashIds.map((stashId) => [api.consts.session.dedupKeyPrefix, stashId]))
? api.query.session.nextKeys.multi(stashIds.map((s) => [api.consts.session.dedupKeyPrefix, s]))
: combineLatest(stashIds.map((s) => api.query.session.nextKeys(s)))
])
),
map(([queuedKeys, nextKeys]) =>
stashIds.map((stashId, index) => extractsIds(stashId, queuedKeys, nextKeys[index]))
stashIds.map((stashId, index) =>
extractsIds(stashId, queuedKeys, nextKeys[index])
)
)
)
: of([])