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
+2 -2
View File
@@ -12,7 +12,7 @@ import { drr } from '../util/drr';
export function fees (api: ApiInterface$Rx) {
return (): Observable<DerivedFees> => {
return (combineLatest(
return (combineLatest([
api.query.balances.creationFee(),
api.query.balances.existentialDeposit(),
api.query.fees
@@ -22,7 +22,7 @@ export function fees (api: ApiInterface$Rx) {
? api.query.fees.transactionByteFee()
: api.query.balances.transactionByteFee(),
api.query.balances.transferFee()
) as any as Observable<[BN, BN, BN, BN, BN]>).pipe(
]) as any as Observable<[BN, BN, BN, BN, BN]>).pipe(
map(([creationFee, existentialDeposit, transactionBaseFee, transactionByteFee, transferFee]) => ({
creationFee,
existentialDeposit,
@@ -15,10 +15,10 @@ import { votingBalancesNominatorsFor } from './votingBalancesNominatorsFor';
export function validatingBalance (api: ApiInterface$Rx) {
return (address: AccountId | AccountIndex | Address | string): Observable<DerivedBalances> => {
return combineLatest(
return combineLatest([
votingBalance(api)(address),
votingBalancesNominatorsFor(api)(address)
).pipe(
]).pipe(
map(([balance, nominators]) => {
const nominatedBalance = nominators.reduce(
(total: BN, nominatorBalance: DerivedBalances) =>
@@ -18,11 +18,11 @@ export function votingBalance (api: ApiInterface$Rx) {
return idAndIndex(api)(address).pipe(
switchMap(([accountId]) =>
(accountId
? combineLatest(
? combineLatest([
of(accountId),
api.query.balances.freeBalance(accountId),
api.query.balances.reservedBalance(accountId)
)
])
: of([undefined, undefined, undefined])
) as Observable<[AccountId?, Balance?, Balance?]>
),
@@ -14,6 +14,6 @@ export function votingBalances (api: ApiInterface$Rx) {
return (addresses?: Array<AccountId | AccountIndex | Address | string>): Observable<Array<DerivedBalances>> => {
return !addresses || !addresses.length
? of([]).pipe(drr())
: combineLatest(...addresses.map(votingBalance(api))).pipe(drr());
: combineLatest(addresses.map(votingBalance(api))).pipe(drr());
};
}