Fix change session keys

This commit is contained in:
Jaco Greeff 2019-11-29 20:17:16 +01:00
parent c39ee0dd59
commit df5340b785

View File

@ -364,7 +364,7 @@ class Account extends React.PureComponent<Props, State> {
private renderPopupMenu (): React.ReactNode {
const { balances_all, isOwnStash, isSubstrateV2, t } = this.props;
const { hexSessionIdNext, isStashNominating, isStashValidating, sessionIds } = this.state;
const { isStashNominating, isStashValidating } = this.state;
// only show a "Bond Additional" button if this stash account actually doesn't bond everything already
// staking_ledger.total gives the total amount that can be slashed (any active amount + what is being unlocked)
@ -401,7 +401,7 @@ class Account extends React.PureComponent<Props, State> {
{t('Change validator preferences')}
</Menu.Item>
}
{!isStashNominating && (!!sessionIds.length || (isSubstrateV2 && hexSessionIdNext !== '0x')) &&
{!isStashNominating &&
<Menu.Item onClick={this.toggleSetSessionAccount}>
{isSubstrateV2 ? t('Change session keys') : t('Change session account')}
</Menu.Item>