diff --git a/packages/page-staking/src/Actions/Account/index.tsx b/packages/page-staking/src/Actions/Account/index.tsx
index d6ea706026..dcac453694 100644
--- a/packages/page-staking/src/Actions/Account/index.tsx
+++ b/packages/page-staking/src/Actions/Account/index.tsx
@@ -71,18 +71,12 @@ function Account ({ allSlashes, className = '', info: { controllerId, destinatio
useEffect((): void => {
allSlashes && setSlashes(
allSlashes
- .map(([era, all]) => {
- const slashes = all
- .filter(({ others, validator }) => validator.eq(stashId) || others.some(([nominatorId]) => nominatorId.eq(stashId)))
- .map(({ others, own, payout, reporters, validator }) => ({
- others, own, payout, reporters, validator
- }));
-
- return {
- era,
- slashes
- };
- })
+ .map(([era, all]) => ({
+ era,
+ slashes: all.filter(({ others, validator }) =>
+ validator.eq(stashId) || others.some(([nominatorId]) => nominatorId.eq(stashId))
+ )
+ }))
.filter(({ slashes }) => slashes.length)
);
}, [allSlashes, stashId]);
@@ -208,136 +202,133 @@ function Account ({ allSlashes, className = '', info: { controllerId, destinatio
)
}
- {isLoading
- ? null
- : (
- <>
- {(isStashNominating || isStashValidating)
- ? (
- ('Stop')}
- tx='staking.chill'
- />
- )
- : (
-
- {(!sessionIds.length || hexSessionIdNext === '0x')
- ? (
-
- )
- }
-
+ {(isStashNominating || isStashValidating)
+ ? (
+ ('Stop')}
+ tx='staking.chill'
+ />
+ )
+ : (
+
+ {(!sessionIds.length || hexSessionIdNext === '0x')
+ ? (
+ ('Session Key')}
+ onClick={toggleSetSession}
+ />
+ )
+ : (
+ ('Validate')}
+ onClick={toggleValidate}
+ />
+ )
+ }
('Nominate')}
+ onClick={toggleNominate}
/>
- }
- >
-
- >
- )
- }
+ }
+
+ {!isStashNominating &&
+
+ {t('Change session keys')}
+
+ }
+ {isStashNominating &&
+
+ {t('Set nominees')}
+
+ }
+ {!isStashNominating &&
+
+ {t('Inject session keys (advanced)')}
+
+ }
+
+
+ >
+ )}
|
);