Display last target payout (#4101)
* Ensure identity filter applies to all targets * Name filter removes flags * Revert * Apply query filters to override toggles * Display last target payout
This commit is contained in:
parent
5f7fc6c6d8
commit
066e5eca04
@ -63,7 +63,7 @@ function Validator ({ allSlashes, canSelect, filterName, info, isNominated, isSe
|
||||
return null;
|
||||
}
|
||||
|
||||
const { accountId, bondOther, bondOwn, bondTotal, commissionPer, isCommission, isElected, isFavorite, key, numNominators, rankOverall, stakedReturnCmp, validatorPayment } = info;
|
||||
const { accountId, bondOther, bondOwn, bondTotal, commissionPer, isCommission, isElected, isFavorite, key, lastPayout, numNominators, rankOverall, stakedReturnCmp, validatorPayment } = info;
|
||||
|
||||
return (
|
||||
<tr>
|
||||
@ -108,6 +108,7 @@ function Validator ({ allSlashes, canSelect, filterName, info, isNominated, isSe
|
||||
<td className='address all'>
|
||||
<AddressSmall value={accountId} />
|
||||
</td>
|
||||
<td className='number media--1400'>{lastPayout && formatNumber(lastPayout)}</td>
|
||||
<td className='number media--1200'>{numNominators || ''}</td>
|
||||
<td className='number'>
|
||||
{
|
||||
|
||||
@ -221,6 +221,7 @@ function Targets ({ className = '', isInElection, ownStashes, targets: { avgStak
|
||||
|
||||
const header = useMemo(() => [
|
||||
[t('validators'), 'start', 3],
|
||||
[t('paid'), 'media--1400'],
|
||||
...(SORT_KEYS as (keyof typeof labelsRef.current)[]).map((header) => [
|
||||
<>{labelsRef.current[header]}<Icon icon={sortBy === header ? (sortFromMax ? 'chevron-down' : 'chevron-up') : 'minus'} /></>,
|
||||
`${sorted ? `isClickable ${sortBy === header ? 'highlight--border' : ''} number` : 'number'} ${CLASSES[header] || ''}`,
|
||||
|
||||
@ -53,6 +53,7 @@ export interface ValidatorInfo extends ValidatorInfoRank {
|
||||
isFavorite: boolean;
|
||||
isNominating: boolean;
|
||||
key: string;
|
||||
lastPayout?: BN;
|
||||
numNominators: number;
|
||||
rewardSplit: BN;
|
||||
skipRewards: boolean;
|
||||
|
||||
@ -103,6 +103,7 @@ function extractSingle (allAccounts: string[], derive: DeriveStakingElected | De
|
||||
return isNominating || allAccounts.includes(nominator);
|
||||
}, allAccounts.includes(key));
|
||||
const isElected = !isWaitingDerive(derive) && derive.nextElected.some((e) => e.eq(accountId));
|
||||
const lastPayout = stakingLedger.claimedRewards[stakingLedger.claimedRewards.length - 1];
|
||||
|
||||
return {
|
||||
accountId,
|
||||
@ -118,6 +119,7 @@ function extractSingle (allAccounts: string[], derive: DeriveStakingElected | De
|
||||
isFavorite: favorites.includes(key),
|
||||
isNominating,
|
||||
key,
|
||||
lastPayout,
|
||||
numNominators: (exposure.others || []).length,
|
||||
rankBondOther: 0,
|
||||
rankBondOwn: 0,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user