diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol | 4 | ||||
-rw-r--r-- | packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol index 50632400e..dd25bf41a 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC20Proxy.sol @@ -91,13 +91,13 @@ contract ERC20Proxy is // Validate encoded data length uint256 length = assetData.length; require( - assetData.length == 21, + length == 21, LENGTH_21_REQUIRED ); // Decode data token = readAddress(assetData, 0); - proxyId = uint8(assetData[length-1]); + proxyId = uint8(assetData[length - 1]); return (proxyId, token); } diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol index 21e5518c6..499d8d96e 100644 --- a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol +++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol @@ -106,14 +106,14 @@ contract ERC721Proxy is // Validate encoded data length uint256 length = assetData.length; require( - assetData.length >= 53, + length >= 53, LENGTH_AT_LEAST_53_REQUIRED ); // Decode asset data. token = readAddress(assetData, 0); tokenId = readUint256(assetData, 20); - if (assetData.length > 53) { + if (length > 53) { receiverData = readBytes(assetData, 52); } proxyId = uint8(assetData[length-1]); |