diff options
author | Greg Hysen <greg.hysen@gmail.com> | 2018-04-13 07:08:00 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-21 04:56:17 +0800 |
commit | 37cfeed0f5f17d6231c25327c13e528a2f30610a (patch) | |
tree | 90a5cb15e2c8555d461b728e6e245131f1648ae3 /packages | |
parent | cb27fe17cdfec3ead79ed17903836cc628593327 (diff) | |
download | dexon-0x-contracts-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar.gz dexon-0x-contracts-37cfeed0f5f17d6231c25327c13e528a2f30610a.tar.zst dexon-0x-contracts-37cfeed0f5f17d6231c25327c13e528a2f30610a.zip |
Rearranged preconditions in ERC721 proxy
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol index e27a104b9..abb709bd7 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxyDispatcher/proxies/ERC721Proxy.sol @@ -45,14 +45,14 @@ contract ERC721Proxy is // No work to do if amount is zero if (amount == 0) return; + // There exists only 1 of each token. + require(amount == 1); + // Decode metadata address token; uint256 tokenId; (token, tokenId) = decodeMetadata(assetMetadata); - // There exists only 1 of each token. - require(amount == 1); - // Either succeeds or throws. ERC721Token(token).transferFrom(from, to, tokenId); } |