diff --git a/packages/api-derive/src/staking/erasExposure.ts b/packages/api-derive/src/staking/erasExposure.ts index 25a6a152fa..8d7173d525 100644 --- a/packages/api-derive/src/staking/erasExposure.ts +++ b/packages/api-derive/src/staking/erasExposure.ts @@ -6,7 +6,6 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { EraIndex, Exposure } from '@polkadot/types/interfaces'; import { DeriveEraExposure, DeriveEraNominatorExposure, DeriveEraValidatorExposure } from '../types'; -import BN from 'bn.js'; import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { StorageKey } from '@polkadot/types'; @@ -24,11 +23,11 @@ function mapStakers (era: EraIndex, stakers: KeysAndExposures): DeriveEraExposur validators[validatorId] = exposure; - exposure.others.forEach(({ who }, index): void => { + exposure.others.forEach(({ who }, validatorIndex): void => { const nominatorId = who.toString(); nominators[nominatorId] = nominators[nominatorId] || []; - nominators[nominatorId].push([validatorId, index]); + nominators[nominatorId].push({ validatorId, validatorIndex }); }); }); @@ -43,14 +42,12 @@ export function eraExposure (api: ApiInterfaceRx): (era: EraIndex) => Observable ); } -export function erasExposure (api: ApiInterfaceRx): (withActive?: boolean | BN | number) => Observable { - return memo((withActive?: boolean | BN | number): Observable => +export function erasExposure (api: ApiInterfaceRx): (withActive?: boolean) => Observable { + return memo((withActive?: boolean): Observable => api.derive.staking.erasHistoric(withActive).pipe( switchMap((eras): Observable => eras.length - ? combineLatest( - eras.map((era) => api.derive.staking.eraExposure(era)) - ) + ? combineLatest(eras.map((era) => api.derive.staking.eraExposure(era))) : of([]) ) ) diff --git a/packages/api-derive/src/staking/erasHistoric.ts b/packages/api-derive/src/staking/erasHistoric.ts index 549000f2d6..28e10a6efa 100644 --- a/packages/api-derive/src/staking/erasHistoric.ts +++ b/packages/api-derive/src/staking/erasHistoric.ts @@ -5,49 +5,35 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { ActiveEraInfo, EraIndex } from '@polkadot/types/interfaces'; -import BN from 'bn.js'; import { Observable, of } from 'rxjs'; import { map } from 'rxjs/operators'; import { Option, u32 } from '@polkadot/types'; -import { isBoolean, isUndefined, bnToBn } from '@polkadot/util'; import { memo } from '../util'; -export function erasHistoric (api: ApiInterfaceRx): (withActive?: boolean | BN | number) => Observable { - return memo((withActive?: boolean | BN | number): Observable => +export function erasHistoric (api: ApiInterfaceRx): (withActive?: boolean) => Observable { + return memo((withActive?: boolean): Observable => api.query.staking?.activeEra ? api.queryMulti<[Option, u32]>([ api.query.staking.activeEra, api.query.staking.historyDepth ]).pipe( map(([activeEraOpt, historyDepth]): EraIndex[] => { - const result: (EraIndex | null)[] = []; + const result: EraIndex[] = []; const max = historyDepth.toNumber(); const activeEra = activeEraOpt.unwrapOrDefault().index.toBn(); let lastEra = activeEra; while (lastEra.gten(0) && (result.length < max)) { - result.push( - ((lastEra !== activeEra) || (withActive === true)) - ? api.registry.createType('EraIndex', lastEra) - : null - ); + if ((lastEra !== activeEra) || (withActive === true)) { + result.push(api.registry.createType('EraIndex', lastEra)); + } lastEra = lastEra.subn(1); } - const startEra = isUndefined(withActive) || isBoolean(withActive) - ? new BN(0) - : bnToBn(withActive); - // go from oldest to newest - return result - .filter((era): era is EraIndex => - era - ? era.gte(startEra) - : false - ) - .reverse(); + return result.reverse(); }) ) : of([]) diff --git a/packages/api-derive/src/staking/erasPoints.ts b/packages/api-derive/src/staking/erasPoints.ts index 7b3948b63c..0d0d64e05e 100644 --- a/packages/api-derive/src/staking/erasPoints.ts +++ b/packages/api-derive/src/staking/erasPoints.ts @@ -6,7 +6,6 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { EraIndex, EraRewardPoints } from '@polkadot/types/interfaces'; import { DeriveEraPoints, DeriveEraValPoints } from '../types'; -import BN from 'bn.js'; import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; @@ -22,8 +21,8 @@ function mapValidators ({ individual }: EraRewardPoints): DeriveEraValPoints { }, {}); } -export function erasPoints (api: ApiInterfaceRx): (withActive?: boolean | BN | number) => Observable { - return memo((withActive?: boolean | number): Observable => +export function erasPoints (api: ApiInterfaceRx): (withActive?: boolean) => Observable { + return memo((withActive?: boolean): Observable => api.derive.staking.erasHistoric(withActive).pipe( switchMap((eras): Observable<[EraIndex[], EraRewardPoints[]]> => combineLatest([ diff --git a/packages/api-derive/src/staking/erasPrefs.ts b/packages/api-derive/src/staking/erasPrefs.ts index 215d908626..903a77c7d8 100644 --- a/packages/api-derive/src/staking/erasPrefs.ts +++ b/packages/api-derive/src/staking/erasPrefs.ts @@ -6,7 +6,6 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { EraIndex, ValidatorPrefs } from '@polkadot/types/interfaces'; import { DeriveEraPrefs, DeriveEraValPrefs } from '../types'; -import BN from 'bn.js'; import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { StorageKey } from '@polkadot/types'; @@ -31,14 +30,12 @@ export function eraPrefs (api: ApiInterfaceRx): (era: EraIndex) => Observable Observable { - return memo((withActive?: boolean | BN | number): Observable => +export function erasPrefs (api: ApiInterfaceRx): (withActive?: boolean) => Observable { + return memo((withActive?: boolean): Observable => api.derive.staking.erasHistoric(withActive).pipe( switchMap((eras): Observable => eras.length - ? combineLatest( - eras.map((era) => api.derive.staking.eraPrefs(era)) - ) + ? combineLatest(eras.map((era) => api.derive.staking.eraPrefs(era))) : of([]) ) ) diff --git a/packages/api-derive/src/staking/erasRewards.ts b/packages/api-derive/src/staking/erasRewards.ts index d4df51b332..4be943aab7 100644 --- a/packages/api-derive/src/staking/erasRewards.ts +++ b/packages/api-derive/src/staking/erasRewards.ts @@ -6,15 +6,14 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { Balance, EraIndex } from '@polkadot/types/interfaces'; import { DeriveEraRewards } from '../types'; -import BN from 'bn.js'; import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { Option } from '@polkadot/types'; import { memo } from '../util'; -export function erasRewards (api: ApiInterfaceRx): (withActive?: boolean | BN | number) => Observable { - return memo((withActive?: boolean | BN | number): Observable => +export function erasRewards (api: ApiInterfaceRx): (withActive?: boolean) => Observable { + return memo((withActive?: boolean): Observable => api.derive.staking.erasHistoric(withActive).pipe( switchMap((eras): Observable<[EraIndex[], Option[]]> => combineLatest([ diff --git a/packages/api-derive/src/staking/erasSlashes.ts b/packages/api-derive/src/staking/erasSlashes.ts index dda2bb2953..053adcf215 100644 --- a/packages/api-derive/src/staking/erasSlashes.ts +++ b/packages/api-derive/src/staking/erasSlashes.ts @@ -7,7 +7,6 @@ import { BalanceOf, EraIndex, Perbill } from '@polkadot/types/interfaces'; import { ITuple } from '@polkadot/types/types'; import { DeriveEraSlashes, DeriveEraValSlash } from '../types'; -import BN from 'bn.js'; import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { Option, StorageKey } from '@polkadot/types'; @@ -40,8 +39,8 @@ export function eraSlashes (api: ApiInterfaceRx): (era: EraIndex) => Observable< ); } -export function erasSlashes (api: ApiInterfaceRx): (withActive?: boolean | BN | number) => Observable { - return memo((withActive?: boolean | BN | number): Observable => +export function erasSlashes (api: ApiInterfaceRx): (withActive?: boolean) => Observable { + return memo((withActive?: boolean): Observable => api.derive.staking.erasHistoric(withActive).pipe( switchMap((eras): Observable => eras.length diff --git a/packages/api-derive/src/staking/ownExposure.ts b/packages/api-derive/src/staking/ownExposure.ts index 2dab3f5626..0aa63a9c7e 100644 --- a/packages/api-derive/src/staking/ownExposure.ts +++ b/packages/api-derive/src/staking/ownExposure.ts @@ -5,14 +5,13 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { DeriveOwnExposure } from '../types'; -import BN from 'bn.js'; import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { memo } from '../util'; -export function ownExposure (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean | BN | number) => Observable { - return memo((accountId: Uint8Array | string, withActive?: boolean | BN | number): Observable => { +export function ownExposure (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean) => Observable { + return memo((accountId: Uint8Array | string, withActive?: boolean): Observable => { return api.derive.staking.erasHistoric(withActive).pipe( switchMap((eras) => eras.length diff --git a/packages/api-derive/src/staking/ownSlashes.ts b/packages/api-derive/src/staking/ownSlashes.ts index 0949f9140d..f478b31c51 100644 --- a/packages/api-derive/src/staking/ownSlashes.ts +++ b/packages/api-derive/src/staking/ownSlashes.ts @@ -5,14 +5,13 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { DeriveStakerSlashes } from '../types'; -import BN from 'bn.js'; import { Observable, combineLatest, of } from 'rxjs'; import { map, switchMap } from 'rxjs/operators'; import { memo } from '../util'; -export function ownSlashes (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean | BN | number) => Observable { - return memo((accountId: Uint8Array | string, withActive?: boolean | BN | number): Observable => { +export function ownSlashes (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean) => Observable { + return memo((accountId: Uint8Array | string, withActive?: boolean): Observable => { return api.derive.staking.erasHistoric(withActive).pipe( switchMap((eras) => eras.length diff --git a/packages/api-derive/src/staking/query.ts b/packages/api-derive/src/staking/query.ts index 7ffc05978b..8854068aee 100644 --- a/packages/api-derive/src/staking/query.ts +++ b/packages/api-derive/src/staking/query.ts @@ -102,10 +102,10 @@ export function query (api: ApiInterfaceRx): (accountId: Uint8Array | string) => }); } -export function queryMulti (api: ApiInterfaceRx): (...accountIds: (Uint8Array | string)[]) => Observable { - return memo((...accountIds: (Uint8Array | string)[]): Observable => - combineLatest( - accountIds.map((accountId) => api.derive.staking.query(accountId)) - ) +export function queryMulti (api: ApiInterfaceRx): (accountIds: (Uint8Array | string)[]) => Observable { + return memo((accountIds: (Uint8Array | string)[]): Observable => + accountIds.length + ? combineLatest(accountIds.map((acc) => api.derive.staking.query(acc))) + : of([]) ); } diff --git a/packages/api-derive/src/staking/stakerExposure.ts b/packages/api-derive/src/staking/stakerExposure.ts index 14e98c7135..ee608a8e59 100644 --- a/packages/api-derive/src/staking/stakerExposure.ts +++ b/packages/api-derive/src/staking/stakerExposure.ts @@ -3,16 +3,15 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { ApiInterfaceRx } from '@polkadot/api/types'; -import { DeriveStakerExposure, DeriveEraValidatorExposure } from '../types'; +import { DeriveStakerExposure, DeriveEraExposureNominating, DeriveEraValidatorExposure } from '../types'; -import BN from 'bn.js'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { memo } from '../util'; -export function stakerExposure (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean | BN | number) => Observable { - return memo((accountId: Uint8Array | string, withActive?: boolean | BN | number): Observable => { +export function stakerExposure (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean) => Observable { + return memo((accountId: Uint8Array | string, withActive?: boolean): Observable => { const stakerId = api.registry.createType('AccountId', accountId).toString(); return api.derive.staking.erasExposure(withActive).pipe( @@ -20,14 +19,14 @@ export function stakerExposure (api: ApiInterfaceRx): (accountId: Uint8Array | s exposures.map(({ era, nominators: allNominators, validators: allValidators }): DeriveStakerExposure => { const isValidator = !!allValidators[stakerId]; const validators: DeriveEraValidatorExposure = {}; - let nominating: [string, number][] = []; + let nominating: DeriveEraExposureNominating[] = []; if (isValidator) { validators[stakerId] = allValidators[stakerId]; } else if (allNominators[stakerId]) { nominating = allNominators[stakerId]; - nominating.forEach(([validatorId]): void => { + nominating.forEach(({ validatorId }): void => { validators[validatorId] = allValidators[validatorId]; }); } diff --git a/packages/api-derive/src/staking/stakerPoints.ts b/packages/api-derive/src/staking/stakerPoints.ts index e9eb4c2666..961d27f3e6 100644 --- a/packages/api-derive/src/staking/stakerPoints.ts +++ b/packages/api-derive/src/staking/stakerPoints.ts @@ -5,14 +5,13 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { DeriveStakerPoints } from '../types'; -import BN from 'bn.js'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { memo } from '../util'; -export function stakerPoints (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean | BN | number) => Observable { - return memo((accountId: Uint8Array | string, withActive?: boolean | BN | number): Observable => { +export function stakerPoints (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean) => Observable { + return memo((accountId: Uint8Array | string, withActive?: boolean): Observable => { const stakerId = api.registry.createType('AccountId', accountId).toString(); return api.derive.staking.erasPoints(withActive).pipe( diff --git a/packages/api-derive/src/staking/stakerRewards.ts b/packages/api-derive/src/staking/stakerRewards.ts index 680032483f..f21e6f1322 100644 --- a/packages/api-derive/src/staking/stakerRewards.ts +++ b/packages/api-derive/src/staking/stakerRewards.ts @@ -3,11 +3,13 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { ApiInterfaceRx } from '@polkadot/api/types'; +import { EraIndex, StakingLedger, StakingLedgerTo240 } from '@polkadot/types/interfaces'; import { DeriveEraPoints, DeriveEraPrefs, DeriveEraRewards, DeriveEraValPrefs, DeriveStakerExposure, DeriveStakerReward, DeriveStakerRewardValidator } from '../types'; import BN from 'bn.js'; -import { Observable, combineLatest } from 'rxjs'; -import { map } from 'rxjs/operators'; +import { Observable, combineLatest, of } from 'rxjs'; +import { map, switchMap } from 'rxjs/operators'; +import { Option } from '@polkadot/types'; import { memo } from '../util'; @@ -67,29 +69,102 @@ function parseRewards (api: ApiInterfaceRx, stakerId: string, [erasPoints, erasP }); } -export function stakerRewards (api: ApiInterfaceRx): (accountId: Uint8Array | string, startEra: BN | number) => Observable { - return memo((accountId: Uint8Array | string, startEra: BN | number): Observable => { +function uniqValidators (rewards: DeriveStakerReward[]): string[] { + const uniq: string[] = []; + + rewards.forEach(({ validators }): void => { + Object.keys(validators).forEach((validatorId): void => { + if (!uniq.includes(validatorId)) { + uniq.push(validatorId); + } + }); + }); + + return uniq; +} + +function isOldLedger (ledger: StakingLedger | StakingLedgerTo240): ledger is StakingLedgerTo240 { + return !!(ledger as StakingLedgerTo240).lastReward; +} + +function filterRewards (api: ApiInterfaceRx, accountId: Uint8Array | string, rewards: DeriveStakerReward[], withActive?: boolean): Observable { + if (withActive) { + return of(rewards); + } + + const validators = uniqValidators(rewards); + + return combineLatest([ + api.query.staking.migrateEra + ? api.query.staking.migrateEra>() + : of(api.registry.createType('Option', api.tx.staking.payoutStakers ? 0 : 1_000_000_000)), + api.derive.staking.query(accountId), + api.derive.staking.queryMulti(validators) + ]).pipe( + map(([optMigrate, { stakingLedger }, queryValidators]): DeriveStakerReward[] => { + const migrateEra = optMigrate.unwrapOr(new BN(-1)); + + return rewards + .filter(({ isEmpty }) => !isEmpty) + .filter((reward): boolean => { + if (reward.era.lte(migrateEra)) { + return !stakingLedger + ? true + : isOldLedger(stakingLedger) + ? reward.era.gt(stakingLedger.lastReward.unwrapOr(new BN(-1))) + : !stakingLedger.claimedRewards.some((claimEra) => reward.era.eq(claimEra)); + } + + reward.isStakerPayout = true; + + const rm: string[] = []; + + Object.keys(reward.validators).forEach((validatorId): void => { + const index = validators.indexOf(validatorId); + + if (index !== -1) { + const valLedger = queryValidators[index].stakingLedger; + + if (valLedger?.claimedRewards.some((era) => reward.era.eq(era))) { + rm.push(validatorId); + } + } + }); + + rm.forEach((validatorId): void => { + delete reward.validators[validatorId]; + }); + + return true; + }) + .filter(({ validators }) => Object.keys(validators).length !== 0) + .map((reward) => ({ + ...reward, + nominators: reward.nominating.filter(({ validatorId }) => !!reward.validators[validatorId]) + })); + }) + ); +} + +export function stakerRewards (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean) => Observable { + return memo((accountId: Uint8Array | string, withActive?: boolean): Observable => { const stakerId = api.registry.createType('AccountId', accountId).toString(); return combineLatest([ - api.derive.staking.erasPoints(startEra), - api.derive.staking.erasPrefs(startEra), - api.derive.staking.erasRewards(startEra), - api.derive.staking.stakerExposure(stakerId, startEra) + api.derive.staking.erasPoints(withActive), + api.derive.staking.erasPrefs(withActive), + api.derive.staking.erasRewards(withActive), + api.derive.staking.stakerExposure(stakerId, withActive) ]).pipe( - map((result): DeriveStakerReward[] => - parseRewards(api, stakerId, result) - ) + switchMap((result) => filterRewards(api, accountId, parseRewards(api, stakerId, result), withActive)) ); }); } -export function stakerRewardsMulti (api: ApiInterfaceRx): (...params: [Uint8Array | string, BN | number][]) => Observable { - return memo((...params: [Uint8Array | string, BN | number][]): Observable => - combineLatest( - params.map(([accountId, startEra]) => - api.derive.staking.stakerRewards(accountId, startEra) - ) - ) +export function stakerRewardsMulti (api: ApiInterfaceRx): (accountIds: (Uint8Array | string)[], withActive?: boolean) => Observable { + return memo((accountIds: (Uint8Array | string)[], withActive?: boolean): Observable => + accountIds.length + ? combineLatest(accountIds.map((acc) => api.derive.staking.stakerRewards(acc, withActive))) + : of([]) ); } diff --git a/packages/api-derive/src/staking/stakerSlashes.ts b/packages/api-derive/src/staking/stakerSlashes.ts index 07df88eb75..34f90bdcee 100644 --- a/packages/api-derive/src/staking/stakerSlashes.ts +++ b/packages/api-derive/src/staking/stakerSlashes.ts @@ -5,14 +5,13 @@ import { ApiInterfaceRx } from '@polkadot/api/types'; import { DeriveStakerSlashes } from '../types'; -import BN from 'bn.js'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { memo } from '../util'; -export function stakerSlashes (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean | BN | number) => Observable { - return memo((accountId: Uint8Array | string, withActive?: boolean | BN | number): Observable => { +export function stakerSlashes (api: ApiInterfaceRx): (accountId: Uint8Array | string, withActive?: boolean) => Observable { + return memo((accountId: Uint8Array | string, withActive?: boolean): Observable => { const stakerId = api.registry.createType('AccountId', accountId).toString(); return api.derive.staking.erasSlashes(withActive).pipe( diff --git a/packages/api-derive/src/staking/types.ts b/packages/api-derive/src/staking/types.ts index 52276c1522..597cbc64d0 100644 --- a/packages/api-derive/src/staking/types.ts +++ b/packages/api-derive/src/staking/types.ts @@ -41,7 +41,7 @@ export interface DeriveStakerPoints { points: RewardPoint; } -export type DeriveEraNominatorExposure = Record; +export type DeriveEraNominatorExposure = Record; export type DeriveEraValidatorExposure = Record; @@ -59,11 +59,16 @@ export interface DeriveOwnExposure { export type DeriveOwnSlashes = DeriveStakerSlashes; +export interface DeriveEraExposureNominating { + validatorId: string; + validatorIndex: number; +} + export interface DeriveStakerExposure { era: EraIndex; isEmpty: boolean; isValidator: boolean; - nominating: [string, number][]; + nominating: DeriveEraExposureNominating[]; validators: DeriveEraValidatorExposure; } @@ -75,9 +80,10 @@ export interface DeriveStakerRewardValidator { export interface DeriveStakerReward { era: EraIndex; eraReward: Balance; + isStakerPayout?: boolean; isEmpty: boolean; isValidator: boolean; - nominating: [string, number][]; + nominating: DeriveEraExposureNominating[]; total: Balance; validators: Record; } diff --git a/packages/types-known/src/spec/centrifuge-chain.ts b/packages/types-known/src/spec/centrifuge-chain.ts index 2d61b02978..676a800600 100644 --- a/packages/types-known/src/spec/centrifuge-chain.ts +++ b/packages/types-known/src/spec/centrifuge-chain.ts @@ -10,7 +10,8 @@ const versioned: OverrideVersionedType[] = [ types: { Address: 'AccountId', LookupSource: 'AccountId', - ReferendumInfo: 'ReferendumInfoTo239' + ReferendumInfo: 'ReferendumInfoTo239', + StakingLedger: 'StakingLedgerTo240' } } ]; diff --git a/packages/types-known/src/spec/kusama.ts b/packages/types-known/src/spec/kusama.ts index 9a4cf13ab5..2a6c20f1e6 100644 --- a/packages/types-known/src/spec/kusama.ts +++ b/packages/types-known/src/spec/kusama.ts @@ -54,7 +54,8 @@ const versioned: OverrideVersionedType[] = [ Address: 'AccountId', Keys: 'SessionKeys5', LookupSource: 'AccountId', - ReferendumInfo: 'ReferendumInfoTo239' + ReferendumInfo: 'ReferendumInfoTo239', + StakingLedger: 'StakingLedgerTo240' } }, { @@ -62,7 +63,8 @@ const versioned: OverrideVersionedType[] = [ types: { Address: 'AccountId', Keys: 'SessionKeys5', - LookupSource: 'AccountId' + LookupSource: 'AccountId', + StakingLedger: 'StakingLedgerTo240' } } ]; diff --git a/packages/types-known/src/spec/polkadot.ts b/packages/types-known/src/spec/polkadot.ts index a8eb2d903f..175ab90765 100644 --- a/packages/types-known/src/spec/polkadot.ts +++ b/packages/types-known/src/spec/polkadot.ts @@ -27,7 +27,8 @@ const versioned: OverrideVersionedType[] = [ Address: 'AccountId', Keys: 'SessionKeys5', LookupSource: 'AccountId', - ReferendumInfo: 'ReferendumInfoTo239' + ReferendumInfo: 'ReferendumInfoTo239', + StakingLedger: 'StakingLedgerTo240' } }, { @@ -35,7 +36,8 @@ const versioned: OverrideVersionedType[] = [ types: { Address: 'AccountId', Keys: 'SessionKeys5', - LookupSource: 'AccountId' + LookupSource: 'AccountId', + StakingLedger: 'StakingLedgerTo240' } } ]; diff --git a/packages/types/src/augment/registry.ts b/packages/types/src/augment/registry.ts index 4f604ddb3f..b0f812cb55 100644 --- a/packages/types/src/augment/registry.ts +++ b/packages/types/src/augment/registry.ts @@ -35,7 +35,7 @@ import { AccountId, AccountIdOf, AccountIndex, Address, AssetId, Balance, Balanc import { SchedulePeriod, SchedulePriority, Scheduled, TaskAddress } from '@polkadot/types/interfaces/scheduler'; import { FullIdentification, IdentificationTuple, Keys, SessionIndex, SessionKeys1, SessionKeys2, SessionKeys3, SessionKeys4, SessionKeys5, SessionKeys6 } from '@polkadot/types/interfaces/session'; import { Bid, BidKind, SocietyJudgement, SocietyVote, StrikeCount, VouchingStatus } from '@polkadot/types/interfaces/society'; -import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, PhragmenScore, Points, ReleasesStaking, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking'; +import { ActiveEraInfo, CompactAssignments, CompactScore, ElectionCompute, ElectionResult, ElectionStatus, EraIndex, EraPoints, EraRewardPoints, EraRewards, Exposure, Forcing, IndividualExposure, KeyType, MomentOf, Nominations, PhragmenScore, Points, ReleasesStaking, RewardDestination, RewardPoint, SlashJournalEntry, SlashingSpans, SlashingSpansTo204, SpanIndex, SpanRecord, StakingLedger, StakingLedgerTo223, StakingLedgerTo240, UnappliedSlash, UnappliedSlashOther, UnlockChunk, ValidatorIndex, ValidatorPrefs, ValidatorPrefsTo145, ValidatorPrefsTo196 } from '@polkadot/types/interfaces/staking'; import { ApiId, KeyValueOption, RuntimeVersion, RuntimeVersionApi, StorageChangeSet } from '@polkadot/types/interfaces/state'; import { AccountInfo, ChainProperties, DigestOf, DispatchError, DispatchErrorModule, DispatchErrorTo198, DispatchResult, DispatchResultOf, DispatchResultTo198, Event, EventId, EventIndex, EventRecord, EventRecordTo76, Health, Key, LastRuntimeUpgradeInfo, NetworkState, NetworkStatePeerset, NetworkStatePeersetInfo, NodeRole, NotConnectedPeer, Peer, PeerEndpoint, PeerEndpointAddr, PeerInfo, PeerPing, Phase, RefCount } from '@polkadot/types/interfaces/system'; import { OpenTip, OpenTipFinder, OpenTipTip, TreasuryProposal } from '@polkadot/types/interfaces/treasury'; @@ -859,6 +859,9 @@ declare module '@polkadot/types/types/registry' { StakingLedgerTo223: StakingLedgerTo223; 'Option': Option; 'Vec': Vec; + StakingLedgerTo240: StakingLedgerTo240; + 'Option': Option; + 'Vec': Vec; StakingLedger: StakingLedger; 'Option': Option; 'Vec': Vec; diff --git a/packages/types/src/interfaces/staking/definitions.ts b/packages/types/src/interfaces/staking/definitions.ts index a9c6e05f41..d8f49adba4 100644 --- a/packages/types/src/interfaces/staking/definitions.ts +++ b/packages/types/src/interfaces/staking/definitions.ts @@ -130,14 +130,20 @@ export default { active: 'Compact', unlocking: 'Vec' }, - // TODO Enable as default when new staking payouts go live - StakingLedger: { + StakingLedgerTo240: { stash: 'AccountId', total: 'Compact', active: 'Compact', unlocking: 'Vec', lastReward: 'Option' }, + StakingLedger: { + stash: 'AccountId', + total: 'Compact', + active: 'Compact', + unlocking: 'Vec', + claimedRewards: 'Vec' + }, UnappliedSlashOther: '(AccountId, Balance)', UnappliedSlash: { validator: 'AccountId', diff --git a/packages/types/src/interfaces/staking/types.ts b/packages/types/src/interfaces/staking/types.ts index 15303005c3..7dd279ded6 100644 --- a/packages/types/src/interfaces/staking/types.ts +++ b/packages/types/src/interfaces/staking/types.ts @@ -172,7 +172,7 @@ export interface StakingLedger extends Struct { readonly total: Compact; readonly active: Compact; readonly unlocking: Vec; - readonly lastReward: Option; + readonly claimedRewards: Vec; } /** @name StakingLedgerTo223 */ @@ -183,6 +183,15 @@ export interface StakingLedgerTo223 extends Struct { readonly unlocking: Vec; } +/** @name StakingLedgerTo240 */ +export interface StakingLedgerTo240 extends Struct { + readonly stash: AccountId; + readonly total: Compact; + readonly active: Compact; + readonly unlocking: Vec; + readonly lastReward: Option; +} + /** @name UnappliedSlash */ export interface UnappliedSlash extends Struct { readonly validator: AccountId; diff --git a/yarn.lock b/yarn.lock index 0dfb8735bc..f04d033f43 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1469,9 +1469,9 @@ __metadata: languageName: node linkType: hard -"@jest/core@npm:^25.2.6": - version: 25.2.6 - resolution: "@jest/core@npm:25.2.6" +"@jest/core@npm:^25.2.7": + version: 25.2.7 + resolution: "@jest/core@npm:25.2.7" dependencies: "@jest/console": ^25.2.6 "@jest/reporters": ^25.2.6 @@ -1483,25 +1483,25 @@ __metadata: exit: ^0.1.2 graceful-fs: ^4.2.3 jest-changed-files: ^25.2.6 - jest-config: ^25.2.6 + jest-config: ^25.2.7 jest-haste-map: ^25.2.6 jest-message-util: ^25.2.6 jest-regex-util: ^25.2.6 jest-resolve: ^25.2.6 - jest-resolve-dependencies: ^25.2.6 - jest-runner: ^25.2.6 - jest-runtime: ^25.2.6 - jest-snapshot: ^25.2.6 + jest-resolve-dependencies: ^25.2.7 + jest-runner: ^25.2.7 + jest-runtime: ^25.2.7 + jest-snapshot: ^25.2.7 jest-util: ^25.2.6 jest-validate: ^25.2.6 - jest-watcher: ^25.2.6 + jest-watcher: ^25.2.7 micromatch: ^4.0.2 p-each-series: ^2.1.0 realpath-native: ^2.0.0 rimraf: ^3.0.0 slash: ^3.0.0 strip-ansi: ^6.0.0 - checksum: 2/a6bc2bdfec21338f1c4d55f918dac6a5b286917555f52c7cb291085223af99aa999aa878fe26ceb2b925288fd2e03c5cb8877e8fe04c9ffd92657f59c6989690 + checksum: 2/aeb0fb1112e06a6785e6075f96317cf45f01188386cdae46d66ea9e9676c5f7e96afe2496784ab2a64e48b464ed36516cf811db8dc02786ce03c8b122c6d716c languageName: node linkType: hard @@ -1587,15 +1587,15 @@ __metadata: languageName: node linkType: hard -"@jest/test-sequencer@npm:^25.2.6": - version: 25.2.6 - resolution: "@jest/test-sequencer@npm:25.2.6" +"@jest/test-sequencer@npm:^25.2.7": + version: 25.2.7 + resolution: "@jest/test-sequencer@npm:25.2.7" dependencies: "@jest/test-result": ^25.2.6 jest-haste-map: ^25.2.6 - jest-runner: ^25.2.6 - jest-runtime: ^25.2.6 - checksum: 2/1695a7c7912494e5d3f24d1eea72a804bd3a35996e420cda5aae8663ca0bfc5dece8c6436410b9337c6be36bd1e909cd4a877a9507410c9b4d04c5ea2719b52a + jest-runner: ^25.2.7 + jest-runtime: ^25.2.7 + checksum: 2/bed47b8838076ea56aa3d117bd59b15cfdd3ddf3fb033fc89a6676706dc110e6700ed99227d75983acb44211fec306a7d3362eac53a45927d90a9036979382c9 languageName: node linkType: hard @@ -1623,7 +1623,7 @@ __metadata: languageName: node linkType: hard -"@jest/types@npm:^25.2.6": +"@jest/types@npm:^25.1.0, @jest/types@npm:^25.2.6": version: 25.2.6 resolution: "@jest/types@npm:25.2.6" dependencies: @@ -3051,12 +3051,12 @@ __metadata: linkType: hard "@types/jest@npm:^25.1.4": - version: 25.1.4 - resolution: "@types/jest@npm:25.1.4" + version: 25.1.5 + resolution: "@types/jest@npm:25.1.5" dependencies: - jest-diff: ^25.1.0 - pretty-format: ^25.1.0 - checksum: 2/1a60d1c9a3a964f08732bd46735fda513a4b4743554fbd3b7aa63f39e47a80353d0967cd138db412b3008cca6c4fe82e60f90f2bb272c0750069966d694f3177 + jest-diff: 25.1.0 + pretty-format: 25.1.0 + checksum: 2/602a8232667b8a6e339d60855f68630544bb2bd78b73c913f7f3c2299ef63bc2a7c1610c707b618564f46aaf5d4d82859665b0ed4314d5d63faa505a7495a8dd languageName: node linkType: hard @@ -3082,9 +3082,9 @@ __metadata: linkType: hard "@types/node@npm:*, @types/node@npm:>= 8": - version: 13.9.8 - resolution: "@types/node@npm:13.9.8" - checksum: 2/72610b1cca1ecb1b28ef493fac3a67975e32a814ec5dac888d55e9374c9475664ec797875ea7cb941b94a5016c9d4b0e4d40e60cc9793ef6aa279d3bd1e41fd3 + version: 13.11.0 + resolution: "@types/node@npm:13.11.0" + checksum: 2/8691b7c62a978a78e54c5019c5b055400ff7977fcd6694ce62c79c8c3b1bf5e4818195177693e77950df97134787703c6b0e54d6144eb4dfd183a2ac3e510f39 languageName: node linkType: hard @@ -6790,7 +6790,7 @@ __metadata: languageName: node linkType: hard -"diff-sequences@npm:^25.2.6": +"diff-sequences@npm:^25.1.0, diff-sequences@npm:^25.2.6": version: 25.2.6 resolution: "diff-sequences@npm:25.2.6" checksum: 2/332484fc00f6beca726d8dbc13095f6006527002bef936a07b4e6bbec681fbaac484e1a7ea4e9ab0d53e375d1cde9e642c8cce31dfe6329cfdf8f01f26b17505 @@ -6906,9 +6906,9 @@ __metadata: linkType: hard "dom-walk@npm:^0.1.0": - version: 0.1.1 - resolution: "dom-walk@npm:0.1.1" - checksum: 2/7c51742af594f07b209b0d22e8232b8809f7f9c37318257063199e607ae9a57338b969941d470ceaef818ec25d09937494e97a2f0583a614d324654bcb6b208c + version: 0.1.2 + resolution: "dom-walk@npm:0.1.2" + checksum: 2/948c7527f3798cae9d7039cc0e5dc9f013ebd701d7d99478bac79d7d9eb8b81e7b6e836526e21ed9b156466b268e30ea0f2d5b72df955fabec3ce2aa7dc0086e languageName: node linkType: hard @@ -7042,9 +7042,9 @@ __metadata: linkType: hard "electron-to-chromium@npm:^1.3.390": - version: 1.3.393 - resolution: "electron-to-chromium@npm:1.3.393" - checksum: 2/37beaa6b945316adf912c578283a02e0919d65a1cf8293a50fe39f80c85e5c1cb378abdf0f754386e72a1c066943297d976cabc34d3048676072f377ee0e3a4b + version: 1.3.395 + resolution: "electron-to-chromium@npm:1.3.395" + checksum: 2/8631a18e3d82df1d5474e8a55c3a652aed8dd0df350663a302d4507cebcd86983309d3d9a880335e32f83480990d57128d3e99787230c043b86d2db3e2923807 languageName: node linkType: hard @@ -7791,17 +7791,17 @@ __metadata: languageName: node linkType: hard -"expect@npm:^25.2.6": - version: 25.2.6 - resolution: "expect@npm:25.2.6" +"expect@npm:^25.2.7": + version: 25.2.7 + resolution: "expect@npm:25.2.7" dependencies: "@jest/types": ^25.2.6 ansi-styles: ^4.0.0 jest-get-type: ^25.2.6 - jest-matcher-utils: ^25.2.6 + jest-matcher-utils: ^25.2.7 jest-message-util: ^25.2.6 jest-regex-util: ^25.2.6 - checksum: 2/4e050dc17e6ca3e76b0325b2844a227eb9ca358c97c478b762ff6858fe94747fe5eb37700df5f725e863e889e9888d1c921028df46da44d86ff5a7b055156263 + checksum: 2/f33767aa8b01173d08ccc0f2e92741d1dad6e4bbd6db43efe24e151fd68ec0015db94afadd6fcfd02e5514796556cd695ad9588edfe27b9d60979d58054a8e69 languageName: node linkType: hard @@ -8937,19 +8937,19 @@ __metadata: linkType: hard "handlebars@npm:^4.4.0, handlebars@npm:^4.7.3": - version: 4.7.4 - resolution: "handlebars@npm:4.7.4" + version: 4.7.5 + resolution: "handlebars@npm:4.7.5" dependencies: neo-async: ^2.6.0 source-map: ^0.6.1 uglify-js: ^3.1.4 - yargs: ^15.3.1 + yargs: ^14.2.3 dependenciesMeta: uglify-js: optional: true bin: handlebars: bin/handlebars - checksum: 2/7fa605287a9403f454d39ecc89f21d15e4471bdae6d1cb3e4be4be689510e69843d7f967f87f4ec8a8e46cb2f2e363a2ccceb899b935ddc24e59a706e4799a28 + checksum: 2/432135a1856f12561f8ce73e50e8b8a3cf41c0b6c6680d8155083b12afaa7603ab15e79d724520e3240b520f1ffc1ca5935ad6746ef92f2de346e719ca2e8f73 languageName: node linkType: hard @@ -10444,18 +10444,18 @@ __metadata: languageName: node linkType: hard -"jest-cli@npm:^25.2.4, jest-cli@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-cli@npm:25.2.6" +"jest-cli@npm:^25.2.4, jest-cli@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-cli@npm:25.2.7" dependencies: - "@jest/core": ^25.2.6 + "@jest/core": ^25.2.7 "@jest/test-result": ^25.2.6 "@jest/types": ^25.2.6 chalk: ^3.0.0 exit: ^0.1.2 import-local: ^3.0.2 is-ci: ^2.0.0 - jest-config: ^25.2.6 + jest-config: ^25.2.7 jest-util: ^25.2.6 jest-validate: ^25.2.6 prompts: ^2.0.1 @@ -10463,16 +10463,16 @@ __metadata: yargs: ^15.3.1 bin: jest: bin/jest.js - checksum: 2/5637b45fe07b70dbd381c6d3f0238faeeb74f9de3090eb256545b6ee2a2fb4f22734f9911d33e25d625d1c304d60b6aed875dd774cf7d43e5137b5458d61dc27 + checksum: 2/26209c798befe73dfd4ad52c383af35cfb41956bd247919757af81d01f85727c57f498f06c2f89db2749869f3c927e3c497a5dcb3f2f9c1a5ec740ca2cfd9161 languageName: node linkType: hard -"jest-config@npm:^25.2.4, jest-config@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-config@npm:25.2.6" +"jest-config@npm:^25.2.4, jest-config@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-config@npm:25.2.7" dependencies: "@babel/core": ^7.1.0 - "@jest/test-sequencer": ^25.2.6 + "@jest/test-sequencer": ^25.2.7 "@jest/types": ^25.2.6 babel-jest: ^25.2.6 chalk: ^3.0.0 @@ -10481,7 +10481,7 @@ __metadata: jest-environment-jsdom: ^25.2.6 jest-environment-node: ^25.2.6 jest-get-type: ^25.2.6 - jest-jasmine2: ^25.2.6 + jest-jasmine2: ^25.2.7 jest-regex-util: ^25.2.6 jest-resolve: ^25.2.6 jest-util: ^25.2.6 @@ -10489,11 +10489,23 @@ __metadata: micromatch: ^4.0.2 pretty-format: ^25.2.6 realpath-native: ^2.0.0 - checksum: 2/f3e1e9310d4eaa0b28e1bb89b56afafdfd154a35d3798fe1d8153511bb89d5b76b1152ccfeeefc31f53b2e2008eaceaca6e2735d41432968e1ea42b68d560038 + checksum: 2/28f8048102d9d72c38e0256936a12c14316cff7f843d89eee026c57a0d7c26374235b8a4c18654a336e7e31c2919716386b546e8ce89e4b6862d275790db5bbe languageName: node linkType: hard -"jest-diff@npm:^25.1.0, jest-diff@npm:^25.2.6": +"jest-diff@npm:25.1.0": + version: 25.1.0 + resolution: "jest-diff@npm:25.1.0" + dependencies: + chalk: ^3.0.0 + diff-sequences: ^25.1.0 + jest-get-type: ^25.1.0 + pretty-format: ^25.1.0 + checksum: 2/35254786c82c80c5a9ba0936371e0a0d8f5d960d36cca2300430003fdc115224b5c46b4bf1cfdae3287018b9edb6c407f7455ffa8480149f36120f8ba05a9dda + languageName: node + linkType: hard + +"jest-diff@npm:^25.2.6": version: 25.2.6 resolution: "jest-diff@npm:25.2.6" dependencies: @@ -10555,7 +10567,7 @@ __metadata: languageName: node linkType: hard -"jest-get-type@npm:^25.2.6": +"jest-get-type@npm:^25.1.0, jest-get-type@npm:^25.2.6": version: 25.2.6 resolution: "jest-get-type@npm:25.2.6" checksum: 2/6051fcb75cdaa8fad66fd5a1e91d2c1597e9ccc54eecd5cd489fd73a00e322d28cb5859b656a8224a41eddab0ecfb875df9ec62f545a76afa1a55d3ba97fba6d @@ -10585,9 +10597,9 @@ __metadata: languageName: node linkType: hard -"jest-jasmine2@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-jasmine2@npm:25.2.6" +"jest-jasmine2@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-jasmine2@npm:25.2.7" dependencies: "@babel/traverse": ^7.1.0 "@jest/environment": ^25.2.6 @@ -10596,17 +10608,17 @@ __metadata: "@jest/types": ^25.2.6 chalk: ^3.0.0 co: ^4.6.0 - expect: ^25.2.6 + expect: ^25.2.7 is-generator-fn: ^2.0.0 jest-each: ^25.2.6 - jest-matcher-utils: ^25.2.6 + jest-matcher-utils: ^25.2.7 jest-message-util: ^25.2.6 - jest-runtime: ^25.2.6 - jest-snapshot: ^25.2.6 + jest-runtime: ^25.2.7 + jest-snapshot: ^25.2.7 jest-util: ^25.2.6 pretty-format: ^25.2.6 throat: ^5.0.0 - checksum: 2/ba5c29626473e5d74fbcdad33763de23c72a23ab596f6e5dc3b6c264c323b55e052684be9f2fdd22f658bbe23248df75ba38b1dd5666955ca634104b78c7e606 + checksum: 2/674630a28906eec86fce85d3efd533bb12c58c5bbfb05efc2a0993386696a060ff12536054e896e7f2d04602403e0837e4df4132bebf27fa078747c8c8f33e3b languageName: node linkType: hard @@ -10620,15 +10632,15 @@ __metadata: languageName: node linkType: hard -"jest-matcher-utils@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-matcher-utils@npm:25.2.6" +"jest-matcher-utils@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-matcher-utils@npm:25.2.7" dependencies: chalk: ^3.0.0 jest-diff: ^25.2.6 jest-get-type: ^25.2.6 pretty-format: ^25.2.6 - checksum: 2/98b54301a7a6bd05e1ff0f8d0528dea86e4dd1d81f5964f7f771fde521e23a64b3be10dd6d64b4194dacd392bc719f7f866d88d623b923b52eab22bcb4eb803c + checksum: 2/3fd65faed14e97d7fe86c9425881dd876e5e89f28ac18b595a899edacd8ee6cc01f218cc62a4450c3dfbf4804af47396774ab011a4d73d344772ac7b7b33ef84 languageName: node linkType: hard @@ -10675,14 +10687,14 @@ __metadata: languageName: node linkType: hard -"jest-resolve-dependencies@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-resolve-dependencies@npm:25.2.6" +"jest-resolve-dependencies@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-resolve-dependencies@npm:25.2.7" dependencies: "@jest/types": ^25.2.6 jest-regex-util: ^25.2.6 - jest-snapshot: ^25.2.6 - checksum: 2/5f463b6bb10a96271129f884e27b95602f43b13f7d53256df6c16b2bd6b2307c43863bdea41f5500e54d877eee4906b2f787f2d52e985fbb2d42d431cae89d78 + jest-snapshot: ^25.2.7 + checksum: 2/54386ca408846f8b04a572e4c5c0077a8f6cb0cb371bc0f25a129d09de031cff2b3378a374372bebe60f31024f2b412f1eae387d69861ac724f5124574afde0d languageName: node linkType: hard @@ -10700,9 +10712,9 @@ __metadata: languageName: node linkType: hard -"jest-runner@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-runner@npm:25.2.6" +"jest-runner@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-runner@npm:25.2.7" dependencies: "@jest/console": ^25.2.6 "@jest/environment": ^25.2.6 @@ -10711,25 +10723,25 @@ __metadata: chalk: ^3.0.0 exit: ^0.1.2 graceful-fs: ^4.2.3 - jest-config: ^25.2.6 + jest-config: ^25.2.7 jest-docblock: ^25.2.6 jest-haste-map: ^25.2.6 - jest-jasmine2: ^25.2.6 + jest-jasmine2: ^25.2.7 jest-leak-detector: ^25.2.6 jest-message-util: ^25.2.6 jest-resolve: ^25.2.6 - jest-runtime: ^25.2.6 + jest-runtime: ^25.2.7 jest-util: ^25.2.6 jest-worker: ^25.2.6 source-map-support: ^0.5.6 throat: ^5.0.0 - checksum: 2/be2cc7ba26e75b1432248f386451e480c3ccc8f1f9feb8137f3e0f55bc43826f52ccb170506647bbf22a63308734cb2bc25e209bf51854f24b141e9b0fb737e5 + checksum: 2/21d2c7db15d0c2444248442dde41234f2c4da4585397b1ab32869635a10471d91a99dfc18fae99482baf9abaed11ea45a1f5524a707be9db1e5bb1dd591c6f62 languageName: node linkType: hard -"jest-runtime@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-runtime@npm:25.2.6" +"jest-runtime@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-runtime@npm:25.2.7" dependencies: "@jest/console": ^25.2.6 "@jest/environment": ^25.2.6 @@ -10743,13 +10755,13 @@ __metadata: exit: ^0.1.2 glob: ^7.1.3 graceful-fs: ^4.2.3 - jest-config: ^25.2.6 + jest-config: ^25.2.7 jest-haste-map: ^25.2.6 jest-message-util: ^25.2.6 jest-mock: ^25.2.6 jest-regex-util: ^25.2.6 jest-resolve: ^25.2.6 - jest-snapshot: ^25.2.6 + jest-snapshot: ^25.2.7 jest-util: ^25.2.6 jest-validate: ^25.2.6 realpath-native: ^2.0.0 @@ -10758,7 +10770,7 @@ __metadata: yargs: ^15.3.1 bin: jest-runtime: bin/jest-runtime.js - checksum: 2/765b62b3cfae7ac50f3e053bde6b44bd5a8871547c9df6b46d241f34df6d06eaf0f9fc934c17c89c2d4f096bd18d0c9abd3af53034ad095c48d20d8491289fff + checksum: 2/dcc95ef37428b7eb528507d5d9c89656a642204fd9779a88aec1f00ae6f189a04050c70e2f91e5ca7ef6f89103cfea4f01fbe113402a4ba4218fba95fc246ab0 languageName: node linkType: hard @@ -10769,25 +10781,25 @@ __metadata: languageName: node linkType: hard -"jest-snapshot@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-snapshot@npm:25.2.6" +"jest-snapshot@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-snapshot@npm:25.2.7" dependencies: "@babel/types": ^7.0.0 "@jest/types": ^25.2.6 "@types/prettier": ^1.19.0 chalk: ^3.0.0 - expect: ^25.2.6 + expect: ^25.2.7 jest-diff: ^25.2.6 jest-get-type: ^25.2.6 - jest-matcher-utils: ^25.2.6 + jest-matcher-utils: ^25.2.7 jest-message-util: ^25.2.6 jest-resolve: ^25.2.6 make-dir: ^3.0.0 natural-compare: ^1.4.0 pretty-format: ^25.2.6 semver: ^6.3.0 - checksum: 2/7aacec560dc3d87b8e541cb5634a8314876fe5be83138ef05523464a0806acfabd98813207b739b5a7b5a27d3ea103d17896ac821b24b8b4febead8109d954e9 + checksum: 2/cd60e907afadb78c6b1adacc28ff85b461c46c158b23c1f20cc6edddc275fa40be3816acee63aae70905c069889f0856ce05d854fa499fda39499879a2ceb765 languageName: node linkType: hard @@ -10817,9 +10829,9 @@ __metadata: languageName: node linkType: hard -"jest-watcher@npm:^25.2.6": - version: 25.2.6 - resolution: "jest-watcher@npm:25.2.6" +"jest-watcher@npm:^25.2.7": + version: 25.2.7 + resolution: "jest-watcher@npm:25.2.7" dependencies: "@jest/test-result": ^25.2.6 "@jest/types": ^25.2.6 @@ -10827,7 +10839,7 @@ __metadata: chalk: ^3.0.0 jest-util: ^25.2.6 string-length: ^3.1.0 - checksum: 2/6feabe10588e6cb9b40dbb56f126bc65d39c7eea0bd9feecf18dd38aa5c18e88df38c8877190d82d4862325e0885b4f4fccd74ea0873ee6ac1d9047b655af84f + checksum: 2/e8568f07867535e88e06bb91eda135781e79ed2807d7fd4968fceb258a2671cffae82258436f60d401720c3de3355e053a75cfa8f2b132c0a8531c281f2c435d languageName: node linkType: hard @@ -10842,15 +10854,15 @@ __metadata: linkType: hard "jest@npm:^25.2.4": - version: 25.2.6 - resolution: "jest@npm:25.2.6" + version: 25.2.7 + resolution: "jest@npm:25.2.7" dependencies: - "@jest/core": ^25.2.6 + "@jest/core": ^25.2.7 import-local: ^3.0.2 - jest-cli: ^25.2.6 + jest-cli: ^25.2.7 bin: jest: bin/jest.js - checksum: 2/582be67cd3319686bca3207bec41bdcb5045415427a5a103452158d6e5513fb2ad3bc83ddf3e2a321facc964ebe074902e17bd466a12fccf9a63807b7961f692 + checksum: 2/ff292486a5f8a79db43b456987aa05c32099db83b696cbb40b48da6e4b2af915873adfd7dc5f42fd5655fcd234d372b2837968c9f0ef5ea2003d5b4672fe0ef5 languageName: node linkType: hard @@ -12388,15 +12400,15 @@ __metadata: linkType: hard "needle@npm:^2.2.1": - version: 2.4.0 - resolution: "needle@npm:2.4.0" + version: 2.4.1 + resolution: "needle@npm:2.4.1" dependencies: debug: ^3.2.6 iconv-lite: ^0.4.4 sax: ^1.2.4 bin: - needle: ./bin/needle - checksum: 2/e6f221672eab5bb0043175434b2ca45c0099e8683f9813237acc6a998525ae369a8946b92a841628ad570835fd61485629a44646431b11b8732c7b64a47cb678 + needle: bin/needle + checksum: 2/f96e393498d0de86e27286fa185bd62599da3ed970ce33321bd2417ddd4f42cf83abf635c786c426a0202913f3f74a17470150f2e2793fc3ff992ba0d4651806 languageName: node linkType: hard @@ -14248,7 +14260,19 @@ __metadata: languageName: node linkType: hard -"pretty-format@npm:^25.1.0, pretty-format@npm:^25.2.6": +"pretty-format@npm:25.1.0, pretty-format@npm:^25.1.0": + version: 25.1.0 + resolution: "pretty-format@npm:25.1.0" + dependencies: + "@jest/types": ^25.1.0 + ansi-regex: ^5.0.0 + ansi-styles: ^4.0.0 + react-is: ^16.12.0 + checksum: 2/3577f509fdf682f60c671346ba9c50151e2e5d55f9e01022d2e527724195d28347def24ef5b3253eb34533e8689064bc7cd7eded683532984f219894ac8a3d81 + languageName: node + linkType: hard + +"pretty-format@npm:^25.2.6": version: 25.2.6 resolution: "pretty-format@npm:25.2.6" dependencies: @@ -15371,11 +15395,11 @@ __metadata: linkType: hard "rxjs@npm:^6.4.0, rxjs@npm:^6.5.3, rxjs@npm:^6.5.4": - version: 6.5.4 - resolution: "rxjs@npm:6.5.4" + version: 6.5.5 + resolution: "rxjs@npm:6.5.5" dependencies: tslib: ^1.9.0 - checksum: 2/8e2b3c1c5ce1134212145f4ee3abd0ad1d3f84efeba1014490627e1176f15ceaeb8c79954d8473fbe01ee33443438a7a9588d442173145eddb294990d7e62102 + checksum: 2/a3882e0374af8aa32459ea9219fdcf24cb5a943cdf35f50da4ded48435ec474647c315b85c3e7b703927a55689e54037538cbd24789548d07b74e4865c4adb78 languageName: node linkType: hard @@ -18488,7 +18512,7 @@ __metadata: languageName: node linkType: hard -"yargs@npm:^14.2.2": +"yargs@npm:^14.2.2, yargs@npm:^14.2.3": version: 14.2.3 resolution: "yargs@npm:14.2.3" dependencies: