Add .args to decoded StorageKeys (#2004)
* Add .args to decoded StorageKeys * Small opts * Formatting
This commit is contained in:
@@ -20,10 +20,7 @@ function queryNextStakers (api: ApiInterfaceRx): Observable<AccountId[]> {
|
||||
api.query.staking.erasStakers.entries(activeEra.addn(1))
|
||||
),
|
||||
map((entries): AccountId[] =>
|
||||
// key is from concat with AccountId bytes right at the end
|
||||
entries.map(([key]): AccountId =>
|
||||
api.registry.createType('AccountId', key.toU8a().slice(-32))
|
||||
)
|
||||
entries.map(([key]): AccountId => key.args[1] as AccountId)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user