aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/src
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts/src')
-rw-r--r--packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol7
1 files changed, 6 insertions, 1 deletions
diff --git a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol
index eb23736a0..9dac02d87 100644
--- a/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol
+++ b/packages/contracts/src/contracts/current/protocol/AssetProxy/ERC721Proxy.sol
@@ -77,8 +77,13 @@ contract ERC721Proxy is
);
// Transfer token.
+ // Save gas by calling safeTransferFrom only when there is data present.
// Either succeeds or throws.
- ERC721Token(token).safeTransferFrom(from, to, tokenId, data);
+ if(data.length > 0) {
+ ERC721Token(token).safeTransferFrom(from, to, tokenId, data);
+ } else {
+ ERC721Token(token).transferFrom(from, to, tokenId);
+ }
}
/// @dev Gets the proxy id associated with the proxy address.