Fixed Unregister for Contract Owner only #3321 (#3346)

This commit is contained in:
Nicolas Gotchac 2016-11-10 18:44:11 +01:00 committed by Gav Wood
parent 3854b8a689
commit cb84e61d06
2 changed files with 5 additions and 3 deletions

View File

@ -57,6 +57,7 @@ export default class Token extends Component {
isLoading: PropTypes.bool,
isPending: PropTypes.bool,
isTokenOwner: PropTypes.bool.isRequired,
isContractOwner: PropTypes.bool.isRequired,
fullWidth: PropTypes.bool
};
@ -220,7 +221,7 @@ export default class Token extends Component {
}
renderUnregister () {
if (!this.props.isTokenOwner) {
if (!this.props.isContractOwner) {
return null;
}

View File

@ -45,7 +45,7 @@ export default class Tokens extends Component {
}
renderTokens (tokens) {
const { accounts } = this.props;
const { accounts, isOwner } = this.props;
return tokens.map((token, index) => {
if (!token || !token.tla) {
@ -61,7 +61,8 @@ export default class Tokens extends Component {
handleMetaLookup={ this.props.handleMetaLookup }
handleAddMeta={ this.props.handleAddMeta }
key={ index }
isTokenOwner={ isTokenOwner } />
isTokenOwner={ isTokenOwner }
isContractOwner={ isOwner } />
);
});
}