Skip to content

Commit

Permalink
Don't show stale validators timestamp for empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaw3d committed Mar 28, 2022
1 parent 810b4ac commit fa0cfad
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/app/pages/StakingPage/Features/ValidatorList/index.tsx
Expand Up @@ -111,13 +111,11 @@ export const ValidatorList = memo((props: Props) => {
{t('common.validators', 'Validators')}
{updateValidatorsError && (
<p>
{t(
'account.validator.loadingError',
"Couldn't load validators. Showing validator list as of {{staleTimestamp}}.",
{
{t('account.validator.loadingError', "Couldn't load validators.")}{' '}
{validators.length > 0 &&
t('account.validator.showingStale', 'Showing validator list as of {{staleTimestamp}}.', {
staleTimestamp: new Date(validatorsTimestamp!).toLocaleString(),
},
)}
})}
<br />
{updateValidatorsError}
</p>
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en/translation.json
Expand Up @@ -121,7 +121,8 @@
"reclaim": "Reclaim"
},
"validator": {
"loadingError": "Couldn't load validators. Showing validator list as of {{staleTimestamp}}."
"loadingError": "Couldn't load validators.",
"showingStale": "Showing validator list as of {{staleTimestamp}}."
}
},
"common": {
Expand Down
3 changes: 2 additions & 1 deletion src/locales/fr/translation.json
Expand Up @@ -111,7 +111,8 @@
},
"loadingError": "Impossible de charger le compte. Des informations peuvent être manquantes ou obsolètes.",
"validator": {
"loadingError": "Impossible de charger les validateurs. La liste peut être vide ou obsolète {{staleTimestamp}}."
"loadingError": "Impossible de charger les validateurs.",
"showingStale": "La liste peut être vide ou obsolète {{staleTimestamp}}."
}
},
"common": {
Expand Down

0 comments on commit fa0cfad

Please sign in to comment.