aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/order-utils/src/asset_proxy_utils.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/order-utils/src/asset_proxy_utils.ts b/packages/order-utils/src/asset_proxy_utils.ts
index ee5fff1d2..915ee5032 100644
--- a/packages/order-utils/src/asset_proxy_utils.ts
+++ b/packages/order-utils/src/asset_proxy_utils.ts
@@ -109,7 +109,7 @@ export const assetProxyUtils = {
ERC721_ASSET_DATA_TOKEN_ID_OFFSET,
);
const proxyIdOffset = encodedAssetData.byteLength - 1;
- const encodedAssetProxyId = encodedAssetData.slice(-1);
+ const encodedAssetProxyId = encodedAssetData.slice(proxyIdOffset);
const assetProxyId = assetProxyUtils.decodeAssetProxyId(encodedAssetProxyId);
if (assetProxyId !== AssetProxyId.ERC721) {
throw new Error(
@@ -141,7 +141,7 @@ export const assetProxyUtils = {
}
const encodedReceiverData = encodedAssetData.slice(
ERC721_ASSET_DATA_RECEIVER_DATA_OFFSET,
- ERC721_ASSET_DATA_RECEIVER_DATA_OFFSET + receiverDataLength.toNumber(),
+ receiverDataLength.add(ERC721_ASSET_DATA_RECEIVER_DATA_OFFSET).toNumber(),
);
receiverData = ethUtil.bufferToHex(encodedReceiverData);
}