diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-07-23 07:14:09 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 07:14:09 +0800 |
commit | 195d11f9d0bef49494b05198c259c7314cc9097d (patch) | |
tree | 7ff0ad80b4d5b84c365b4a8a12c321098ca4860c /packages/order-utils/src | |
parent | 06f61949f93eb83ea7d6456f6bbf18cb6f6dab7a (diff) | |
parent | 9aa49e59d0b4a29fb9943fe2dcc04fd2630041b9 (diff) | |
download | dexon-sol-tools-195d11f9d0bef49494b05198c259c7314cc9097d.tar dexon-sol-tools-195d11f9d0bef49494b05198c259c7314cc9097d.tar.gz dexon-sol-tools-195d11f9d0bef49494b05198c259c7314cc9097d.tar.bz2 dexon-sol-tools-195d11f9d0bef49494b05198c259c7314cc9097d.tar.lz dexon-sol-tools-195d11f9d0bef49494b05198c259c7314cc9097d.tar.xz dexon-sol-tools-195d11f9d0bef49494b05198c259c7314cc9097d.tar.zst dexon-sol-tools-195d11f9d0bef49494b05198c259c7314cc9097d.zip |
Merge pull request #877 from 0xProject/feature/contracts/removeERC721Callback
Removed receiverData and `onReceive` callback from ERC721 proxy.
Diffstat (limited to 'packages/order-utils/src')
-rw-r--r-- | packages/order-utils/src/asset_data_utils.ts | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/packages/order-utils/src/asset_data_utils.ts b/packages/order-utils/src/asset_data_utils.ts index a9601e9ea..0c0b59548 100644 --- a/packages/order-utils/src/asset_data_utils.ts +++ b/packages/order-utils/src/asset_data_utils.ts @@ -50,14 +50,13 @@ export const assetDataUtils = { * @param tokenId The ERC721 tokenId to encode * @return The hex encoded assetData string */ - encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber, receiverData?: string): string { + encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber): string { // TODO: Pass `tokendId` as a BigNumber. return ethUtil.bufferToHex( ethAbi.simpleEncode( - 'ERC721Token(address,uint256,bytes)', + 'ERC721Token(address,uint256)', tokenAddress, `0x${tokenId.toString(constants.BASE_16)}`, - ethUtil.toBuffer(receiverData || '0x'), ), ); }, @@ -83,15 +82,11 @@ export const assetDataUtils = { }), but got ${assetProxyId}`, ); } - const [tokenAddress, tokenId, receiverData] = ethAbi.rawDecode( - ['address', 'uint256', 'bytes'], - data.slice(constants.SELECTOR_LENGTH), - ); + const [tokenAddress, tokenId] = ethAbi.rawDecode(['address', 'uint256'], data.slice(constants.SELECTOR_LENGTH)); return { assetProxyId, tokenAddress: ethUtil.addHexPrefix(tokenAddress), tokenId: new BigNumber(tokenId.toString()), - receiverData: ethUtil.bufferToHex(receiverData), }; }, /** |