Bump deps (#861)

* Bump deps

* Align with published common

* Fix rxjs to 6.4.0 (false deprecations on 6.5.1)
This commit is contained in:
Jaco Greeff
2019-04-29 13:47:55 +02:00
committed by GitHub
parent ba77e93500
commit 5445314d95
27 changed files with 944 additions and 1097 deletions
@@ -24,10 +24,10 @@ import { bestNumberFinalized } from './bestNumberFinalized';
*/
export function bestNumberLag (api: ApiInterface$Rx) {
return (): Observable<BlockNumber> =>
combineLatest(
combineLatest([
bestNumber(api)(),
bestNumberFinalized(api)()
).pipe(
]).pipe(
map(([bestNumber, bestNumberFinalized]) =>
new BlockNumber(bestNumber.sub(bestNumberFinalized))
),
+2 -2
View File
@@ -25,12 +25,12 @@ import { HeaderAndValidators } from './subscribeNewHead';
export function getHeader (api: ApiInterface$Rx) {
return (hash: Uint8Array | string): Observable<HeaderExtended | undefined> =>
// tslint:disable-next-line
(combineLatest(
(combineLatest([
api.rpc.chain.getHeader(hash) as Observable<Header>,
api.query.session
? api.query.session.validators.at(hash)
: of([])
) as Observable<HeaderAndValidators>).pipe(
]) as Observable<HeaderAndValidators>).pipe(
map(([header, validators]) =>
new HeaderExtended(header, validators)
),
@@ -30,7 +30,7 @@ export function subscribeNewHead (api: ApiInterface$Rx) {
header && !!header.blockNumber
),
switchMap((header: Header): Observable<HeaderAndValidators> =>
(combineLatest(
(combineLatest([
of(header),
// theoretically we could combine at the first call with session.validators(), however
// we make 100% sure we actually get the validators at a specific block so when these
@@ -38,7 +38,7 @@ export function subscribeNewHead (api: ApiInterface$Rx) {
api.query.session
? api.query.session.validators.at(header.hash)
: of([])
) as Observable<HeaderAndValidators>)
]) as Observable<HeaderAndValidators>)
),
map(([header, validators]) =>
new HeaderExtended(header, validators)