Return array from enumset (#305)

This commit is contained in:
Jaco Greeff
2018-10-15 23:48:00 +02:00
committed by GitHub
parent 3f388a3474
commit f31c35e48e
2 changed files with 15 additions and 6 deletions
+10 -1
View File
@@ -47,7 +47,16 @@ export default class ApiQueries extends ApiBase {
}
getAccountEnumSet = (index: AccountIndex | BN | number): Observable<Array<AccountId> | undefined> => {
return this.rawStorage(storage.balances.enumSet, index);
return this
.rawStorage(storage.balances.enumSet, index)
.pipe(
// @ts-ignore After upgrade to 6.3.2
map((accounts: Vector<AccountId> = []) =>
accounts.map((accountId) =>
accountId
)
)
);
}
nextAccountEnumSet = (): Observable<AccountIndex | undefined> => {