Extra payouts info on claiming (#3501)

This commit is contained in:
Jaco Greeff 2020-08-24 08:51:04 +02:00 committed by GitHub
parent 7eb977d692
commit 26881b4c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 9 deletions

View File

@ -13,7 +13,7 @@ interface Props {
function Banner ({ children, className = '', type }: Props): React.ReactElement<Props> | null {
return (
<article className={`${className} ${type}`}>
<article className={`${className} ${type} nomargin`}>
<div className='box'>
{children}
</div>
@ -22,13 +22,6 @@ function Banner ({ children, className = '', type }: Props): React.ReactElement<
}
export default React.memo(styled(Banner)`
max-width: 75rem;
margin: 0.5rem auto !important;
&+.ui--Button-Group {
margin-top: 2rem;
}
.box {
padding: 0 0.5rem;
}

View File

@ -208,6 +208,12 @@ function Payouts ({ className = '', isInElection, ownValidators }: Props): React
return (
<div className={className}>
<ElectionBanner isInElection={isInElection} />
{api.tx.staking.payoutStakers && !isLoadingRewards && !stashes?.length && (
<article className='warning nomargin'>
<p>{t('Payouts of rewards for a validator can be initiated by any account. This means that as soon as a validator or nominator requests a payout for an era, all the nominators for that validator will be rewarded. Each user does not need to claim individually and the suggestion is that validators should claim rewards for everybody as soon as an era ends.')}</p>
<p>{t('If you have not claimed rewards straight after the end of the era, the validator is in the active set and you are seeing no rewards, this would mean that the reward payout transaction was made by another account on your behalf. Always check your favorite explorer to see any historic payouts made to your accounts.')}</p>
</article>
)}
{api.tx.staking.payoutStakers && (
<Button.Group>
<PayToggle

View File

@ -220,7 +220,12 @@ export default createGlobalStyle<Props>`
}
&.nomargin {
margin-left: 0;
margin: 0.5rem auto;
max-width: 75rem;
&+.ui--Button-Group {
margin-top: 2rem;
}
}
&.error {