Filter nominators on the stash (#930)

This commit is contained in:
Jaco Greeff 2019-04-09 14:07:50 +02:00 committed by GitHub
parent 08e53a46e6
commit 12f559dc7b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -159,10 +159,13 @@ class Address extends React.PureComponent<Props, State> {
}
private renderNominators () {
const { address, nominators, t } = this.props;
const myNominators = Object.keys(nominators).filter((nominator) =>
nominators[nominator].indexOf(address) !== -1
);
const { nominators, t } = this.props;
const { stashId } = this.state;
const myNominators = stashId
? Object.keys(nominators).filter((nominator) =>
nominators[nominator].indexOf(stashId) !== -1
)
: [];
return (
<details className='staking--Account-detail'>