Bump deps (#702)

* Bump deps

* Update keyring
This commit is contained in:
Jaco Greeff
2019-02-15 17:38:49 +01:00
committed by GitHub
parent 5ac9db343f
commit 4735253cbd
17 changed files with 1570 additions and 1531 deletions
+2 -4
View File
@@ -30,12 +30,10 @@
},
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.2.0",
"@babel/runtime": "^7.3.1",
"@polkadot/api": "^0.43.5",
"@polkadot/types": "^0.43.5",
"@types/memoizee": "^0.4.2",
"@types/rx": "^4.1.1",
"memoizee": "^0.4.14",
"rxjs": "^6.3.3"
"memoizee": "^0.4.14"
}
}
+2 -2
View File
@@ -5,7 +5,7 @@
import { Observable, combineLatest, of } from 'rxjs';
import { catchError, map } from 'rxjs/operators';
import { ApiInterface$Rx } from '@polkadot/api/types';
import { HeaderExtended } from '@polkadot/types/Header';
import { Header, HeaderExtended } from '@polkadot/types/index';
import { drr } from '../util/drr';
import { HeaderAndValidators } from './subscribeNewHead';
@@ -26,7 +26,7 @@ export function getHeader (api: ApiInterface$Rx) {
return (hash: Uint8Array | string): Observable<HeaderExtended | undefined> =>
// tslint:disable-next-line
(combineLatest(
api.rpc.chain.getHeader(hash),
api.rpc.chain.getHeader(hash) as Observable<Header>,
api.query.session
? api.query.session.validators.at(hash)
: of([])
@@ -5,8 +5,7 @@
import { Observable, combineLatest, of } from 'rxjs';
import { filter, map, switchMap } from 'rxjs/operators';
import { ApiInterface$Rx } from '@polkadot/api/types';
import { AccountId, Header } from '@polkadot/types/index';
import { HeaderExtended } from '@polkadot/types/Header';
import { AccountId, Header, HeaderExtended } from '@polkadot/types/index';
import { drr } from '../util/drr';
@@ -31,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
@@ -39,7 +38,7 @@ export function subscribeNewHead (api: ApiInterface$Rx) {
api.query.session
? api.query.session.validators.at(header.hash)
: of([])
)
) as Observable<HeaderAndValidators>)
),
map(([header, validators]) =>
new HeaderExtended(header, validators)