aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-utils/src/asset_data_utils.ts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-07-16 23:11:14 +0800
committerGreg Hysen <greg.hysen@gmail.com>2018-07-18 21:52:14 +0800
commite1a9f3435f2527fcf38e68c5749bfddf1ba3b37d (patch)
treeb75b219da2f95246ecc8719d226b2ad90883f579 /packages/order-utils/src/asset_data_utils.ts
parent9f74feb3475b14ebdf2a0b312856fc927f91b6ab (diff)
downloaddexon-sol-tools-e1a9f3435f2527fcf38e68c5749bfddf1ba3b37d.tar.gz
dexon-sol-tools-e1a9f3435f2527fcf38e68c5749bfddf1ba3b37d.tar.zst
dexon-sol-tools-e1a9f3435f2527fcf38e68c5749bfddf1ba3b37d.zip
Removed receiverData from ERC721 Proxy Id generation
Diffstat (limited to 'packages/order-utils/src/asset_data_utils.ts')
-rw-r--r--packages/order-utils/src/asset_data_utils.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/packages/order-utils/src/asset_data_utils.ts b/packages/order-utils/src/asset_data_utils.ts
index cb02d7d42..2b6d44227 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,14 @@ export const assetDataUtils = {
}), but got ${assetProxyId}`,
);
}
- const [tokenAddress, tokenId, receiverData] = ethAbi.rawDecode(
- ['address', 'uint256', 'bytes'],
+ 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),
};
},
/**