Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
openzeppelin-contracts-upgradeable
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
俞永鹏
openzeppelin-contracts-upgradeable
Commits
af337047
Commit
af337047
authored
Jan 17, 2018
by
Facundo Spagnuolo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix solint errors
parent
5b50e99a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
ERC721TokenMock.sol
contracts/mocks/ERC721TokenMock.sol
+1
-1
ERC721Token.sol
contracts/token/ERC721Token.sol
+7
-6
No files found.
contracts/mocks/ERC721TokenMock.sol
View file @
af337047
pragma solidity ^0.4.18;
import
'../token/ERC721Token.sol'
;
import
"../token/ERC721Token.sol"
;
/**
* @title ERC721TokenMock
...
...
contracts/token/ERC721Token.sol
View file @
af337047
pragma solidity ^0.4.18;
import
'./ERC721.sol'
;
import
'../math/SafeMath.sol'
;
import
"./ERC721.sol"
;
import
"../math/SafeMath.sol"
;
/**
* @title ERC721Token
...
...
@@ -97,9 +97,10 @@ contract ERC721Token is ERC721 {
function approve(address _to, uint256 _tokenId) public onlyOwnerOf(_tokenId) {
address owner = ownerOf(_tokenId);
require(_to != owner);
if(approvedFor(_tokenId) == 0 && _to == 0) return;
tokenApprovals[_tokenId] = _to;
Approval(owner, _to, _tokenId);
if (approvedFor(_tokenId) != 0 || _to != 0) {
tokenApprovals[_tokenId] = _to;
Approval(owner, _to, _tokenId);
}
}
/**
...
...
@@ -127,7 +128,7 @@ contract ERC721Token is ERC721 {
* @param _tokenId uint256 ID of the token being burned by the msg.sender
*/
function burn(uint256 _tokenId) onlyOwnerOf(_tokenId) internal {
if(approvedFor(_tokenId) != 0) {
if
(approvedFor(_tokenId) != 0) {
clearApproval(msg.sender, _tokenId);
}
removeToken(msg.sender, _tokenId);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment