Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
Fixed Unregister for Contract Owner only #3321 (#3346)
Browse files Browse the repository at this point in the history
  • Loading branch information
ngotchac authored and arkpar committed Nov 15, 2016
1 parent 08a4220 commit c171207
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion js/src/dapps/tokenreg/Tokens/Token/token.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
Expand Down Expand Up @@ -220,7 +221,7 @@ export default class Token extends Component {
}

renderUnregister () {
if (!this.props.isTokenOwner) {
if (!this.props.isContractOwner) {
return null;
}

Expand Down
5 changes: 3 additions & 2 deletions js/src/dapps/tokenreg/Tokens/tokens.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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 } />
);
});
}
Expand Down

0 comments on commit c171207

Please sign in to comment.